Closed
Bug 1074571
Opened 10 years ago
Closed 10 years ago
The delete operator should trigger TDZ
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: shu, Assigned: shu)
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file)
2.60 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
I missed this completely.
Attachment #8497194 -
Flags: review?(jwalden+bmo)
Comment 2•10 years ago
|
||
Comment on attachment 8497194 [details] [diff] [review]
Make the delete operator trigger TDZ.
Review of attachment 8497194 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit-test/tests/basic/letTDZDelete.js
@@ +10,5 @@
> +
> +assertThrowsReferenceError(function () { delete x; let x; });
> +
> +// FIXME bug 611388
> +//assertThrowsReferenceError(function () { delete x; const x; });
Make this something like
function constIsLexical()
{
try {
(function() { parseInt(z); const z; })();
return false;
} catch (e) {
return true;
}
}
// FIXME do this unconditionally when bug 611388 is fixt
if (constIsLexical())
assertThrowsReferenceError(function () { delete x; const x; });
so that this test complains vocally and *forces* itself to be updated when const is made lexical.
Attachment #8497194 -
Flags: review?(jwalden+bmo) → review+
Updated•10 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Assignee: nobody → shu
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment 5•10 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Temporal_dead_zone
https://developer.mozilla.org/en-US/Firefox/Releases/36#JavaScript
Doc review appreciated (as always).
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•