Commit 71c1f69b authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent 83d4a41d
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment