Push version 2.0.0 to trunk.
Added support for VFP on ARM.
Added TryCatch::ReThrow method to the API.
Reduced the size of snapshots and improved the snapshot load time.
Improved heap profiler support.
64-bit version now supported on Windows.
Fixed a number of debugger issues.
Fixed bugs.
git-svn-id: http://v8.googlecode.com/svn/trunk@3333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/global-handles.cc b/src/global-handles.cc
index c6cc288..e519d70 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -165,6 +165,9 @@
// It's fine though to reuse nodes that were destroyed in weak callback
// as those cannot be deallocated until we are back from the callback.
set_first_free(NULL);
+ if (first_deallocated()) {
+ first_deallocated()->set_next(head());
+ }
// Leaving V8.
VMState state(EXTERNAL);
func(object, par);
@@ -270,6 +273,7 @@
// Next try deallocated list
result = first_deallocated();
set_first_deallocated(result->next_free());
+ ASSERT(result->next() == head());
set_head(result);
} else {
// Allocate a new node.
@@ -390,8 +394,8 @@
}
-void GlobalHandles::IterateRoots(ObjectVisitor* v) {
- // Traversal of global handles marked as NORMAL or NEAR_DEATH.
+void GlobalHandles::IterateStrongRoots(ObjectVisitor* v) {
+ // Traversal of global handles marked as NORMAL.
for (Node* current = head_; current != NULL; current = current->next()) {
if (current->state_ == Node::NORMAL) {
v->VisitPointer(¤t->object_);
@@ -399,6 +403,16 @@
}
}
+
+void GlobalHandles::IterateAllRoots(ObjectVisitor* v) {
+ for (Node* current = head_; current != NULL; current = current->next()) {
+ if (current->state_ != Node::DESTROYED) {
+ v->VisitPointer(¤t->object_);
+ }
+ }
+}
+
+
void GlobalHandles::TearDown() {
// Reset all the lists.
set_head(NULL);