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

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

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 years, 10 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-assembler-x64.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 0cca0c4fb2a5b52044e43633b050fdead2ec28f8..e7b294ac3bd2c8ec225b03becff2c5634856ce4f 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -101,9 +101,9 @@ static MaybeObject* GetGlobalProperty(const char* name) {
static void SetGlobalProperty(const char* name, Object* value) {
Isolate* isolate = Isolate::Current();
- Handle<Object> object(value);
- Handle<String> symbol = FACTORY->LookupUtf8Symbol(name);
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
+ Handle<Object> object(value, isolate);
+ Handle<String> symbol = isolate->factory()->LookupUtf8Symbol(name);
+ Handle<JSObject> global(isolate->context()->global_object());
SetProperty(isolate, global, symbol, object, NONE, kNonStrictMode);
}
@@ -265,11 +265,11 @@ TEST(UncaughtThrow) {
Handle<JSFunction> fun = Compile(source);
CHECK(!fun.is_null());
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
+ Isolate* isolate = fun->GetIsolate();
+ Handle<JSObject> global(isolate->context()->global_object());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(has_pending_exception);
- CHECK_EQ(42.0, Isolate::Current()->pending_exception()->
- ToObjectChecked()->Number());
+ CHECK_EQ(42.0, isolate->pending_exception()->ToObjectChecked()->Number());
}
@@ -287,6 +287,7 @@ TEST(C2JSFrames) {
Handle<JSFunction> fun0 = Compile(source);
CHECK(!fun0.is_null());
+ Isolate* isolate = fun0->GetIsolate();
// Run the generated code to populate the global object with 'foo'.
bool has_pending_exception;
@@ -297,9 +298,9 @@ TEST(C2JSFrames) {
Object* foo_symbol =
FACTORY->LookupOneByteSymbol(STATIC_ASCII_VECTOR("foo"))->
ToObjectChecked();
- MaybeObject* fun1_object = Isolate::Current()->context()->global_object()->
+ MaybeObject* fun1_object = isolate->context()->global_object()->
GetProperty(String::cast(foo_symbol));
- Handle<Object> fun1(fun1_object->ToObjectChecked());
+ Handle<Object> fun1(fun1_object->ToObjectChecked(), isolate);
CHECK(fun1->IsJSFunction());
Handle<Object> argv[] =
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698