Bug 1394580 - 6. Use WindowEventDispatcher for prompt if available; r=jchen
authorJim Chen <nchen@mozilla.com>
Tue, 05 Sep 2017 21:26:32 -0400
changeset 379096 be2d4180503168ed1ec5b657b312ca37bfbc2efb
parent 379095 b3b76444d58d39739c4b41ebe236023b57c55449
child 379097 1576df4c449ce07ba05a1aa0b0dc9eb4ca35fea7
push id32448
push userarchaeopteryx@coole-files.de
push dateWed, 06 Sep 2017 09:24:33 +0000
treeherdermozilla-central@c6e59f1b2e27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1394580
milestone57.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 1394580 - 6. Use WindowEventDispatcher for prompt if available; r=jchen MozReview-Commit-ID: 3vRXlb4HWYq
mobile/android/components/geckoview/GeckoViewPrompt.js
--- 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]),