Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index be65add4b2515be163dfbef4c6442204c120681a..794f7b4a84cfa7c6a48aca1173fd26cbed6582c7 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -4094,6 +4094,18 @@ Local<String> Value::TypeOf(v8::Isolate* external_isolate) { |
return Utils::ToLocal(i::Object::TypeOf(isolate, Utils::OpenHandle(this))); |
} |
+Maybe<bool> Value::InstanceOf(v8::Local<v8::Context> context, |
+ v8::Local<v8::Object> object) { |
+ PREPARE_FOR_EXECUTION_PRIMITIVE(context, Value, InstanceOf, bool); |
+ auto left = Utils::OpenHandle(this); |
+ auto right = Utils::OpenHandle(*object); |
+ i::Handle<i::Object> result; |
+ has_pending_exception = |
+ !i::Object::InstanceOf(isolate, left, right).ToHandle(&result); |
+ RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); |
+ return Just(result->IsTrue(isolate)); |
+} |
+ |
Maybe<bool> v8::Object::Set(v8::Local<v8::Context> context, |
v8::Local<Value> key, v8::Local<Value> value) { |
PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, Set, bool); |
@@ -5287,7 +5299,6 @@ Local<v8::Value> Function::GetBoundFunction() const { |
return v8::Undefined(reinterpret_cast<v8::Isolate*>(self->GetIsolate())); |
} |
- |
int Name::GetIdentityHash() { |
auto self = Utils::OpenHandle(this); |
return static_cast<int>(self->Hash()); |