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

Unified Diff: src/objects.cc

Issue 1844413002: Use EmbedderHeapTracer instead of object grouping when trace_embedder_heap flag is set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix fast accessor tests Created 4 years, 8 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/objects-body-descriptors-inl.h » ('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 36d6ea870c493945536ed49df2ee99917782442b..96e767f9fba1419773166afa415d1a0026c2053a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15988,6 +15988,12 @@ void JSObject::CollectOwnPropertyNames(KeyAccumulator* keys,
}
}
+bool JSObject::WasConstructedFromApiFunction() {
Toon Verwaest 2016/04/06 14:07:47 can't we now just check == JS_API... || JS_SPECIAL
Marcel Hlopko 2016/04/07 08:09:53 Yes indeed. I left the slow path hidden behind FLA
+ Object* maybe_constructor = map()->GetConstructor();
+ if (!maybe_constructor->IsJSFunction()) return false;
+ JSFunction* constructor = JSFunction::cast(maybe_constructor);
+ return constructor->shared()->IsApiFunction();
+}
int JSObject::NumberOfOwnElements(PropertyFilter filter) {
// Fast case for objects with no elements.
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698