Bug 371174 - "Warning: redeclaration of property", caused by function redeclarations
authorKarsten Düsterloh <mnyromyr@tprac.de>
Mon, 08 Oct 2012 22:56:25 +0200
changeset 11280 7758230a3ffc5349a7cdcda4f2b27f7b67a5b8a2
parent 11279 91352cac87f32cf2123a6566b3d89ef57916ca00
child 11281 03fd0a59e409678b458f714e45e75cfba1c82e47
push id8442
push usermnyromyr@tprac.de
push dateMon, 08 Oct 2012 20:57:17 +0000
treeherdercomm-central@7758230a3ffc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs371174
Bug 371174 - "Warning: redeclaration of property", caused by function redeclarations
editor/ui/composer/content/ComposerCommands.js
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -1344,16 +1344,26 @@ var gEditorOutputProgressListener =
     var promptServ = GetPromptService();
     if (!promptServ)
      return 0;
 
     return promptServ.confirmEx(window, dlgTitle, text, btnFlags,
                         btn0Title, btn1Title, btn2Title,
                         checkBoxLabel, checkVal);
   },
+
+  /*************************************************************************
+   * gEditorOutputProgressListener needs to implement both nsIPrompt       *
+   * (providing alert) and nsIAuthPrompt (providing password saving).      *
+   * Unfortunately, both interfaces specify prompt/promptPassword/         *
+   * promptUsernameAndPassword, albeit with conflicting method signatures. *
+   * Luckily, though, we only make use of their nsIAuthPrompt variants,    *
+   * hence we can comment out the nsIPrompt ones here to avoid JavaScript  *
+   * strict mode clutter. See bug 371174 for more information.             *
+   *************************************************************************
   prompt : function(dlgTitle, text, inoutText, checkBoxLabel, checkObj)
   {
     var promptServ = GetPromptService();
     if (!promptServ)
      return false;
 
     return promptServ.prompt(window, dlgTitle, text, inoutText, checkBoxLabel, checkObj);
   },
@@ -1387,16 +1397,18 @@ var gEditorOutputProgressListener =
   promptUsernameAndPassword : function(dlgTitle, text, userObj, pwObj, checkBoxLabel, savePWObj)
   {
     var ret = PromptUsernameAndPassword(dlgTitle, text, savePWObj.value, userObj, pwObj);
     if (!ret)
       setTimeout(CancelPublishing, 0);
 
     return ret;
   },
+   *************************************************************************/
+
   select : function(dlgTitle, text, count, selectList, outSelection)
   {
     var promptServ = GetPromptService();
     if (!promptServ)
       return false;
 
     return promptServ.select(window, dlgTitle, text, count, selectList, outSelection);
   },