RESOLVED INVALID 19523
delete does not work in javascript
https://bugs.webkit.org/show_bug.cgi?id=19523
Summary delete does not work in javascript
Eric Seidel (no email)
Reported 2008-06-12 14:55:50 PDT
delete does not work in javascript <script> var a = 1; delete a; alert(a); </script> This throws a reference error in FF, not in Safari.
Attachments
Oliver Hunt
Comment 1 2008-07-02 02:31:19 PDT
var declarations aren't deletable, per spec. Firefox agrees with this. I would close as invalid, but there is one case we do fuck up: <script> a = 1; </script> <script> var a; delete a; alert(a); </script> the existing a should prevent the creation of a new static slot for a, so the delete should succeed in this case.
Oliver Hunt
Comment 2 2008-07-02 02:37:34 PDT
Happily we've already fixed this bug. Closing as invalid because the original bug was not valid, and my updated bug was actaully already fixed.
Cameron Zwarich (cpst)
Comment 3 2008-07-02 03:09:17 PDT
I added a test for the second scenario that Oliver mentioned in r34952, because we did not have any existing coverage of this case.
Note You need to log in before you can comment on or make changes to this bug.