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

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

Issue 23661004: add isolate parameter for Execution::Call (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 3 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 | « test/cctest/test-parsing.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-random.cc
diff --git a/test/cctest/test-random.cc b/test/cctest/test-random.cc
index 2f7ab7dd344ef954a1847f2e20d647655a70f417..804546a03e315057ce26376f38d851dc69030ea7 100644
--- a/test/cctest/test-random.cc
+++ b/test/cctest/test-random.cc
@@ -53,8 +53,8 @@ void TestSeeds(Handle<JSFunction> fun,
Handle<ByteArray> seeds(context->random_seed());
SetSeeds(seeds, state0, state1);
- Handle<Object> value =
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<Object> value = Execution::Call(
+ context->GetIsolate(), fun, global, 0, NULL, &has_pending_exception);
CHECK(value->IsHeapNumber());
CHECK(fun->IsOptimized());
double crankshaft_value = HeapNumber::cast(*value)->value();
@@ -70,11 +70,12 @@ TEST(CrankshaftRandom) {
v8::V8::Initialize();
// Skip test if crankshaft is disabled.
if (!Isolate::Current()->use_crankshaft()) return;
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope scope(isolate);
- v8::Context::Scope context_scope(v8::Context::New(isolate));
+ v8::Isolate* v8_isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope scope(v8_isolate);
+ v8::Context::Scope context_scope(v8::Context::New(v8_isolate));
- Handle<Context> context(Isolate::Current()->context());
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ Handle<Context> context(isolate->context());
Handle<JSObject> global(context->global_object());
Handle<ByteArray> seeds(context->random_seed());
bool has_pending_exception;
@@ -88,8 +89,8 @@ TEST(CrankshaftRandom) {
Handle<JSFunction> fun(JSFunction::cast(fun_object->ToObjectChecked()));
// Optimize function.
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
if (!fun->IsOptimized()) fun->MarkForLazyRecompilation();
// Test with some random values.
@@ -100,7 +101,7 @@ TEST(CrankshaftRandom) {
// Test that we bail out to runtime when seeds are uninitialized (zeros).
SetSeeds(seeds, 0, 0);
Handle<Object> value =
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(value->IsHeapNumber());
CHECK(fun->IsOptimized());
double crankshaft_value = HeapNumber::cast(*value)->value();
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698