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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1975763002: [runtime] Make sure that LookupIterator::OWN always performs a HIDDEN lookup as well. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 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 unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime-object.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug-evaluate.h" 8 #include "src/debug/debug-evaluate.h"
9 #include "src/debug/debug-frames.h" 9 #include "src/debug/debug-frames.h"
10 #include "src/debug/debug-scopes.h" 10 #include "src/debug/debug-scopes.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 if (name->AsArrayIndex(&index)) { 351 if (name->AsArrayIndex(&index)) {
352 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2); 352 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2);
353 Handle<Object> element_or_char; 353 Handle<Object> element_or_char;
354 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 354 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
355 isolate, element_or_char, JSReceiver::GetElement(isolate, obj, index)); 355 isolate, element_or_char, JSReceiver::GetElement(isolate, obj, index));
356 details->set(0, *element_or_char); 356 details->set(0, *element_or_char);
357 details->set(1, PropertyDetails::Empty().AsSmi()); 357 details->set(1, PropertyDetails::Empty().AsSmi());
358 return *isolate->factory()->NewJSArrayWithElements(details); 358 return *isolate->factory()->NewJSArrayWithElements(details);
359 } 359 }
360 360
361 LookupIterator it(obj, name, LookupIterator::HIDDEN); 361 LookupIterator it(obj, name, LookupIterator::OWN);
362 bool has_caught = false; 362 bool has_caught = false;
363 Handle<Object> value = DebugGetProperty(&it, &has_caught); 363 Handle<Object> value = DebugGetProperty(&it, &has_caught);
364 if (!it.IsFound()) return isolate->heap()->undefined_value(); 364 if (!it.IsFound()) return isolate->heap()->undefined_value();
365 365
366 Handle<Object> maybe_pair; 366 Handle<Object> maybe_pair;
367 if (it.state() == LookupIterator::ACCESSOR) { 367 if (it.state() == LookupIterator::ACCESSOR) {
368 maybe_pair = it.GetAccessors(); 368 maybe_pair = it.GetAccessors();
369 } 369 }
370 370
371 // If the callback object is a fixed array then it contains JavaScript 371 // If the callback object is a fixed array then it contains JavaScript
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 return Smi::FromInt(isolate->debug()->is_active()); 1545 return Smi::FromInt(isolate->debug()->is_active());
1546 } 1546 }
1547 1547
1548 1548
1549 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1549 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1550 UNIMPLEMENTED(); 1550 UNIMPLEMENTED();
1551 return NULL; 1551 return NULL;
1552 } 1552 }
1553 } // namespace internal 1553 } // namespace internal
1554 } // namespace v8 1554 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698