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

Unified Diff: test/cctest/test-object-observe.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
« src/objects.h ('K') | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-object-observe.cc
diff --git a/test/cctest/test-object-observe.cc b/test/cctest/test-object-observe.cc
index 81edf3f40feee4dc69a5e07f0bc8ca8fb5468e3d..6019199bb39634bd4857a1c4ce15e6f7b6461b4d 100644
--- a/test/cctest/test-object-observe.cc
+++ b/test/cctest/test-object-observe.cc
@@ -752,8 +752,15 @@ 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++;
- return 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;
}
@@ -794,7 +801,7 @@ TEST(DontLeakContextOnObserve) {
}
CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(2);
+ CheckSurvivingGlobalObjectsCount(1);
}
@@ -817,7 +824,7 @@ TEST(DontLeakContextOnGetNotifier) {
}
CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(2);
+ CheckSurvivingGlobalObjectsCount(1);
}
@@ -848,7 +855,7 @@ TEST(DontLeakContextOnNotifierPerformChange) {
}
CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(2);
+ CheckSurvivingGlobalObjectsCount(1);
}
« src/objects.h ('K') | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698