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

Unified Diff: test/cctest/test-mark-compact.cc

Issue 12716010: Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed rest Created 7 years, 9 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-mark-compact.cc
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc
index ab819b7362e82cee61557ef0bd996c66022e4fee..4640599aab213370a4472381d97eea011ef1e480 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -47,7 +47,6 @@ static v8::Persistent<v8::Context> env;
static void InitializeVM() {
if (env.IsEmpty()) env = v8::Context::New();
- v8::HandleScope scope;
env->Enter();
}
@@ -92,7 +91,7 @@ TEST(Promotion) {
InitializeVM();
- v8::HandleScope sc;
+ v8::HandleScope sc(env->GetIsolate());
// Allocate a fixed array in the new space.
int array_size =
@@ -120,7 +119,7 @@ TEST(NoPromotion) {
// the old space
InitializeVM();
- v8::HandleScope sc;
+ v8::HandleScope sc(env->GetIsolate());
// Do a mark compact GC to shrink the heap.
HEAP->CollectGarbage(OLD_POINTER_SPACE);
@@ -158,7 +157,7 @@ TEST(NoPromotion) {
TEST(MarkCompactCollector) {
InitializeVM();
- v8::HandleScope sc;
+ v8::HandleScope sc(env->GetIsolate());
// call mark-compact when heap is empty
HEAP->CollectGarbage(OLD_POINTER_SPACE);
@@ -320,7 +319,7 @@ TEST(ObjectGroups) {
GlobalHandles* global_handles = Isolate::Current()->global_handles();
NumberOfWeakCalls = 0;
- v8::HandleScope handle_scope;
+ v8::HandleScope handle_scope(env->GetIsolate());
Handle<Object> g1s1 =
global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
@@ -456,7 +455,7 @@ TEST(EmptyObjectGroups) {
InitializeVM();
GlobalHandles* global_handles = Isolate::Current()->global_handles();
- v8::HandleScope handle_scope;
+ v8::HandleScope handle_scope(env->GetIsolate());
Handle<Object> object =
global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());

Powered by Google App Engine
This is Rietveld 408576698