Bug 611553 - Android: Make DOMWillOpenModalDialog a chrome-only event. r=mbrubeck, a=bajaj
☠☠ backed out by ed6e1f9f2243 ☠ ☠
authorFrank Yan <fyan@mozilla.com>
Wed, 16 Jan 2013 13:10:20 -0800
changeset 123874 e8d9ae8dbb72c8c5f1bcbaef344abe950ba7b3bc
parent 123873 58bbcf8b460a78621a621945ed07574a0f07ebdf
child 123875 237990d8bcba5dbb6674d290ed8ade690e74de98
push id3301
push userryanvm@gmail.com
push dateTue, 05 Feb 2013 01:50:32 +0000
treeherdermozilla-aurora@89432f14d306 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck, bajaj
bugs611553
milestone20.0a2
Bug 611553 - Android: Make DOMWillOpenModalDialog a chrome-only event. r=mbrubeck, a=bajaj
mobile/android/components/PromptService.js
--- a/mobile/android/components/PromptService.js
+++ b/mobile/android/components/PromptService.js
@@ -756,17 +756,19 @@ let PromptUtils = {
 
   fireDialogEvent: function(aDomWin, aEventName) {
     // accessing the document object can throw if this window no longer exists. See bug 789888.
     try {
       if (!aDomWin.document)
         return;
       let event = aDomWin.document.createEvent("Events");
       event.initEvent(aEventName, true, true);
-      aDomWin.dispatchEvent(event);
+      let winUtils = aDomWin.QueryInterface(Ci.nsIInterfaceRequestor)
+                           .getInterface(Ci.nsIDOMWindowUtils);
+      winUtils.dispatchEventToChromeOnly(aDomWin, event);
     } catch(ex) {
     }
   }
 };
 
 XPCOMUtils.defineLazyGetter(PromptUtils, "passwdBundle", function () {
   return Services.strings.createBundle("chrome://passwordmgr/locale/passwordmgr.properties");
 });