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

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

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
===================================================================
--- test/cctest/test-compiler.cc (revision 5696)
+++ test/cctest/test-compiler.cc (working copy)
@@ -98,7 +98,7 @@
}
-static Object* GetGlobalProperty(const char* name) {
+static MaybeObject* GetGlobalProperty(const char* name) {
Handle<String> symbol = Factory::LookupAsciiSymbol(name);
return Top::context()->global()->GetProperty(*symbol);
}
@@ -140,7 +140,7 @@
Handle<JSObject> global(Top::context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->Number();
+ return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -161,7 +161,7 @@
Handle<JSObject> global(Top::context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->Number();
+ return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -181,7 +181,7 @@
Handle<JSObject> global(Top::context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->Number();
+ return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -202,7 +202,7 @@
Handle<JSObject> global(Top::context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->Number();
+ return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -256,7 +256,7 @@
Handle<JSObject> global(Top::context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- CHECK_EQ(511.0, GetGlobalProperty("r")->Number());
+ CHECK_EQ(511.0, GetGlobalProperty("r")->ToObjectChecked()->Number());
}
@@ -272,7 +272,7 @@
Handle<Object> result =
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(has_pending_exception);
- CHECK_EQ(42.0, Top::pending_exception()->Number());
+ CHECK_EQ(42.0, Top::pending_exception()->ToObjectChecked()->Number());
}
@@ -297,10 +297,10 @@
Execution::Call(fun0, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- Handle<Object> fun1 =
- Handle<Object>(
- Top::context()->global()->GetProperty(
- *Factory::LookupAsciiSymbol("foo")));
+ Object* foo_symbol = Factory::LookupAsciiSymbol("foo")->ToObjectChecked();
+ MaybeObject* fun1_object =
+ Top::context()->global()->GetProperty(String::cast(foo_symbol));
+ Handle<Object> fun1(fun1_object->ToObjectChecked());
CHECK(fun1->IsJSFunction());
Object** argv[1] = {
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698