Skip to content

Commit

Permalink
CB-8838 - Moved commandQueue push into non-WK_WEBVIEW_BINDING branch. (
Browse files Browse the repository at this point in the history
…closes #136)
  • Loading branch information
AlexMouton authored and shazron committed Apr 20, 2015
1 parent e655e30 commit 183e3b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions CordovaLib/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,14 +970,14 @@ function iOSExec() {

var command = [callbackId, service, action, actionArgs];

// Stringify and queue the command. We stringify to command now to
// effectively clone the command arguments in case they are mutated before
// the command is executed.
commandQueue.push(JSON.stringify(command));

if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) {
window.webkit.messageHandlers.cordova.postMessage(command);
} else {
// Stringify and queue the command. We stringify to command now to
// effectively clone the command arguments in case they are mutated before
// the command is executed.
commandQueue.push(JSON.stringify(command));

// If we're in the context of a stringByEvaluatingJavaScriptFromString call,
// then the queue will be flushed when it returns; no need for a poke.
// Also, if there is already a command in the queue, then we've already
Expand Down
10 changes: 5 additions & 5 deletions cordova-js-src/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ function iOSExec() {

var command = [callbackId, service, action, actionArgs];

// Stringify and queue the command. We stringify to command now to
// effectively clone the command arguments in case they are mutated before
// the command is executed.
commandQueue.push(JSON.stringify(command));

if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) {
window.webkit.messageHandlers.cordova.postMessage(command);
} else {
// Stringify and queue the command. We stringify to command now to
// effectively clone the command arguments in case they are mutated before
// the command is executed.
commandQueue.push(JSON.stringify(command));

// If we're in the context of a stringByEvaluatingJavaScriptFromString call,
// then the queue will be flushed when it returns; no need for a poke.
// Also, if there is already a command in the queue, then we've already
Expand Down

0 comments on commit 183e3b8

Please sign in to comment.