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

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

Issue 229973004: Remove calls to non-handlified version of GetProperty(name). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: update Created 6 years, 8 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 | « src/runtime.cc ('k') | test/cctest/test-heap.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 5482a44d0584098e8b6fa48f2d3da338fa6be779..d14978297cf13a711d0270dcbc35bfda971209cf 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -36,11 +36,12 @@
using namespace v8::internal;
-static MaybeObject* GetGlobalProperty(const char* name) {
+static Handle<Object> GetGlobalProperty(const char* name) {
Isolate* isolate = CcTest::i_isolate();
Handle<String> internalized_name =
isolate->factory()->InternalizeUtf8String(name);
- return isolate->context()->global_object()->GetProperty(*internalized_name);
+ return GlobalObject::GetPropertyNoExceptionThrown(
+ isolate->global_object(), internalized_name);
}
@@ -85,7 +86,7 @@ static double Inc(Isolate* isolate, int x) {
Handle<JSObject> global(isolate->context()->global_object());
Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->ToObjectChecked()->Number();
+ return GetGlobalProperty("result")->Number();
}
@@ -106,7 +107,7 @@ static double Add(Isolate* isolate, int x, int y) {
Handle<JSObject> global(isolate->context()->global_object());
Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->ToObjectChecked()->Number();
+ return GetGlobalProperty("result")->Number();
}
@@ -126,7 +127,7 @@ static double Abs(Isolate* isolate, int x) {
Handle<JSObject> global(isolate->context()->global_object());
Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->ToObjectChecked()->Number();
+ return GetGlobalProperty("result")->Number();
}
@@ -147,7 +148,7 @@ static double Sum(Isolate* isolate, int n) {
Handle<JSObject> global(isolate->context()->global_object());
Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- return GetGlobalProperty("result")->ToObjectChecked()->Number();
+ return GetGlobalProperty("result")->Number();
}
@@ -204,7 +205,7 @@ TEST(Stuff) {
Execution::Call(
CcTest::i_isolate(), fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- CHECK_EQ(511.0, GetGlobalProperty("r")->ToObjectChecked()->Number());
+ CHECK_EQ(511.0, GetGlobalProperty("r")->Number());
}
@@ -250,11 +251,10 @@ TEST(C2JSFrames) {
isolate, fun0, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- Object* foo_string = isolate->factory()->InternalizeOneByteString(
- STATIC_ASCII_VECTOR("foo"))->ToObjectChecked();
- MaybeObject* fun1_object = isolate->context()->global_object()->
- GetProperty(String::cast(foo_string));
- Handle<Object> fun1(fun1_object->ToObjectChecked(), isolate);
+ Handle<String> foo_string = isolate->factory()->InternalizeOneByteString(
+ STATIC_ASCII_VECTOR("foo"));
+ Handle<Object> fun1 = Object::GetProperty(
+ isolate->global_object(), foo_string);
CHECK(fun1->IsJSFunction());
Handle<Object> argv[] = { isolate->factory()->InternalizeOneByteString(
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698