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

Unified Diff: test/cctest/test-api.cc

Issue 1424703005: Remove JSBuiltinsObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 0a5c28c7be0ba6530b2056f49632af7dc1b2fd71..703df5d08b568706eeb66588d3bbf49fb93225f5 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -11656,7 +11656,13 @@ static int GetGlobalObjectsCount() {
int count = 0;
i::HeapIterator it(CcTest::heap());
for (i::HeapObject* object = it.next(); object != NULL; object = it.next())
- if (object->IsJSGlobalObject()) count++;
+ if (object->IsJSGlobalObject()) {
+ i::JSGlobalObject* g = i::JSGlobalObject::cast(object);
+ // Skip dummy global object.
+ if (i::GlobalDictionary::cast(g->properties())->NumberOfElements() != 0) {
+ count++;
+ }
+ }
// Subtract one to compensate for the code stub context that is always present
return count - 1;
}
« src/objects.h ('K') | « src/types.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698