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

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

Issue 1492863002: [proxies] Make Object.prototype.isPrototypeOf work with proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/prototype.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.h" 8 #include "src/debug/debug.h"
9 #include "src/debug/debug-evaluate.h" 9 #include "src/debug/debug-evaluate.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 1365
1366 List<Handle<JSObject> > instances; 1366 List<Handle<JSObject> > instances;
1367 Heap* heap = isolate->heap(); 1367 Heap* heap = isolate->heap();
1368 { 1368 {
1369 HeapIterator iterator(heap, HeapIterator::kFilterUnreachable); 1369 HeapIterator iterator(heap, HeapIterator::kFilterUnreachable);
1370 // Get the constructor function for context extension and arguments array. 1370 // Get the constructor function for context extension and arguments array.
1371 Object* arguments_fun = isolate->sloppy_arguments_map()->GetConstructor(); 1371 Object* arguments_fun = isolate->sloppy_arguments_map()->GetConstructor();
1372 HeapObject* heap_obj; 1372 HeapObject* heap_obj;
1373 while ((heap_obj = iterator.next())) { 1373 while ((heap_obj = iterator.next())) {
1374 if (!heap_obj->IsJSObject()) continue; 1374 if (!heap_obj->IsJSObject()) continue;
1375 JSObject* obj = JSObject::cast(heap_obj); 1375 Handle<JSObject> obj(JSObject::cast(heap_obj));
1376 if (obj->IsJSContextExtensionObject()) continue; 1376 if (obj->IsJSContextExtensionObject()) continue;
1377 if (obj->map()->GetConstructor() == arguments_fun) continue; 1377 if (obj->map()->GetConstructor() == arguments_fun) continue;
1378 if (!obj->ReferencesObject(*target)) continue; 1378 if (!obj->ReferencesObject(*target)) continue;
1379 // Check filter if supplied. This is normally used to avoid 1379 // Check filter if supplied. This is normally used to avoid
1380 // references from mirror objects. 1380 // references from mirror objects.
1381 if (!filter->IsUndefined() && 1381 if (!filter->IsUndefined()) {
1382 obj->HasInPrototypeChain(isolate, *filter)) { 1382 Maybe<bool> maybe = Object::HasInPrototypeChain(isolate, obj, filter);
Toon Verwaest 2015/12/03 11:29:02 Debug methods are not supposed to have side-effect
Toon Verwaest 2015/12/03 11:30:32 Plus we are iterating the heap. Allocating here co
1383 continue; 1383 MAYBE_RETURN(maybe, isolate->heap()->exception());
1384 if (maybe.FromJust()) continue;
1384 } 1385 }
1385 if (obj->IsJSGlobalObject()) { 1386 if (obj->IsJSGlobalObject()) {
1386 obj = JSGlobalObject::cast(obj)->global_proxy(); 1387 obj = handle(JSGlobalObject::cast(*obj)->global_proxy());
1387 } 1388 }
1388 instances.Add(Handle<JSObject>(obj)); 1389 instances.Add(Handle<JSObject>(obj));
1389 if (instances.length() == max_references) break; 1390 if (instances.length() == max_references) break;
1390 } 1391 }
1391 // Iterate the rest of the heap to satisfy HeapIterator constraints. 1392 // Iterate the rest of the heap to satisfy HeapIterator constraints.
1392 while (iterator.next()) { 1393 while (iterator.next()) {
1393 } 1394 }
1394 } 1395 }
1395 1396
1396 Handle<FixedArray> result; 1397 Handle<FixedArray> result;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 return Smi::FromInt(isolate->debug()->is_active()); 1691 return Smi::FromInt(isolate->debug()->is_active());
1691 } 1692 }
1692 1693
1693 1694
1694 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1695 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1695 UNIMPLEMENTED(); 1696 UNIMPLEMENTED();
1696 return NULL; 1697 return NULL;
1697 } 1698 }
1698 } // namespace internal 1699 } // namespace internal
1699 } // namespace v8 1700 } // namespace v8
OLDNEW
« no previous file with comments | « src/prototype.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698