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

Unified Diff: src/contexts.cc

Issue 18709: Make sure that eval and try-catch introduced context extension objects... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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-193.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
===================================================================
--- src/contexts.cc (revision 1131)
+++ src/contexts.cc (working copy)
@@ -94,7 +94,11 @@
// check extension/with object
if (context->has_extension()) {
Handle<JSObject> extension = Handle<JSObject>(context->extension());
- if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0) {
+ // Context extension objects needs to behave as if they have no
+ // prototype. So even if we want to follow prototype chains, we
+ // need to only do a local lookup for context extension objects.
+ if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0 ||
+ extension->IsJSContextExtensionObject()) {
*attributes = extension->GetLocalPropertyAttribute(*name);
} else {
*attributes = extension->GetPropertyAttribute(*name);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-193.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698