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

Unified Diff: src/api.cc

Issue 1589323002: [runtime] Unify the ToObject handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/builtins.cc » ('j') | src/builtins.cc » ('J')
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 6be11f412dadf12b1846711160ad597cb7fb1e86..4a7c73409a195e8351c9ed0c217dfe7775df5e0a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2931,11 +2931,11 @@ Local<String> Value::ToDetailString(Isolate* isolate) const {
MaybeLocal<Object> Value::ToObject(Local<Context> context) const {
auto obj = Utils::OpenHandle(this);
- if (obj->IsJSObject()) return ToApiHandle<Object>(obj);
+ if (obj->IsJSReceiver()) return ToApiHandle<Object>(obj);
PREPARE_FOR_EXECUTION(context, "ToObject", Object);
Local<Object> result;
has_pending_exception =
- !ToLocal<Object>(i::Execution::ToObject(isolate, obj), &result);
+ !ToLocal<Object>(i::Object::ToObject(isolate, obj), &result);
RETURN_ON_FAILED_EXECUTION(Object);
RETURN_ESCAPED(result);
}
« no previous file with comments | « no previous file | src/builtins.cc » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698