Bug 1394580 - 6. Use WindowEventDispatcher for prompt if available; r=me
MozReview-Commit-ID: 3vRXlb4HWYq
--- a/mobile/android/components/geckoview/GeckoViewPrompt.js
+++ b/mobile/android/components/geckoview/GeckoViewPrompt.js
@@ -364,17 +364,17 @@ function PromptDelegate(aDomWin) {
if (!aDomWin) {
return;
}
let gvWin = aDomWin.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDocShell).QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
try {
- this._dispatcher = EventDispatcher.for(gvWin);
+ this._dispatcher = gvWin.WindowEventDispatcher || EventDispatcher.for(gvWin);
} catch (e) {
// Use global dispatcher.
}
}
PromptDelegate.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),