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

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

Issue 1157993002: Correctly hook up materialized receiver into the evaluation context chain. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: blacklist from turbofan Created 5 years, 7 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/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 660fc7ffa2b1055010db4f37751b3a297c8b2e26..d071cbf7f9ddfb721c417899d422ecf83c6e2520 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -2500,18 +2500,21 @@ class EvaluationContextBuilder {
outer_info_ = handle(function->shared());
Handle<Context> inner_context;
- // The "this" binding, if any, can't be bound via "with". If we need to,
- // add another node onto the outer context to bind "this".
- if (!MaterializeReceiver(isolate, outer_context, function, frame)
- .ToHandle(&outer_context))
- return;
-
bool stop = false;
for (ScopeIterator it(isolate, frame, inlined_jsframe_index);
!it.Failed() && !it.Done() && !stop; it.Next()) {
ScopeIterator::ScopeType scope_type = it.Type();
if (scope_type == ScopeIterator::ScopeTypeLocal) {
+ Handle<Context> parent_context =
+ it.HasContext() ? it.CurrentContext() : outer_context;
+
+ // The "this" binding, if any, can't be bound via "with". If we need
+ // to, add another node onto the outer context to bind "this".
+ if (!MaterializeReceiver(isolate, parent_context, function, frame)
+ .ToHandle(&parent_context))
+ return;
+
Handle<JSObject> materialized_function =
NewJSObjectWithNullProto(isolate);
@@ -2525,8 +2528,6 @@ class EvaluationContextBuilder {
.ToHandle(&materialized_function))
return;
- Handle<Context> parent_context =
- it.HasContext() ? it.CurrentContext() : outer_context;
Handle<Context> with_context = isolate->factory()->NewWithContext(
function, parent_context, materialized_function);
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698