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

Unified Diff: src/api.cc

Issue 2603493002: Remove duplicate C++ implementation of Object.prototype.toString (Closed)
Patch Set: Created 4 years 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/objects.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 db56c3f795e903ca69e6e3a4a314ae365201565b..c9e4d996df5a3f146c467860344693a5045dd197 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4475,12 +4475,14 @@ MaybeLocal<Array> v8::Object::GetOwnPropertyNames(Local<Context> context,
MaybeLocal<String> v8::Object::ObjectProtoToString(Local<Context> context) {
PREPARE_FOR_EXECUTION(context, Object, ObjectProtoToString, String);
- auto obj = Utils::OpenHandle(this);
- Local<String> result;
+ auto self = Utils::OpenHandle(this);
+ Local<Value> result;
has_pending_exception =
- !ToLocal<String>(i::JSObject::ObjectProtoToString(isolate, obj), &result);
+ !ToLocal<Value>(i::Execution::Call(isolate, isolate->object_to_string(),
+ self, 0, nullptr),
+ &result);
RETURN_ON_FAILED_EXECUTION(String);
- RETURN_ESCAPED(result);
+ RETURN_ESCAPED(Local<String>::Cast(result));
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698