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

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: 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
« include/v8.h ('K') | « 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..2848f61403de84094b7bb56e5af10f9be11591be 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3515,6 +3515,15 @@ bool Value::SameValue(Local<Value> that) const {
return self->SameValue(*other);
}
+MaybeLocal<String> Value::TypeOf(v8::Local<v8::Context> context,
+ Local<Value> value) {
+ PREPARE_FOR_EXECUTION(context, "TypeOf", String);
+ i::Handle<i::String> result =
+ i::Object::TypeOf(isolate, Utils::OpenHandle(*value));
+ has_pending_exception = result.is_null();
+ 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) {
« include/v8.h ('K') | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698