Closed Bug 1170139 Opened 10 years ago Closed 3 years ago

TypeError: access to strict mode caller function is censored - no code is pointed and no option to disable strict mode

Categories

(Core :: JavaScript Engine, defect)

38 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: basavarajnet, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 Build ID: 20150513174244 Steps to reproduce: I am using "self hosted SignalR proxy hub" with .net framework 4.5 as a client side service to login to a toolbar along with other functionalities. My application uses: 1. Asp.net Web Application (server side). 2. Self hosted SignalR proxy hub (creates dynamically and contains "use strict" code in it (client side) 3. Developed in .Net Framwork 4.5 4. js uses Ajax call. Actual results: As the application runs perfectly in all the bowsers including IE 11 and Chome 43 with no single error. BUT, fails to run in Firefox. "'SignalR proxy hub' stops after this error and no click events works". When developer F12 debugger window is opened to check the console for errors found the error as "TypeError: access to strict mode caller function is censored". No other information is mentioned. When opened the error related linked file found the error as "IIS 8.5 Detailed Error - 401.2 - Unauthorized"... where nothing is related. When I have searched the root cause, found that, "use strict" code present in the dynamically created SignalR proxy hub file is causing the problem and when that file modified outside by removing and using manually to check then, working fine. After this error, SignalR firing events stops in firefox and not in other browsers. As I found though out the google, no option to disable this strict option too. Expected results: Self hosted SignalR proxy hub which will generates dynamically stops immediately after this error and after that no click events works in Firefox. The problem was due to "use strict"; code in the dynamically generated file which will be present in every client who logs into the server. One more headache is, firefox doesn't show where exactly the error is and due to which type of code. Even after modifying the whole js code by following the guidlines of strict mode, not works in firefox. Even tested in different versions of firefox from 28 to 38, including esr 31, 31.* & 38.
Component: Untriaged → File Handling
Product: Firefox → Core
Component: File Handling → General
Not showing where the .caller access is happening sounds like a JS engine bug. The rest is simply how the JS language works. There is no option to disable strict mode just like there is no option to disable the existence of Array objects in JS.
Component: General → JavaScript Engine
Due to comments, we will be changing the bug from Unconfirmed to New so that items with a component no longer display unconfirmed
Status: UNCONFIRMED → NEW
Ever confirmed: true
That said, I can't reproduce the problem as reported. This testcase: <script> function f() { "use strict"; g(); } function g() { console.log(arguments.callee.caller); } f(); </script> correctly reports the file/line/column of the .caller access in the console.
Flags: needinfo?(basavarajnet)

Reporter didn't answer NI, therefore resolving as INCOMPLETE.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.