Closed
Bug 418491
Opened 16 years ago
Closed 16 years ago
[FIX]JS component loader's line numbers are off by 1
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
3.90 KB,
patch
|
brendan
:
review+
brendan
:
superreview+
brendan
:
approval1.9+
|
Details | Diff | Splinter Review |
We should be passing 1, not 0, as the line number to JS_CompileScriptForPrincipals.
Attachment #304306 -
Flags: superreview?(brendan)
Attachment #304306 -
Flags: review?(brendan)
Comment 1•16 years ago
|
||
Comment on attachment 304306 [details] [diff] [review] Fix it Any more 0 linenos lurking? /be
Attachment #304306 -
Flags: superreview?(brendan)
Attachment #304306 -
Flags: superreview+
Attachment #304306 -
Flags: review?(brendan)
Attachment #304306 -
Flags: review+
Attachment #304306 -
Flags: approval1.9+
Assignee | ||
Comment 2•16 years ago
|
||
The following JSAPI consumers pass 0 for lineno: * JS_CompileScriptForPrincipals - JSSh (compiling a memory buffer with no useful filename) * JS_CompileUCFunctionForPrincipals - Event handler compilation when the event target has no associated document or that document has no URI. - <script event="..." for="..."> when the <script> didn't come from the parser. * JS_EvaluteScript - The extensions/pref/autoconfig extension * JS_EvaluteScriptForPrincipals - nsCryptoRunnable::Run (null filename here too) * JS_EvaluteUCScriptForPrincipals - Liveconnect (in both places it calls this function) - xpc_EvalInSandbox if called when there is no nsIStackFrame on the current XPConnect JS stack - The NPAPI _evaluate callback Your call on which of these are bogus. I'd tend to think that the NPAPI, sandbox, liveconnect, crypto, and autoconfig callers are and that we don't care about the rest. We also have a number of callers (e.g. event handlers) who just pass 1 for lack of anything better.
Assignee | ||
Comment 3•16 years ago
|
||
Fixed. Please file followups on the other things that need changing as needed (per comment 2).
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 5•16 years ago
|
||
Zero offset is gone in 1.9b4 rc. Thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•