summaryrefslogtreecommitdiff
path: root/deps/v8/src/global-handles.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2009-12-30 02:34:22 +0100
committerRyan Dahl <ry@tinyclouds.org>2009-12-30 02:35:15 +0100
commitfd73a3a3985b5d4064d3dbb1e5bda7eab259e9c7 (patch)
tree869a651a4d972e661c9c828b74348a55e24cc8c8 /deps/v8/src/global-handles.cc
parent359d0170ab2c9925b0408f358285c9a1d98547e6 (diff)
downloadnode-fd73a3a3985b5d4064d3dbb1e5bda7eab259e9c7.tar.gz
Upgrade V8 to 2.0.5.4
Diffstat (limited to 'deps/v8/src/global-handles.cc')
-rw-r--r--deps/v8/src/global-handles.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc
index f3b2b0c50..e4bb925f0 100644
--- a/deps/v8/src/global-handles.cc
+++ b/deps/v8/src/global-handles.cc
@@ -168,6 +168,12 @@ class GlobalHandles::Node : public Malloced {
if (first_deallocated()) {
first_deallocated()->set_next(head());
}
+ // Check that we are not passing a finalized external string to
+ // the callback.
+ ASSERT(!object_->IsExternalAsciiString() ||
+ ExternalAsciiString::cast(object_)->resource() != NULL);
+ ASSERT(!object_->IsExternalTwoByteString() ||
+ ExternalTwoByteString::cast(object_)->resource() != NULL);
// Leaving V8.
VMState state(EXTERNAL);
func(object, par);
@@ -436,15 +442,15 @@ void GlobalHandles::RecordStats(HeapStats* stats) {
*stats->near_death_global_handle_count = 0;
*stats->destroyed_global_handle_count = 0;
for (Node* current = head_; current != NULL; current = current->next()) {
- *stats->global_handle_count++;
+ *stats->global_handle_count += 1;
if (current->state_ == Node::WEAK) {
- *stats->weak_global_handle_count++;
+ *stats->weak_global_handle_count += 1;
} else if (current->state_ == Node::PENDING) {
- *stats->pending_global_handle_count++;
+ *stats->pending_global_handle_count += 1;
} else if (current->state_ == Node::NEAR_DEATH) {
- *stats->near_death_global_handle_count++;
+ *stats->near_death_global_handle_count += 1;
} else if (current->state_ == Node::DESTROYED) {
- *stats->destroyed_global_handle_count++;
+ *stats->destroyed_global_handle_count += 1;
}
}
}
@@ -507,5 +513,4 @@ void GlobalHandles::RemoveObjectGroups() {
object_groups->Clear();
}
-
} } // namespace v8::internal