Permalink
Browse files

Fix #13335. Remove "use strict".

  • Loading branch information...
dmethvin committed Feb 1, 2013
1 parent 115143b commit 0e2977583c0455eda940a28b2499cad2cbf24ee4
Showing with 6 additions and 2 deletions.
  1. +0 −1 src/.jshintrc
  2. +6 −1 src/intro.js
@@ -4,7 +4,6 @@
"newcap": false,
"quotmark": "double",
"regexdash": true,
"strict": true,
"trailing": true,
"undef": true,
"unused": true,
@@ -12,4 +12,9 @@
* Date: @DATE
*/
(function( window, undefined ) {
"use strict";
// Can't do this because several apps including ASP.NET trace

This comment has been minimized.

@jdalton

jdalton Feb 4, 2013

Member

Should this be a 2.0 concern? This seems like a tooling issue. Is there a Firefox bugzilla issue to track?
I'd hate to see "use strict" avoided. /cc @rwldrn

This comment has been minimized.

@dmethvin

dmethvin Feb 4, 2013

Member

1.x and 2.x need to stay in functional sync to the greatest extent possible. This isn't an issue that affects only oldIE or other obsolete browsers left behind in 2.0. It's a difference between the way strict and non-strict code expect to be able to trace through stacks using the .callee property. We tend to think of "use strict" as being only a static-scoped concern but here's a case where it affects code outside the scope. Technically it seems possible to proscribe its use inside strict scope but allow it outside non-strict scope, even when tracing through strict code on the call stack, but that's not the current state of affairs with Firefox at least, and perhaps Chrome.

This comment has been minimized.

@jdalton

jdalton Feb 4, 2013

Member

K, do you know if there are Chrome/Firefox issues tracking this?
It seems like something they'd want to be aware of since it's affecting the adoption of use strict.

// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//"use strict";

6 comments on commit 0e29775

@dmethvin

This comment has been minimized.

Member

dmethvin replied Feb 4, 2013

I just looked but didn't find a ticket for Firefox or Chrome. Not sure if this is anticipated behavior or not, but I agree it messes up adoption of use strict since you can never know when strictifying your own code will hose something that is called back from it. The big impact seems to be coming from ASP.NET forms and window.onerror handlers that use the info to generate stack traces.

@jdalton

This comment has been minimized.

Member

jdalton replied Feb 4, 2013

Ok, cool. I've passed it along.

@rwaldron

This comment has been minimized.

Member

rwaldron replied Feb 4, 2013

@jdalton, I showed this issue to @lukehoban last week as well and he sent it along to them as well... hopefully they'll notice how much this is bumming us out.

@sunnylost

This comment has been minimized.

sunnylost replied Jun 4, 2013

In the comments I think it would be " arguments.callee.caller" but not " arguments.caller.callee".

@mgol

This comment has been minimized.

Member

mgol replied Jun 4, 2013

@sunnylost, nice catch. @rwldrn, any news on this subject?

@rwaldron

This comment has been minimized.

Member

rwaldron replied Jun 4, 2013

@mzgol wish I could say so, but I haven't heard anything from the MS devs that I consulted with—ill reach out and find out what I can

Please sign in to comment.