Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: src/global-handles.cc

Issue 467037: External string table. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/globals.h » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 1a0c982936f7b45e2fd305a1cee75b8e09171c82..e4bb925f0e9299ea105df757004d0912dad893b0 100644
--- a/src/global-handles.cc
+++ b/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);
@@ -507,5 +513,4 @@ void GlobalHandles::RemoveObjectGroups() {
object_groups->Clear();
}
-
} } // namespace v8::internal
« no previous file with comments | « src/api.cc ('k') | src/globals.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698