RESOLVED FIXED 50431
|delete name| in strict mode code should be an early error
https://bugs.webkit.org/show_bug.cgi?id=50431
Summary |delete name| in strict mode code should be an early error
Jeff Walden (remove +bwo to email)
Reported 2010-12-02 18:56:15 PST
ES5 16: "An early error is an error that can be detected and reported prior to the evaluation of any construct in the Program containing the error. An implementation must report early errors in a Program prior to the first evaluation of that Program." A name always evaluates to either an unresolvable Reference or a Reference with an environment record as its base. But an object environment record's HasBinding method calls [[HasProperty]] and through it [[GetProperty]]. Neither of these in the spec has any side effect, nor does either terminate abruptly (ignoring OOM and the like), so only host objects matter. But it seems clear enough that going down the rat's nest just for host objects (or for proxies should they reach full standardization) is a bad idea, so |delete name| should just be an early error. This is also how it's implemented in SpiderMonkey.
Attachments
Patch (4.07 KB, patch)
2010-12-20 16:23 PST, Oliver Hunt
ggaren: review+
Oliver Hunt
Comment 1 2010-12-20 16:05:45 PST
fixing now.
Oliver Hunt
Comment 2 2010-12-20 16:23:22 PST
Geoffrey Garen
Comment 3 2010-12-20 16:39:02 PST
Comment on attachment 77050 [details] Patch r=me if you delete deleteProperty and related code.
Oliver Hunt
Comment 4 2010-12-20 17:02:48 PST
Note You need to log in before you can comment on or make changes to this bug.