nsJSEnvironment doesn't pass in a valid source line for strict warning

NEW
Unassigned

Status

()

13 years ago
4 years ago

People

(Reporter: WeirdAl, Unassigned)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
x86
Windows XP
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
I hit this assertion after applying the patch for bug 312630.  In
nsJSEnvironment.cpp, it uses fileName.get(), which doesn't work as fileName is a
nsAutoString, and fileName.get doesn't exist.

00 ntdll!DbgBreakPoint
01 xpcom_core!nsDebugImpl::Break(char * aFile = 0x00df7350
"m:/mozilla/js/src/xpconnect/src/nsScriptError.cpp", int aLine = 132)+0x7e
02 xpcom_core!nsDebugImpl::Assertion(char * aStr = 0x00df7390 "Need a non-null
source code line for the console service!", char * aExpr = 0x00df7384
"sourceLine", char * aFile = 0x00df7350
"m:/mozilla/js/src/xpconnect/src/nsScriptError.cpp", int aLine = 132)+0x29e
03 xpcom_core!NSGlue_Assertion(char * aStr = 0x00df7390 "Need a non-null source
code line for the console service!", char * aExpr = 0x00df7384 "sourceLine",
char * aFile = 0x00df7350 "m:/mozilla/js/src/xpconnect/src/nsScriptError.cpp",
int aLine = 132)+0x4d
04 xpc3250!nsScriptError::Init(unsigned short * message = 0x0012e470, unsigned
short * sourceName = 0x0012e3d0, unsigned short * sourceLine = 0x00000000,
unsigned int lineNumber = 0x963, unsigned int columnNumber = 0, unsigned int
flags = 5, char * category = 0x01a005c0 "content javascript")+0x4a
05 gklayout!NS_ScriptErrorReporter(struct JSContext * cx = 0x02f40028, char *
message = 0x03545e20 "assignment to undeclared variable now", struct
JSErrorReport * report = 0x0012e5b4)+0x3c7
06 js3250!js_ReportErrorAgain(struct JSContext * cx = 0x02f40028, char * message
= 0x03545dc8 "assignment to undeclared variable now", struct JSErrorReport *
reportp = 0x0012e5b4)+0xc9
07 js3250!ReportError(struct JSContext * cx = 0x02f40028, char * message =
0x03545dc8 "assignment to undeclared variable now", struct JSErrorReport *
reportp = 0x0012e5b4)+0x4e
08 js3250!js_ReportErrorNumberVA(struct JSContext * cx = 0x02f40028, unsigned
int flags = 5, <function> * callback = 0x00c01efb, void * userRef = 0x00000000,
unsigned int errorNumber = 0x9c, int charArgs = 1, char * ap = 0x0012e624
"0lT???")+0xe3
...
(Reporter)

Comment 1

13 years ago
Whoops.  This was on the *second* assertion I added, not the first.
Summary: nsJSEnvironment doesn't pass in a valid URL for strict warning → nsJSEnvironment doesn't pass in a valid source line for strict warning
(Reporter)

Comment 2

13 years ago
This is really caused by jscntxt.c, through js_ReportErrorNumberVA and
ReportError.  This function initializes the JSErrorReport object (report), but
didn't set the uclinebuf property.
Assignee: general → general
Component: DOM → JavaScript Engine
QA Contact: ian → general
(Reporter)

Comment 3

13 years ago
I'm going to replace the assertion I would've added for bug 312630 with a
warning.  There's just too many instances to justify crashing the program.
Keywords: assertion

Updated

11 years ago
Blocks: 296661

Comment 4

11 years ago
Alex:  Is this bug INVALID, now?
(Reporter)

Comment 5

11 years ago
Ping me again this weekend, and I'll try to look.  This bug is three years old, now, and could probably use re-testing.  Although if the patch in the other bug hasn't bitrotted, I'll be astonished.
(Assignee)

Updated

4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.