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

Unified Diff: src/api.cc

Issue 233233004: Handlify GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index aebb8d78d9d110171d89b62a418b8a0f51adfb3d..fde6bb67b8733291a516972dbcd0e7480624d7d4 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1948,8 +1948,10 @@ v8::Local<Value> v8::TryCatch::StackTrace() const {
i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_);
i::Handle<i::String> name = isolate_->factory()->stack_string();
if (!i::JSReceiver::HasProperty(obj, name)) return v8::Local<Value>();
- i::Handle<i::Object> value = i::Object::GetProperty(obj, name);
- if (value.is_null()) return v8::Local<Value>();
+ i::Handle<i::Object> value;
+ if (!i::Object::GetProperty(obj, name).ToHandle(&value)) {
+ return v8::Local<Value>();
+ }
return v8::Utils::ToLocal(scope.CloseAndEscape(value));
} else {
return v8::Local<Value>();
@@ -2044,8 +2046,8 @@ MUST_USE_RESULT static i::MaybeHandle<i::Object> CallV8HeapFunction(
i::Handle<i::String> fmt_str =
isolate->factory()->InternalizeUtf8String(name);
i::Handle<i::Object> object_fun =
- i::GlobalObject::GetPropertyNoExceptionThrown(
- isolate->js_builtins_object(), fmt_str);
+ i::Object::GetProperty(
+ isolate->js_builtins_object(), fmt_str).ToHandleChecked();
i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(object_fun);
return i::Execution::Call(isolate, fun, recv, argc, argv);
}
@@ -2175,7 +2177,7 @@ Local<StackFrame> StackTrace::GetFrame(uint32_t index) const {
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
i::Handle<i::JSArray> self = Utils::OpenHandle(this);
i::Handle<i::Object> obj =
- i::Object::GetElementNoExceptionThrown(isolate, self, index);
+ i::Object::GetElement(isolate, self, index).ToHandleChecked();
i::Handle<i::JSObject> jsobj = i::Handle<i::JSObject>::cast(obj);
return scope.Escape(Utils::StackFrameToLocal(jsobj));
}
@@ -2490,8 +2492,8 @@ static i::Object* LookupBuiltin(i::Isolate* isolate,
const char* builtin_name) {
i::Handle<i::String> string =
isolate->factory()->InternalizeUtf8String(builtin_name);
- return *i::GlobalObject::GetPropertyNoExceptionThrown(
- isolate->js_builtins_object(), string);
+ return *i::Object::GetProperty(
+ isolate->js_builtins_object(), string).ToHandleChecked();
}
@@ -7004,8 +7006,8 @@ Local<Value> Debug::GetMirror(v8::Handle<v8::Value> obj) {
isolate_debug->debug_context()->global_object());
i::Handle<i::String> name = isolate->factory()->InternalizeOneByteString(
STATIC_ASCII_VECTOR("MakeMirror"));
- i::Handle<i::Object> fun_obj = i::Object::GetProperty(debug, name);
- ASSERT(!fun_obj.is_null());
+ i::Handle<i::Object> fun_obj =
+ i::Object::GetProperty(debug, name).ToHandleChecked();
i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(fun_obj);
v8::Handle<v8::Function> v8_fun = Utils::ToLocal(fun);
const int kArgc = 1;
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698