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

Unified Diff: src/objects.cc

Issue 1291043002: Debugger: remove duplicate heap iterations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@debuggerglobal
Patch Set: slight change Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 69f3965172259ca7f713d6e7ef65d81135e1449a..2cfc82df1a84b7402681a340fb5578f2c99e83ea 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -598,6 +598,16 @@ void JSObject::SetNormalizedProperty(Handle<JSObject> object,
}
+bool Object::HasInPrototypeChain(Isolate* isolate, Object* target) {
+ PrototypeIterator iter(isolate, this, PrototypeIterator::START_AT_RECEIVER);
+ while (true) {
+ iter.AdvanceIgnoringProxies();
+ if (iter.IsAtEnd()) return false;
+ if (iter.IsAtEnd(target)) return true;
+ }
+}
+
+
Map* Object::GetRootMap(Isolate* isolate) {
DisallowHeapAllocation no_alloc;
if (IsSmi()) {
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698