Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index cbcbe5b7ccab8c51e0ed20afa4198c66bb5cc83c..ca50778d195f06d974ff2e50328086d9ef0a831b 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5822,7 +5822,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"); |