[CB-604] - weinre doesn't work in strict mode
https://issues.apache.org/jira/browse/CB-604
diff --git a/weinre.doc/ChangeLog.body.html b/weinre.doc/ChangeLog.body.html
index 54b8e31..efd43df 100644
--- a/weinre.doc/ChangeLog.body.html
+++ b/weinre.doc/ChangeLog.body.html
@@ -46,6 +46,7 @@
<li><a href="https://issues.apache.org/jira/browse/CB-294">CB-294</a> - various exceptions thrown in the target in WeinreTargetEventsImpl.connectionCreated()
<li><a href="https://issues.apache.org/jira/browse/CB-315">CB-315</a> - generate valid Apache release artifact names
<li><a href="https://issues.apache.org/jira/browse/CB-540">CB-540</a> - ability to easily navigate to particular place in DOM via bookmarks/jump to selector
+<li><a href="https://issues.apache.org/jira/browse/CB-604">CB-604</a> - weinre doesn't work in strict mode
<li><a href="https://issues.apache.org/jira/browse/CB-873">CB-873</a> - setTimeout() and setInterval() usage with string arguments is busted
<li><a href="https://issues.apache.org/jira/browse/CB-984">CB-984</a> - cannot install weinre with Node 0.8.0
<li><a href="https://issues.apache.org/jira/browse/CB-1666">CB-1666</a> - "INVALID_STATE_ERR: DOM Exception 11" with chbrody/Cordova-SQLitePlugin
diff --git a/weinre.web/demo/weinre-demo-strict.html b/weinre.web/demo/weinre-demo-strict.html
index 292f8ef..5a34ec3 100644
--- a/weinre.web/demo/weinre-demo-strict.html
+++ b/weinre.web/demo/weinre-demo-strict.html
@@ -20,6 +20,7 @@
<html>
<head>
+<script>"use strict"</script>
<meta name="viewport" content="user-scalable=no, width=device-width, height=device-height">
<title>weinre non-minified strict demo</title>
<link rel="stylesheet" href="weinre-demo.css">
diff --git a/weinre.web/demo/weinre-demo-strict.js b/weinre.web/demo/weinre-demo-strict.js
index d7101d2..50514d2 100644
--- a/weinre.web/demo/weinre-demo-strict.js
+++ b/weinre.web/demo/weinre-demo-strict.js
@@ -17,7 +17,7 @@
* under the License.
*/
-"use strict"
+"use strict";
//------------------------------------------------------------------------------
var started = false
diff --git a/weinre.web/modules/weinre/common/StackTrace.coffee b/weinre.web/modules/weinre/common/StackTrace.coffee
index 08350e1..bcbb552 100644
--- a/weinre.web/modules/weinre/common/StackTrace.coffee
+++ b/weinre.web/modules/weinre/common/StackTrace.coffee
@@ -59,7 +59,10 @@
return result
visitedFuncs.push func
- func = func.caller
+ try
+ func = func.caller
+ catch err
+ func = null
result
diff --git a/weinre.web/modules/weinre/common/WebSocketXhr.coffee b/weinre.web/modules/weinre/common/WebSocketXhr.coffee
index 4fc86db..50ead99 100644
--- a/weinre.web/modules/weinre/common/WebSocketXhr.coffee
+++ b/weinre.web/modules/weinre/common/WebSocketXhr.coffee
@@ -115,7 +115,7 @@
#---------------------------------------------------------------------------
send: (data) ->
unless typeof data == "string"
- throw new Ex(arguments, @constructor.name + "." + @caller)
+ throw new Ex(arguments, @constructor.name + ".send")
@_queuedSends.push data
return if @_sendInProgress