| Index: src/json-stringifier.h
|
| diff --git a/src/json-stringifier.h b/src/json-stringifier.h
|
| index 0a453ef67f6d6404d714cf13e6a29a011014b426..4edc8d8d439e463962e96f4800f84ccdf6626af7 100644
|
| --- a/src/json-stringifier.h
|
| +++ b/src/json-stringifier.h
|
| @@ -442,7 +442,8 @@ BasicJsonStringifier::Result BasicJsonStringifier::Serialize_(
|
| SerializeString(Handle<String>::cast(object));
|
| return SUCCESS;
|
| } else if (object->IsJSObject()) {
|
| - if (object->IsAccessCheckNeeded()) break;
|
| + // Go to slow path for global proxy and objects requiring access checks.
|
| + if (object->IsAccessCheckNeeded() || object->IsJSGlobalProxy()) break;
|
| if (deferred_string_key) SerializeDeferredKey(comma, key);
|
| return SerializeJSObject(Handle<JSObject>::cast(object));
|
| }
|
| @@ -630,11 +631,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
|
| HandleScope handle_scope(isolate_);
|
| Result stack_push = StackPush(object);
|
| if (stack_push != SUCCESS) return stack_push;
|
| - if (object->IsJSGlobalProxy()) {
|
| - object = Handle<JSObject>(
|
| - JSObject::cast(object->GetPrototype()), isolate_);
|
| - ASSERT(object->IsGlobalObject());
|
| - }
|
| + ASSERT(!object->IsJSGlobalProxy() && !object->IsGlobalObject());
|
|
|
| Append('{');
|
| bool comma = false;
|
|
|