Fix global object check in %IsObserved and %SetIsObserved.
BUG= Review URL: https://chromiumcodereview.appspot.com/12929024 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
83d4a41dec
commit
71c1f69b06
@ -12829,7 +12829,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_IsObserved) {
|
||||
CONVERT_ARG_CHECKED(JSReceiver, obj, 0);
|
||||
if (obj->IsJSGlobalProxy()) {
|
||||
Object* proto = obj->GetPrototype();
|
||||
if (obj->IsNull()) return isolate->heap()->false_value();
|
||||
if (proto->IsNull()) return isolate->heap()->false_value();
|
||||
ASSERT(proto->IsJSGlobalObject());
|
||||
obj = JSReceiver::cast(proto);
|
||||
}
|
||||
@ -12844,7 +12844,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetIsObserved) {
|
||||
CONVERT_BOOLEAN_ARG_CHECKED(is_observed, 1);
|
||||
if (obj->IsJSGlobalProxy()) {
|
||||
Object* proto = obj->GetPrototype();
|
||||
if (obj->IsNull()) return isolate->heap()->undefined_value();
|
||||
if (proto->IsNull()) return isolate->heap()->undefined_value();
|
||||
ASSERT(proto->IsJSGlobalObject());
|
||||
obj = JSReceiver::cast(proto);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user