diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-12-18 15:05:04 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-12-18 15:05:04 +0100 |
commit | 20b945df706b2b9fcbc1a84230372d288d497544 (patch) | |
tree | 0c60abd605dfb4452ba1e866b2bd075f1bd929ef /deps/v8/src/global-handles.cc | |
parent | 164ce76e941490e82230e905e719b5b556b669f5 (diff) | |
download | node-new-20b945df706b2b9fcbc1a84230372d288d497544.tar.gz |
Upgrade V8 to 2.0.5
Diffstat (limited to 'deps/v8/src/global-handles.cc')
-rw-r--r-- | deps/v8/src/global-handles.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc index f3b2b0c50c..e4bb925f0e 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 |