You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by pospi <gi...@git.apache.org> on 2014/08/29 06:29:35 UTC

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

GitHub user pospi opened a pull request:

    https://github.com/apache/cordova-weinre/pull/8

    Fix critical error in target device javascript

    This fixes javascript errors which cause the script to fail and results in targets never finding the weinre server.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pospi/cordova-weinre master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-weinre/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #8
    
----
commit ebad9397e87597dc466570be6317b032e2f9f496
Author: Sam Pospischil <sa...@crudigital.com.au>
Date:   2014-08-29T04:25:57Z

    fix for XHR object not being passed through to callback correctly

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pmuellr <gi...@git.apache.org>.
Github user pmuellr commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-53935458
  
    pospi - thx for the PR.   Can you [open a bug](https://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12312420&components=12316604&priority=3&issuetype=1) so we can track this?
    
    I guess this fix looks ok, but is a bit worrisome.  Is the problem that the readystatechange handler is not passed an event on some platform, or that the event that it's passed doesn't have the xhr as the event target?
    
    I assume the original code worked on *some* platform(s).
    
    Also worried about about requiring function.bind(); perhaps we should "bind by hand" with an additional function with the `this` in a closure?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pmuellr <gi...@git.apache.org>.
Github user pmuellr commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-53969321
  
    sorry, should page posted the commit as well:
    
    * https://github.com/apache/cordova-weinre/commit/f6c24acb6c897de9ab2c68af41e92d8c54b5717c


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pospi <gi...@git.apache.org>.
Github user pospi commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-54003764
  
    Oh it works just fine - provided you drink all the cool-aid and run OSX Mavericks or later. I refuse to so I wanted to be able to debug without having to go use somebody else's mac.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pospi <gi...@git.apache.org>.
Github user pospi commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-53982215
  
    Hey Patrick,
    
    Hah, beat me to it! Thanks for that (: I was going to put this together when I next got back to the office - the device affected was an iPad 4 (I believe iOS 7.1) and that's the only place where I have access to one. I guess it either references the xhr object elsewhere on the event or doesn't provide it; either way wrapping the reference in a closure should cover all bases. thanks again


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pmuellr <gi...@git.apache.org>.
Github user pmuellr commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-53992846
  
    Curious why you're using weinre for iPad when you could be using Web Inspector.  Does Web Inspector somehow not work in your environment?
    
    https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-weinre pull request: Fix critical error in target device j...

Posted by pmuellr <gi...@git.apache.org>.
Github user pmuellr commented on the pull request:

    https://github.com/apache/cordova-weinre/pull/8#issuecomment-53969191
  
    I've opened a bug for this:
    
        https://issues.apache.org/jira/browse/CB-7437
    
    I've got a slightly different patch, here:
    
    https://github.com/apache/cordova-weinre/blob/CB-7437/weinre.web/modules/weinre/common/WebSocketXhr.coffee#L204-L215
    
    Seems like it works to me, and doesn't require fn.bind().
    
    I'll merge in a few days, let me know if you have any issues with it.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---