incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hongbo lu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-604) doesn't work in strict mode
Date Thu, 13 Sep 2012 11:46:07 GMT

    [ https://issues.apache.org/jira/browse/CB-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454828#comment-13454828
] 

hongbo lu commented on CB-604:
------------------------------

it's simple to reproduce it, create an index.html:
<html>
<head></head>
<body>
<script type="text/javascript" src="http://localhost:8080/target/target-script-min.js#anonymous"></script>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"></script>

<script type="text/javascript">
    'use strict';
    require(["dojo/request"],function(request){
        dojo.xhrGet({
            url:"./index.html"
        }).then(function(d){
                        alert(d);
                    });
    })
</script>
</body>
</html>

while trying to use httpRequest, it throws error:

TypeError: Illegal access to a strict mode caller function.


the error lines are:

in Google Chrome:

modjewel.define.getTrace           target-script-min.js:1049
StackTrace                         target-script-min.js:1008
modjewel.define.module.exports.NetworkRequest.installNativeHooks.HookSites.XMLHttpRequest_open.addHooks.before
                    target-script-min.js:2820
modjewel.define.callBeforeHooks    target-script-min.js:567
modjewel.define.hookedFunction     target-script-min.js:543

in Firefox:

TypeError: func is undefined
[Break On This Error] 	

hookedFunction.displayName = func.displayName || func.name;  target...-min.js (line 554)


                
> doesn't work in strict mode
> ---------------------------
>
>                 Key: CB-604
>                 URL: https://issues.apache.org/jira/browse/CB-604
>             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: http://www.atlassian.com/software/jira

Mime
View raw message