[jira] [Commented] (CB-8838) WKWebView iosExec Results in Double Call
[ https://issues.apache.org/jira/browse/CB-8838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590810#comment-14590810 ] ASF GitHub Bot commented on CB-8838: Github user asfgit closed the pull request at: https://github.com/apache/cordova-ios/pull/136 WKWebView iosExec Results in Double Call Key: CB-8838 URL: https://issues.apache.org/jira/browse/CB-8838 Project: Apache Cordova Issue Type: Sub-task Components: CordovaJS, CordovaLib, iOS Affects Versions: 4.0.0 Reporter: Thomas Mouton Assignee: Shazron Abdullah Fix For: 4.0.0 Original Estimate: 4h Remaining Estimate: 4h When we invoke the cordova Barcode plugin, it is always called twice! I have only looked at the code a short time, but it appears to me that: * the first call to Barcode happens, and in iosExec, it gets placed in commandQueue. * the first call passes to Objective C world by WKScriptMessageHandler - (void)userContentController:(WKUserContentController*)userContentController didReceiveScriptMessage:(WKScriptMessage*)message * this call to Barcode does its thing, completes, and it's javascript response handler code winds through: CDVCommandDelegateImpl::sendPluginResult CDVCommandDelegateImpl::evalJSHelper CDVCommandDelegateImpl::evalJSHelper2 * in Helper2, the callback is finally passed to a webViewEngine, which processes the Javascript, and returns, on completion, a list of commands remaining in the javascript commandQueue. * these commands are queued on the Obj-C side and run in CDVCommandQueue fashion. AHA! * since the command was persisted in commandQueue before execution, and not removed, it is called again! SO I moved the enqueue behavior into the branch that excludes bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING This fixes it, but I am not confident its the right solution. Do you have any insight into this problem? Feedback for my solution? A broader or more appropriate venue for the conversation? Thanks! Alex Mouton -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8838) WKWebView iosExec Results in Double Call
[ https://issues.apache.org/jira/browse/CB-8838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14503968#comment-14503968 ] ASF subversion and git services commented on CB-8838: - Commit 183e3b8a231b3a39d17b97f34df9884fef05d72b in cordova-ios's branch refs/heads/4.0.x from [~mouton] [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=183e3b8 ] CB-8838 - Moved commandQueue push into non-WK_WEBVIEW_BINDING branch. (closes #136) WKWebView iosExec Results in Double Call Key: CB-8838 URL: https://issues.apache.org/jira/browse/CB-8838 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, CordovaLib, iOS Affects Versions: 4.0.0 Reporter: Thomas Mouton Original Estimate: 4h Remaining Estimate: 4h When we invoke the cordova Barcode plugin, it is always called twice! I have only looked at the code a short time, but it appears to me that: * the first call to Barcode happens, and in iosExec, it gets placed in commandQueue. * the first call passes to Objective C world by WKScriptMessageHandler - (void)userContentController:(WKUserContentController*)userContentController didReceiveScriptMessage:(WKScriptMessage*)message * this call to Barcode does its thing, completes, and it's javascript response handler code winds through: CDVCommandDelegateImpl::sendPluginResult CDVCommandDelegateImpl::evalJSHelper CDVCommandDelegateImpl::evalJSHelper2 * in Helper2, the callback is finally passed to a webViewEngine, which processes the Javascript, and returns, on completion, a list of commands remaining in the javascript commandQueue. * these commands are queued on the Obj-C side and run in CDVCommandQueue fashion. AHA! * since the command was persisted in commandQueue before execution, and not removed, it is called again! SO I moved the enqueue behavior into the branch that excludes bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING This fixes it, but I am not confident its the right solution. Do you have any insight into this problem? Feedback for my solution? A broader or more appropriate venue for the conversation? Thanks! Alex Mouton -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8838) WKWebView iosExec Results in Double Call
[ https://issues.apache.org/jira/browse/CB-8838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14503981#comment-14503981 ] ASF subversion and git services commented on CB-8838: - Commit b62fa440f6cda747a80d8f8ef3d2c426db092a32 in cordova-js's branch refs/heads/master from [~mouton] [ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=b62fa44 ] CB-8838 - Disabled commandQueue for WK_WEBVIEW_BINDING. (closes #107) WKWebView iosExec Results in Double Call Key: CB-8838 URL: https://issues.apache.org/jira/browse/CB-8838 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, CordovaLib, iOS Affects Versions: 4.0.0 Reporter: Thomas Mouton Assignee: Shazron Abdullah Fix For: 4.0.0 Original Estimate: 4h Remaining Estimate: 4h When we invoke the cordova Barcode plugin, it is always called twice! I have only looked at the code a short time, but it appears to me that: * the first call to Barcode happens, and in iosExec, it gets placed in commandQueue. * the first call passes to Objective C world by WKScriptMessageHandler - (void)userContentController:(WKUserContentController*)userContentController didReceiveScriptMessage:(WKScriptMessage*)message * this call to Barcode does its thing, completes, and it's javascript response handler code winds through: CDVCommandDelegateImpl::sendPluginResult CDVCommandDelegateImpl::evalJSHelper CDVCommandDelegateImpl::evalJSHelper2 * in Helper2, the callback is finally passed to a webViewEngine, which processes the Javascript, and returns, on completion, a list of commands remaining in the javascript commandQueue. * these commands are queued on the Obj-C side and run in CDVCommandQueue fashion. AHA! * since the command was persisted in commandQueue before execution, and not removed, it is called again! SO I moved the enqueue behavior into the branch that excludes bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING This fixes it, but I am not confident its the right solution. Do you have any insight into this problem? Feedback for my solution? A broader or more appropriate venue for the conversation? Thanks! Alex Mouton -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8838) WKWebView iosExec Results in Double Call
[ https://issues.apache.org/jira/browse/CB-8838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14503983#comment-14503983 ] ASF GitHub Bot commented on CB-8838: Github user asfgit closed the pull request at: https://github.com/apache/cordova-js/pull/107 WKWebView iosExec Results in Double Call Key: CB-8838 URL: https://issues.apache.org/jira/browse/CB-8838 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, CordovaLib, iOS Affects Versions: 4.0.0 Reporter: Thomas Mouton Assignee: Shazron Abdullah Fix For: 4.0.0 Original Estimate: 4h Remaining Estimate: 4h When we invoke the cordova Barcode plugin, it is always called twice! I have only looked at the code a short time, but it appears to me that: * the first call to Barcode happens, and in iosExec, it gets placed in commandQueue. * the first call passes to Objective C world by WKScriptMessageHandler - (void)userContentController:(WKUserContentController*)userContentController didReceiveScriptMessage:(WKScriptMessage*)message * this call to Barcode does its thing, completes, and it's javascript response handler code winds through: CDVCommandDelegateImpl::sendPluginResult CDVCommandDelegateImpl::evalJSHelper CDVCommandDelegateImpl::evalJSHelper2 * in Helper2, the callback is finally passed to a webViewEngine, which processes the Javascript, and returns, on completion, a list of commands remaining in the javascript commandQueue. * these commands are queued on the Obj-C side and run in CDVCommandQueue fashion. AHA! * since the command was persisted in commandQueue before execution, and not removed, it is called again! SO I moved the enqueue behavior into the branch that excludes bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING This fixes it, but I am not confident its the right solution. Do you have any insight into this problem? Feedback for my solution? A broader or more appropriate venue for the conversation? Thanks! Alex Mouton -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org