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

Unified Diff: src/json-stringifier.h

Issue 390323002: Remove JSReceiver::GetPrototype and replace it with PrototypeIterator calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 months 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/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 0a453ef67f6d6404d714cf13e6a29a011014b426..ba4c87ad1d5f14b8b64f99608e3fa4a0d9fc671f 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -631,8 +631,9 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
Result stack_push = StackPush(object);
if (stack_push != SUCCESS) return stack_push;
if (object->IsJSGlobalProxy()) {
- object = Handle<JSObject>(
- JSObject::cast(object->GetPrototype()), isolate_);
+ // TODO(verwaest): This will crash if the global proxy is detached.
+ PrototypeIterator iter(isolate_, object);
+ object = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
ASSERT(object->IsGlobalObject());
}
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698