[Webkit-unassigned] [Bug 65523] LayoutTests should not declare a global "var undefined; "

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 2 14:13:39 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=65523





--- Comment #8 from jkummerow at chromium.org  2011-08-02 14:13:39 PST ---
(In reply to comment #7)

I said: Firefox throws when you redeclare a const, and V8 doesn't distinguish internally between consts and read-only properties of the global object, so it'll throw also when redeclaring a read-only property of the global object.

This code will throw in Firefox:
<script>
const undefined;
var undefined;  // <- exception
alert("boo");
</script>

Regardless of this, the proposed patch doesn't break anything, as the removed declarations are ignored anyway (or at least *should* be ignored, and indeed are at least on Firefox and bleeding-edge V8; I'm at home now and don't have Safari around for testing):
<script>
var undefined = 42;
alert("undefined: " + undefined);  // prints "undefined: undefined"
</script>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list