Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: src/runtime/runtime-forin.cc

Issue 2129563002: [ForIn] Fix HasEnumerableProperty for Proxies with null prototype (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5181.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-forin.cc
diff --git a/src/runtime/runtime-forin.cc b/src/runtime/runtime-forin.cc
index e57016a6d39c847d2ea51bfc9630fc772cdd9f32..916ff17a9ebfd2c13083f82e25701549d209f0bd 100644
--- a/src/runtime/runtime-forin.cc
+++ b/src/runtime/runtime-forin.cc
@@ -65,7 +65,9 @@ MaybeHandle<Object> HasEnumerableProperty(Isolate* isolate,
Handle<Object> prototype;
ASSIGN_RETURN_ON_EXCEPTION(isolate, prototype,
JSProxy::GetPrototype(proxy), Object);
- if (prototype->IsNull(isolate)) break;
+ if (prototype->IsNull(isolate)) {
+ return isolate->factory()->undefined_value();
+ }
// We already have a stack-check in JSProxy::GetPrototype.
return HasEnumerableProperty(
isolate, Handle<JSReceiver>::cast(prototype), key);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5181.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698