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

Unified Diff: src/api.cc

Issue 1829833002: [V8] Add v8::Value::TypeOf to API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Changed to non static Created 4 years, 9 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 | « include/v8.h ('k') | test/cctest/test-api.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 8c8f5df13714e2f73a71967c25a4651bf8830b61..7ca2a371172e6ed4d2eebee5c0510ca62aeddb79 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3515,6 +3515,14 @@ bool Value::SameValue(Local<Value> that) const {
return self->SameValue(*other);
}
+MaybeLocal<String> Value::TypeOf(v8::Local<v8::Context> context) {
+ PREPARE_FOR_EXECUTION(context, "TypeOf", String);
+ i::Handle<i::String> result =
+ i::Object::TypeOf(isolate, Utils::OpenHandle(this));
+ has_pending_exception = result.is_null();
jochen (gone - plz use gerrit) 2016/03/30 16:15:13 sorry for not catching this earlier, but as far as
kozy 2016/05/06 17:03:13 Rewritten without PREPATE_FOR_EXECUTION
+ RETURN_ON_FAILED_EXECUTION(String);
+ RETURN_ESCAPED(Utils::ToLocal(result));
+}
Maybe<bool> v8::Object::Set(v8::Local<v8::Context> context,
v8::Local<Value> key, v8::Local<Value> value) {
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698