Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master 6b99fb96f -> 49757716f


CB-9150 Fix InAppBrowser executeScript crash on Windows if no data returned


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/49757716
Tree: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/49757716
Diff: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/49757716

Branch: refs/heads/master
Commit: 49757716f556c7c87713f2f81469ab394c887b12
Parents: 6b99fb9
Author: sgrebnov <v-seg...@microsoft.com>
Authored: Tue Nov 17 11:42:55 2015 +0300
Committer: sgrebnov <v-seg...@microsoft.com>
Committed: Tue Nov 17 11:42:55 2015 +0300

----------------------------------------------------------------------
 src/windows/InAppBrowserProxy.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/49757716/src/windows/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js
index 817516e..fc037bd 100644
--- a/src/windows/InAppBrowserProxy.js
+++ b/src/windows/InAppBrowserProxy.js
@@ -1,4 +1,4 @@
-/*
+/*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -247,7 +247,8 @@ var IAB = {
         if (isWebViewAvailable && browserWrap && popup) {
             var op = popup.invokeScriptAsync("eval", code);
             op.oncomplete = function (e) {
-                var result = [e.target.result];
+                // return null if event target is unavailable by some reason
+                var result = (e && e.target) ? [e.target.result] : [null];
                 hasCallback && win(result);
             };
             op.onerror = function () { };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to