| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 6e1123e36bdc41992a5ae7b076fff8ab62104d0f..4f16120df33ddbb4d096c4a3a33820b911986833 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -6090,7 +6090,16 @@
|
|
|
| bool Value::IsPromise() const {
|
| auto self = Utils::OpenHandle(this);
|
| - return i::Object::IsPromise(self);
|
| + if (!self->IsJSObject()) return false;
|
| + auto js_object = i::Handle<i::JSObject>::cast(self);
|
| + // Promises can't have access checks.
|
| + if (js_object->map()->is_access_check_needed()) return false;
|
| + auto isolate = js_object->GetIsolate();
|
| + // TODO(dcarney): this should just be read from the symbol registry so as not
|
| + // to be context dependent.
|
| + auto key = isolate->promise_status();
|
| + // Shouldn't be possible to throw here.
|
| + return i::JSObject::HasRealNamedProperty(js_object, key).FromJust();
|
| }
|
|
|
|
|
| @@ -7385,18 +7394,6 @@
|
| }
|
|
|
|
|
| -MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate,
|
| - Local<Value> value) {
|
| - i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| - ENTER_V8(isolate);
|
| - i::Handle<i::Object> val = Utils::OpenHandle(*value);
|
| - i::Handle<i::JSArray> result;
|
| - if (!i::Runtime::GetInternalProperties(isolate, val).ToHandle(&result))
|
| - return MaybeLocal<Array>();
|
| - return Utils::ToLocal(result);
|
| -}
|
| -
|
| -
|
| Handle<String> CpuProfileNode::GetFunctionName() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
|
|
|