Bug 1450856 - Fix PromptDelegate.onExternalResponse() for non-e10s r=esawin draft
authorJames Willcox <snorp@snorp.net>
Thu, 03 May 2018 12:26:40 -0500
changeset 791214 009dea315ca7590aa608df7165633b8db2406439
parent 791213 fb203484ee1ca062af67b381c0a95d648c32eabc
child 791262 f99a658222639cba3dfc41270143524e162c0e38
push id108736
push userbmo:snorp@snorp.net
push dateThu, 03 May 2018 19:25:10 +0000
reviewersesawin
bugs1450856
milestone61.0a1
Bug 1450856 - Fix PromptDelegate.onExternalResponse() for non-e10s r=esawin MozReview-Commit-ID: FFuX0fviAgj
mobile/android/components/geckoview/GeckoViewExternalAppService.js
--- a/mobile/android/components/geckoview/GeckoViewExternalAppService.js
+++ b/mobile/android/components/geckoview/GeckoViewExternalAppService.js
@@ -18,22 +18,20 @@ function ExternalAppService() {
 }
 
 ExternalAppService.prototype = {
   classID: Components.ID("{a89eeec6-6608-42ee-a4f8-04d425992f45}"),
   QueryInterface: ChromeUtils.generateQI([Ci.nsIExternalHelperAppService]),
 
   doContent(mimeType, request, context, forceSave) {
     const channel = request.QueryInterface(Ci.nsIChannel);
-    const mm = context.QueryInterface(Ci.nsIDocShell).tabChild.messageManager;
-
     debug `doContent: uri=${channel.URI.displaySpec}
                       contentType=${channel.contentType}`;
 
-    EventDispatcher.forMessageManager(mm).sendRequest({
+    GeckoViewUtils.getDispatcherForWindow(context).sendRequest({
       type: "GeckoView:ExternalResponse",
       uri: channel.URI.displaySpec,
       contentType: channel.contentType,
       contentLength: channel.contentLength,
       filename: channel.contentDispositionFilename
     });
 
     request.cancel(Cr.NS_ERROR_ABORT);