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

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Michael Daumling, Unassigned)

Tracking

({fixed1.8, js1.5})

Trunk
x86
Windows XP
fixed1.8, js1.5
Points:
---
Bug Flags:
blocking1.8b5 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [has approval])

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
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
(Reporter)

Comment 1

13 years ago
Created attachment 194487 [details] [diff] [review]
Patch provided by Brendan Eich.

Fixes the bug - I get compiler warnings from within an eval()
Attachment #194487 - Flags: review+
(Reporter)

Comment 2

13 years ago
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+

Updated

13 years ago
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+

Comment 6

13 years ago
Somebody should mark bug 247077 as a duplicate.
*** Bug 247077 has been marked as a duplicate of this bug. ***

Updated

13 years ago
Whiteboard: [has approval]
I fixed this the other day, trunk and branch.  Thanks for the report and review,
Michael!

/be
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Keywords: fixed1.8, js1.5
Resolution: --- → FIXED

Comment 9

13 years ago
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.