Bug 930452 - GeckoView busted by HelperApps.jsm again r=blassey
authorMark Finkle <mfinkle@mozilla.com>
Thu, 24 Oct 2013 07:20:07 -0400
changeset 165890 50b017bc4a01adb494d96f6492420b06468c49d0
parent 165889 677fb0cd248c525381197bd5c0c9b05082e7634f
child 165891 a5fe1b3e8f7908930f1bcfe4ad920e6e50261454
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs930452
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 930452 - GeckoView busted by HelperApps.jsm again r=blassey
mobile/android/modules/HelperApps.jsm
--- a/mobile/android/modules/HelperApps.jsm
+++ b/mobile/android/modules/HelperApps.jsm
@@ -70,17 +70,21 @@ var HelperApps =  {
     return results;
   },
 
   getAppsForUri: function getAppsForUri(uri, flags = { filterHttp: true }) {
     flags.filterHttp = "filterHttp" in flags ? flags.filterHttp : true;
 
     // Query for apps that can/can't handle the mimetype
     let msg = this._getMessage("Intent:GetHandlers", uri, flags);
-    let apps = this._parseApps(this._sendMessage(msg).apps);
+    let data = this._sendMessage(msg);
+    if (!data)
+      return [];
+
+    let apps = this._parseApps(data.apps);
 
     if (flags.filterHttp) {
       apps = apps.filter(function(app) {
         return app.name && !this.defaultHttpHandlers[app.name];
       }, this);
     }
 
     return apps;
@@ -127,13 +131,12 @@ var HelperApps =  {
       packageName: app.packageName,
       className: app.activityName
     });
 
     this._sendMessage(msg);
   },
 
   _sendMessage: function(msg) {
-    Services.console.logStringMessage("Sending: " + JSON.stringify(msg));
     let res = Services.androidBridge.handleGeckoMessage(JSON.stringify(msg));
     return JSON.parse(res);
   },
 };