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

Unified Diff: src/api.cc

Issue 235943007: Handlify Object::ToObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase 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/factory.h » ('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 bce5f67bf51b0b01e36ea7d9c822495b8eb75e51..bdc0c4f45e388bef4d820ab52b63b231d505e2ca 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5579,7 +5579,8 @@ Local<v8::Value> v8::NumberObject::New(Isolate* isolate, double value) {
LOG_API(i_isolate, "NumberObject::New");
ENTER_V8(i_isolate);
i::Handle<i::Object> number = i_isolate->factory()->NewNumber(value);
- i::Handle<i::Object> obj = i_isolate->factory()->ToObject(number);
+ i::Handle<i::Object> obj =
+ i::Object::ToObject(i_isolate, number).ToHandleChecked();
return Utils::ToLocal(obj);
}
@@ -5602,7 +5603,8 @@ Local<v8::Value> v8::BooleanObject::New(bool value) {
? isolate->heap()->true_value()
: isolate->heap()->false_value(),
isolate);
- i::Handle<i::Object> obj = isolate->factory()->ToObject(boolean);
+ i::Handle<i::Object> obj =
+ i::Object::ToObject(isolate, boolean).ToHandleChecked();
return Utils::ToLocal(obj);
}
@@ -5621,8 +5623,8 @@ Local<v8::Value> v8::StringObject::New(Handle<String> value) {
EnsureInitializedForIsolate(isolate, "v8::StringObject::New()");
LOG_API(isolate, "StringObject::New");
ENTER_V8(isolate);
- i::Handle<i::Object> obj =
- isolate->factory()->ToObject(Utils::OpenHandle(*value));
+ i::Handle<i::Object> obj = i::Object::ToObject(
+ isolate, Utils::OpenHandle(*value)).ToHandleChecked();
return Utils::ToLocal(obj);
}
@@ -5642,8 +5644,8 @@ Local<v8::Value> v8::SymbolObject::New(Isolate* isolate, Handle<Symbol> value) {
EnsureInitializedForIsolate(i_isolate, "v8::SymbolObject::New()");
LOG_API(i_isolate, "SymbolObject::New");
ENTER_V8(i_isolate);
- i::Handle<i::Object> obj =
- i_isolate->factory()->ToObject(Utils::OpenHandle(*value));
+ i::Handle<i::Object> obj = i::Object::ToObject(
+ i_isolate, Utils::OpenHandle(*value)).ToHandleChecked();
return Utils::ToLocal(obj);
}
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698