Bug 1450856 - Fix PromptDelegate.onExternalResponse() for non-e10s r=esawin
MozReview-Commit-ID: FFuX0fviAgj
--- 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);