[Webkit-unassigned] [Bug 202485] typeof (function that masquerades as undefined) is "function", should be "undefined"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 3 09:46:19 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=202485
Alexey Shvayka <shvaikalesh at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |shvaikalesh at gmail.com
Resolution|--- |DUPLICATE
--- Comment #4 from Alexey Shvayka <shvaikalesh at gmail.com> ---
(In reply to Oz from comment #3)
> PASS: typeof window.openDatabase is undefined
> PASS: typeof window.openDatabase is function
>
> Both can't be true.
Nicely noted, thank you.
That discrepancy was made possible due to peephole optimization in BytecodeGenerator::emitEqualityOpImpl(), which detects patterns like `typeof X === "Y"` and emits different bytecodes depending on Y.
r265907 fixed the `typeof X === "function"` bytecode op to return `false` for masquerader (aka [[IsHTMLDDA]]) objects.
test262 coverage was added in https://github.com/tc39/test262/pull/2706.
*** This bug has been marked as a duplicate of bug 215572 ***
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201203/f0f56770/attachment.htm>
More information about the webkit-unassigned
mailing list