<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Regression(r197648): JSObject::setPrototypeWithCycleCheck() allows for cycles but the rest of the code base does not"
href="https://bugs.webkit.org/show_bug.cgi?id=161534#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Regression(r197648): JSObject::setPrototypeWithCycleCheck() allows for cycles but the rest of the code base does not"
href="https://bugs.webkit.org/show_bug.cgi?id=161534">bug 161534</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=161534#c2">comment #2</a>)
<span class="quote">> > Yeah, we should teach the rest of the engine that it's OK to have cycles
> > in the "getPrototypeDirect" chain.
> > Currently, inside JSC itself, this will never happen. However, I guess we
> > need to
> > teach it this w.r.t the HTML spec.
>
> That's a pretty big change. Are we sure we need to allow cycles? What's the
> expected behavior if you find a cycle? Is it specified?</span >
Note that even without my patch, it is fairly trivial to end up with an infinite loop since r197648 allows for cycles:
<script>
var target = {
__proto__: null
};
var proxy = new Proxy(target, {});
Object.prototype.__proto__ = {
__proto__: proxy,
};
var a = {};
a.test;
</script>
This seems to infinite loop for me on ToT, no DOM involved.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>