[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


--- 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:
const undefined;
var undefined;  // <- exception

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):
var undefined = 42;
alert("undefined: " + undefined);  // prints "undefined: undefined"

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