Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 5d6727a0a486ac794405deb13e42657c29d97a73..e8dc7f6e6c0b6c94e8355d66dbc961c226b85988 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -4491,7 +4491,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_HasProperty) { |
if (args[0]->IsJSReceiver()) { |
JSReceiver* receiver = JSReceiver::cast(args[0]); |
CONVERT_CHECKED(String, key, args[1]); |
- if (receiver->HasProperty(key)) return isolate->heap()->true_value(); |
+ bool result = receiver->HasProperty(key); |
+ if (isolate->has_pending_exception()) return Failure::Exception(); |
+ return isolate->heap()->ToBoolean(result); |
} |
return isolate->heap()->false_value(); |
} |