Closed Bug 306633 Opened 19 years ago Closed 19 years ago

JSOPTION_STRICT: Compiler warnings are not reported from within eval()

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: daumling, Unassigned)

References

Details

(Keywords: fixed1.8, js1.5, Whiteboard: [has approval])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

When setting JSOPTION_STRICT, all compiler warnings should be reported, but
warnings from within a scripted eval() call  are not. In jsscan.c, line 708, the
statement if (cx->interplevel != 0) turns off error erporting.

Reproducible: Always

Steps to Reproduce:
1. Launch jshell
2. type in: options ("strict")
3. set a C++ breakpoint at my_ErrorReporter in js.c
4. type in: eval ('super=5')

Actual Results:  
Breakpoint is not hit

Expected Results:  
breakpoint should be hit
Fixes the bug - I get compiler warnings from within an eval()
Attachment #194487 - Flags: review+
Bug found in Mozilla 1.8 branch.
Easy fix, should get into 1.8 at this stage.  Anyone disagree?

/be
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.8b5+
Attachment #194487 - Flags: superreview?(shaver)
Comment on attachment 194487 [details] [diff] [review]
Patch provided by Brendan Eich.

sr=shaver
Attachment #194487 - Flags: superreview?(shaver) → superreview+
Comment on attachment 194487 [details] [diff] [review]
Patch provided by Brendan Eich.

Getting this in for 1.8b4.

/be
Attachment #194487 - Flags: approval1.8b4+
Somebody should mark bug 247077 as a duplicate.
*** Bug 247077 has been marked as a duplicate of this bug. ***
Whiteboard: [has approval]
I fixed this the other day, trunk and branch.  Thanks for the report and review,
Michael!

/be
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8, js1.5
Resolution: --- → FIXED
Checking in regress-306633.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-306633.js,v  <--  regress-306633.js
initial revision: 1.1
done
Flags: testcase+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: