Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ef627d027f6475b03760d621ddb5dbe271ac54e3..ea2edbce9cbe77a1d1c9d03f0092d7e50e5cd63f 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5832,7 +5832,7 @@ Local<Object> Array::CloneElementAt(uint32_t index) { |
bool Value::IsPromise() const { |
i::Handle<i::Object> val = Utils::OpenHandle(this); |
- if (!val->IsJSObject()) return false; |
+ if (!i::FLAG_harmony_promises || !val->IsJSObject()) return false; |
i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(val); |
i::Isolate* isolate = obj->GetIsolate(); |
LOG_API(isolate, "IsPromise"); |