Closed Bug 340893 Opened 19 years ago Closed 19 years ago

Strict warnings prevent the subscript loader from loading files

Categories

(Core :: XPConnect, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 340019

People

(Reporter: mrbkap, Assigned: dbradley)

Details

Mnyromyr reported this to me over IRC. I meant to look into it then, but didn't get a chance. I'm filing this to make sure that it doesn't get lost, here's the IRC log: 16:45 <%Mnyromyr> mrbkap: between the nightlies 2006-06-03 and 2006-06-04 the subscriptloader stops loading JS files that contain JS warnings, when javascript.options.strict is set. Is that a deliberate change? 17:32 <%Mnyromyr> the only checkin that looks suspicious in that timeframe is bug 326466 17:52 < mrbkap> Mnyromyr: Is there an easy way to reproduce? 17:52 <%Mnyromyr> mrbkap: yes 17:53 < mrbkap> Mnyromyr: What is it?! 17:57 <%Mnyromyr> mrbkap: put this function into a js file, eg. file:///f:/temp/test.js 17:57 <%Mnyromyr> function f(a) 17:57 <%Mnyromyr> { 17:57 <%Mnyromyr> var a = a; 17:57 <%Mnyromyr> } 17:57 <%Mnyromyr> then open the error console and enter this: 17:57 <%Mnyromyr> var o={}, l; try{l=Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader).loadSubScript("file:///f:/temp/test.js", o)}catch(x){x;};o.toSource(); 17:57 <%Mnyromyr> if strict JS is turned on, the object o will be empty in 2006-06-04, but contain the subscript file in 2006-06-03
I bet this is simply bug 340019. Mnyromyr, can you test that patch to see if it helps?
(In reply to comment #1) > I bet this is simply bug 340019. Mnyromyr, can you test that patch > to see if it helps? In Sunbird trunk build containing the second fix from bug 340019 the example given above works. I see the js warning and the output from o is "({f:function f(a) {var a = a;}})". This patch also fixes blocked bug 340881.
Depends on: 340019
> I bet this is simply bug 340019. Mnyromyr, can you test that patch to see if it > helps? Yes, attachment 224138 [details] [diff] [review] fixes the issue: I now get a strict warning and o contains the file's content.
This really was bug 340019. *** This bug has been marked as a duplicate of 340019 ***
Status: NEW → RESOLVED
Closed: 19 years ago
No longer depends on: 340019
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.