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

Unified Diff: src/runtime.cc

Issue 6450003: Make sure that we do not call is_extensible on the global proxy.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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 | « no previous file | test/mjsunit/regress/regress-1120.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 6673)
+++ src/runtime.cc (working copy)
@@ -887,6 +887,12 @@
static MaybeObject* Runtime_IsExtensible(Arguments args) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(JSObject, obj, args[0]);
+ if (obj->IsJSGlobalProxy()) {
+ Object* proto = obj->GetPrototype();
+ if (proto->IsNull()) return obj;
Mads Ager (chromium) 2011/02/08 13:04:22 Return false? Otherwise this will be interpreted a
Rico 2011/02/08 13:08:58 Done.
+ ASSERT(proto->IsJSGlobalObject());
+ obj = JSObject::cast(proto);
+ }
return obj->map()->is_extensible() ? Heap::true_value()
Mads Ager (chromium) 2011/02/08 13:04:22 Remove extra space.
Rico 2011/02/08 13:08:58 Done.
: Heap::false_value();
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1120.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698