cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walter Rumsby (JIRA)" <>
Subject [jira] [Commented] (CB-604) doesn't work in strict mode
Date Tue, 09 Oct 2012 20:12:03 GMT


Walter Rumsby commented on CB-604:

Looking into this, it seems like the problem is caused by the private [getTrace function|]
defined in the {{StackTrace}} module.

My guess is that when Weinre instruments the code it instruments strict mode code where accessing
{{caller}} is illegal. Walking the call stack (to get the stack trace) and strict mode are
[at odds with each other|],
so I'm not really sure how you could provide a strict mode compliant implementation without
there being an endorsed way of accessing the call stack. Maybe a browser extension could provide
a solution here (I'm speculating, I have no idea if that's possible)?

The current situation isn't great. I want to write my JavaScript using strict mode, it helps
identify errors and potential problems every day saving me a great deal of time. I also want
to use Weinre for those times I need to debug on a tablet, etc.

Would providing a distribution of Weinre that doesn't provide a Stack Trace be feasible? e.g.
Folks who use strict mode would load {{target-script-no-stacktrace-min.js}} rather than {{target-script-min.js}}.

> doesn't work in strict mode
> ---------------------------
>                 Key: CB-604
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>         Environment: ubuntu/windows
>            Reporter: hongbo lu
>            Assignee: Patrick Mueller
> weinre doesn't work in strict mode ,because it trys to access "func.caller" which isn't
allowed in strict mode

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message