Created attachment 304306 [details] [diff] [review] Fix it We should be passing 1, not 0, as the line number to JS_CompileScriptForPrincipals.
Comment on attachment 304306 [details] [diff] [review] Fix it Any more 0 linenos lurking? /be
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.
Fixed. Please file followups on the other things that need changing as needed (per comment 2).
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Duplicate of this bug: 389370
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.