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

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

Issue 4100005: Version 2.5.2 (Closed)
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
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 96549a37e7fa06a91942cc39119fd2490c2978db..b424b7f9e1483571ac7c6f9abd76572c50d1c390 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -98,7 +98,7 @@ static void InitializeVM() {
}
-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 @@ static double Inc(int x) {
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 @@ static double Add(int x, int y) {
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 @@ static double Abs(int x) {
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 @@ static double Sum(int n) {
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 @@ TEST(Stuff) {
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 @@ TEST(UncaughtThrow) {
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 @@ TEST(C2JSFrames) {
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