<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - calling super() a second time in a constructor should throw"
href="https://bugs.webkit.org/show_bug.cgi?id=151113#c40">Comment # 40</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - calling super() a second time in a constructor should throw"
href="https://bugs.webkit.org/show_bug.cgi?id=151113">bug 151113</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=276498&action=diff" name="attach_276498" title="Patch">attachment 276498</a> <a href="attachment.cgi?id=276498&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=276498&action=review">https://bugs.webkit.org/attachment.cgi?id=276498&action=review</a>
Thanks for review
<span class="quote">>> Source/JavaScriptCore/ChangeLog:14
>> + that is used to check if 'this' is empty.
>
> I think the phrasing of the changelog would be clearer as:
>
> Currently, our implementation checks if 'super()' was called in a constructor more than once and raises a RuntimeError before the second call. According to the spec we need to raise an error just after the second super() is finished and before the new 'this' is assigned <a href="https://esdiscuss.org/topic/duplicate-super-call-behaviour">https://esdiscuss.org/topic/duplicate-super-call-behaviour</a>. To implement this behavior this patch adds a new op code, op_is_empty, that is used to check if 'this' is empty.</span >
Yeah, fixed. English is not my mother tongue language. Thanks!
<span class="quote">>> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1097
>> + }
>
> I think this case is wrong. If the abstract interpreter has no information then child.m_type will be SpecNone (0) and this case will convert the IsEmpty check into a constant. I think a correct condition would be "child.m_type && !(child.m_type & ~SpecEmpty)".</span >
Done</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>