Closed Bug 706710 Opened 13 years ago Closed 13 years ago

JS Correctness: Strict warning with -n vs no error without options

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gkw, Unassigned)

References

Details

(Keywords: regression, testcase, Whiteboard: js-triage-done)

void options('strict') try { ''.a++ } catch (e) {} on m-c changeset 95bca70369ef, without -n: js> void options('strict') js> try { ''.a++ } catch (e) {} NaN js> with -n: js> void options('strict') js> try { ''.a++ } catch (e) {} typein:3: strict warning: reference to undefined property "a" NaN js> autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: 76046:3273738a165e user: Brian Hackett date: Sat Jul 16 08:25:22 2011 -0700 summary: [INFER] Decompose property inc/dec ops for JM and TI, bug 647624.
Brian, can you take a look at this? Error vs. no error has potential for web compat problems.
The -n behavior is correct here. This is not an issue with "use strict" code but rather the special strict option used in some (all?) chrome code. The read of the undefined property is suppressed when executing as a fused PROPINC, but shows up as a normal property read in the decomposed version of the code. On trunk the latter is only used with -n, but after objshrink merges the decomposed version will always be executed and the warning should always appear (PROPINC will be a no-op).
Nice. Is there an ObjShrink bug this one can depend on?
Depends on: 684505
WFM on trunk with the objshrink merge, same warning regardless of options.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Flags: in-testsuite?
Whiteboard: js-triage-needed → js-triage-done
You need to log in before you can comment on or make changes to this bug.