Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index b435826f9a3e2321980382bf1c7038d7bb0e55bb..8798e409788a4af0dc274c305197c0a1b25f256e 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -7238,8 +7238,11 @@ bool Promise::HasHandler() { |
i::Isolate* isolate = promise->GetIsolate(); |
LOG_API(isolate, Promise, HasRejectHandler); |
ENTER_V8(isolate); |
- i::Handle<i::Symbol> key = isolate->factory()->promise_has_handler_symbol(); |
- return i::JSReceiver::GetDataProperty(promise, key)->IsTrue(isolate); |
+ if (promise->IsJSPromise()) { |
+ i::Handle<i::JSPromise> js_promise = i::Handle<i::JSPromise>::cast(promise); |
+ return js_promise->has_handler(); |
+ } |
+ return false; |
} |