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

Side by Side Diff: src/contexts.cc

Issue 2203213003: Properly pass InitializationFlag back from ScriptContextTable lookups (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-633884.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/contexts.h" 5 #include "src/contexts.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 ScriptContextTable::LookupResult r; 226 ScriptContextTable::LookupResult r;
227 if (ScriptContextTable::Lookup(script_contexts, name, &r)) { 227 if (ScriptContextTable::Lookup(script_contexts, name, &r)) {
228 if (FLAG_trace_contexts) { 228 if (FLAG_trace_contexts) {
229 Handle<Context> c = ScriptContextTable::GetContext(script_contexts, 229 Handle<Context> c = ScriptContextTable::GetContext(script_contexts,
230 r.context_index); 230 r.context_index);
231 PrintF("=> found property in script context %d: %p\n", 231 PrintF("=> found property in script context %d: %p\n",
232 r.context_index, reinterpret_cast<void*>(*c)); 232 r.context_index, reinterpret_cast<void*>(*c));
233 } 233 }
234 *index = r.slot_index; 234 *index = r.slot_index;
235 *variable_mode = r.mode; 235 *variable_mode = r.mode;
236 *init_flag = r.init_flag;
236 *attributes = GetAttributesForMode(r.mode); 237 *attributes = GetAttributesForMode(r.mode);
237 return ScriptContextTable::GetContext(script_contexts, 238 return ScriptContextTable::GetContext(script_contexts,
238 r.context_index); 239 r.context_index);
239 } 240 }
240 } 241 }
241 242
242 // Context extension objects needs to behave as if they have no 243 // Context extension objects needs to behave as if they have no
243 // prototype. So even if we want to follow prototype chains, we need 244 // prototype. So even if we want to follow prototype chains, we need
244 // to only do a local lookup for context extension objects. 245 // to only do a local lookup for context extension objects.
245 Maybe<PropertyAttributes> maybe = Nothing<PropertyAttributes>(); 246 Maybe<PropertyAttributes> maybe = Nothing<PropertyAttributes>();
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 574
574 int previous_value = errors_thrown()->value(); 575 int previous_value = errors_thrown()->value();
575 set_errors_thrown(Smi::FromInt(previous_value + 1)); 576 set_errors_thrown(Smi::FromInt(previous_value + 1));
576 } 577 }
577 578
578 579
579 int Context::GetErrorsThrown() { return errors_thrown()->value(); } 580 int Context::GetErrorsThrown() { return errors_thrown()->value(); }
580 581
581 } // namespace internal 582 } // namespace internal
582 } // namespace v8 583 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-633884.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698