Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11330

handleBridgeChange infinite loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.1.1
    • Fix Version/s: None
    • Component/s: cordova-ios
    • Labels:
      None

      Description

      hello there

      1. i upload cordova ios js file to remote severs
      2. and from cdviewcontroller load remote page, it include cordova.js
      3. and then i found handleBridgeChange has infinite loop:

      function handleBridgeChange() {
          if (execProxy !== cordovaExec()) {
              var commandString = commandQueue.shift();
              while(commandString) {
                  var command = JSON.parse(commandString);
                  var callbackId = command[0];
                  var service = command[1];
                  var action = command[2];
                  var actionArgs = command[3];
                  var callbacks = cordova.callbacks[callbackId] || {};
                  
                  execProxy(callbacks.success, callbacks.fail, service, action, actionArgs);
                  
                  commandString = commandQueue.shift();
              };
              return true;
          }
          
          return false;
      }
      

      i found execProxy !== cordovaExec all time is true
      and execProxy push commandString to commandQueue again
      so while infinite loop

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shazron Shazron Abdullah
                Reporter:
                leeboo leeboo
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: