Summary: | ES5 strict mode bugs | ||
---|---|---|---|
Product: | WebKit | Reporter: | kangax <kangax> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | barraclough, erights, ggaren, oliver |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.6 | ||
URL: | http://kangax.github.com/es5-compat-table/strict-mode/ | ||
Bug Depends on: | 47788, 47791, 47833 | ||
Bug Blocks: |
Description
kangax
2010-10-14 08:37:40 PDT
The tests being: __i_dont_exist = 1; is a ReferenceError arguments++; is a SyntaxError (function(){ return this === undefined; })(); (function(){ return this === undefined; }).call(); Fixing the reference error for global properties at the moment __i_dont_exist = blah should now be fixed. pre-/post-fix operations on arguments are now disallowed. i've got the null vs. undefined |this| fix up for review now And now the undefined vs null patch is landed. kangax are there any other problems you've found? Hey Oliver. I don't have this fresh build yet, but the previous one seems to also fail to set strict mode for eval code (in certain cases). For example: (function(){ "use strict"; eval('with({ }) { }') })(); // no error To quote 10.1.1: "Eval code is strict eval code if it begins with a Directive Prologue that contains a Use Strict Directive or if the call to eval is a direct call (see 15.1.2.1.1) to the eval function that is contained in strict mode code." Note "direct call [...] contained in strict mode code". So based on my understanding (and actually, FF4 behavior) this should throw error, but currently doesn't. (In reply to comment #7) > Hey Oliver. > > I don't have this fresh build yet, but the previous one seems to also fail to set strict mode for eval code (in certain cases). For example: > > (function(){ "use strict"; eval('with({ }) { }') })(); // no error Was this in the inspector? I'm seeing weird behaviour where code in the inspectors console fails to trigger strict mode (In reply to comment #8) > (In reply to comment #7) > > Hey Oliver. > > > > I don't have this fresh build yet, but the previous one seems to also fail to set strict mode for eval code (in certain cases). For example: > > > > (function(){ "use strict"; eval('with({ }) { }') })(); // no error > > Was this in the inspector? I'm seeing weird behaviour where code in the inspectors console fails to trigger strict mode Ah. yes it was. Doesn't happen when run from within <script> element. Well, then I have nothing else as far as strict mode. Will file bugs if I find anything. (In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #7) > > > Hey Oliver. > > > > > > I don't have this fresh build yet, but the previous one seems to also fail to set strict mode for eval code (in certain cases). For example: > > > > > > (function(){ "use strict"; eval('with({ }) { }') })(); // no error > > > > Was this in the inspector? I'm seeing weird behaviour where code in the inspectors console fails to trigger strict mode > > Ah. yes it was. Doesn't happen when run from within <script> element. > > Well, then I have nothing else as far as strict mode. Will file bugs if I find anything. I just landed a fix for the Function constructor which should appear in the next nightly I think I'm seeing browser crash under strict mode. Filed a separate bug for it — https://bugs.webkit.org/show_bug.cgi?id=48109 Oliver, can you please take a look? All the strict mode tests pass for me in ToT. |