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

Unified Diff: src/runtime/runtime-scopes.cc

Issue 1082013003: Revert of Eagerly declare eval scopes, even for sloppy scopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 8 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 | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 7a523a7cac41b3783be5f99f381f313d76cdb3fa..c92f027264ce3edc2974d269eb2dc8cd91f2b083 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -240,16 +240,11 @@
// TODO(verwaest): This case should probably not be covered by this function,
// but by DeclareGlobals instead.
- if (attributes != ABSENT && holder->IsJSGlobalObject()) {
+ if ((attributes != ABSENT && holder->IsJSGlobalObject()) ||
+ (context_arg->has_extension() &&
+ context_arg->extension()->IsJSGlobalObject())) {
return DeclareGlobals(isolate, Handle<JSGlobalObject>::cast(holder), name,
value, attr, is_var, is_const, is_function);
- }
- if (context_arg->has_extension() &&
- context_arg->extension()->IsJSGlobalObject()) {
- Handle<JSGlobalObject> global(
- JSGlobalObject::cast(context_arg->extension()), isolate);
- return DeclareGlobals(isolate, global, name, value, attr, is_var, is_const,
- is_function);
}
if (attributes != ABSENT) {
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698