Bug 930452 - GeckoView busted by HelperApps.jsm again r=blassey
authorMark Finkle <mfinkle@mozilla.com>
Thu, 24 Oct 2013 07:20:07 -0400
changeset 152075 50b017bc4a01adb494d96f6492420b06468c49d0
parent 152074 677fb0cd248c525381197bd5c0c9b05082e7634f
child 152076 a5fe1b3e8f7908930f1bcfe4ad920e6e50261454
push id25515
push usercbook@mozilla.com
push dateFri, 25 Oct 2013 09:21:40 +0000
treeherdermozilla-central@dff937614268 [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);
   },
 };