Bug 1017820 - Remove the classinfo for DOMWindowUtils; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 29 May 2014 22:45:47 -0400
changeset 205002 c7a5fd3f26e95eb88160f4ba4fde79f497946294
parent 205001 f6e327f9749cc79f685996d7fe9e97c85adf5e3d
child 205003 db25dbf0e8d013026886bb5a5d7457d48d7b9856
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1017820
milestone32.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 1017820 - Remove the classinfo for DOMWindowUtils; r=bzbarsky
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/base/nsDOMWindowUtils.cpp
dom/tests/mochitest/bugs/mochitest.ini
dom/tests/mochitest/bugs/test_bug397571.html
dom/tests/mochitest/general/test_interfaces.html
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -44,17 +44,16 @@
 #include "nsGlobalWindow.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMEvent.h"
 #include "nsIDOMEventListener.h"
 #include "nsContentUtils.h"
 #include "nsCxPusher.h"
-#include "nsIDOMWindowUtils.h"
 #include "nsIDOMGlobalPropertyInitializer.h"
 #include "nsLocation.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Telemetry.h"
 
 // Window scriptable helper includes
 #include "nsIDocShell.h"
 #include "nsIScriptExternalNameSet.h"
@@ -348,19 +347,16 @@ static nsDOMClassInfoData sClassInfoData
 
   NS_DEFINE_CLASSINFO_DATA(CSSSupportsRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   // other SVG classes
   NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
-  NS_DEFINE_CLASSINFO_DATA(WindowUtils, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-
   NS_DEFINE_CLASSINFO_DATA(XSLTProcessor, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(XPathExpression, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(XPathNSResolver, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(XPathResult, nsDOMGenericSH,
@@ -858,20 +854,16 @@ nsDOMClassInfo::Init()
 
   DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
     DOM_CLASSINFO_WINDOW_MAP_ENTRIES
 #ifdef MOZ_WEBSPEECH
     DOM_CLASSINFO_MAP_ENTRY(nsISpeechSynthesisGetter)
 #endif
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(WindowUtils, nsIDOMWindowUtils)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowUtils)
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(Location, nsIDOMLocation)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMLocation)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(DOMPrototype, nsIDOMDOMConstructor)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMConstructor)
   DOM_CLASSINFO_MAP_END
 
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -41,19 +41,16 @@ DOMCI_CLASS(TreeColumn)
 #endif
 
 DOMCI_CLASS(CSSMozDocumentRule)
 DOMCI_CLASS(CSSSupportsRule)
 
 // other SVG classes
 DOMCI_CLASS(SVGNumber)
 
-// WindowUtils
-DOMCI_CLASS(WindowUtils)
-
 // XSLTProcessor
 DOMCI_CLASS(XSLTProcessor)
 
 // DOM Level 3 XPath objects
 DOMCI_CLASS(XPathExpression)
 DOMCI_CLASS(XPathNSResolver)
 DOMCI_CLASS(XPathResult)
 
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -98,23 +98,20 @@ using namespace mozilla::dom;
 using namespace mozilla::layers;
 using namespace mozilla::widget;
 using namespace mozilla::gfx;
 
 class gfxContext;
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
 
-DOMCI_DATA(WindowUtils, nsDOMWindowUtils)
-
 NS_INTERFACE_MAP_BEGIN(nsDOMWindowUtils)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMWindowUtils)
   NS_INTERFACE_MAP_ENTRY(nsIDOMWindowUtils)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WindowUtils)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_ADDREF(nsDOMWindowUtils)
 NS_IMPL_RELEASE(nsDOMWindowUtils)
 
 nsDOMWindowUtils::nsDOMWindowUtils(nsGlobalWindow *aWindow)
 {
   nsCOMPtr<nsISupports> supports = do_QueryObject(aWindow);
--- a/dom/tests/mochitest/bugs/mochitest.ini
+++ b/dom/tests/mochitest/bugs/mochitest.ini
@@ -63,17 +63,16 @@ skip-if = (buildapp == 'b2g' && (toolkit
 [test_bug384122.html]
 [test_bug389366.html]
 [test_bug38959.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
 [test_bug393974.html]
 [test_bug394769.html]
 [test_bug396843.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
-[test_bug397571.html]
 [test_bug400204.html]
 [test_bug404748.html]
 [test_bug406375.html]
 skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s
 [test_bug411103.html]
 [test_bug414291.html]
 skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog)
 [test_bug427744.html]
deleted file mode 100644
--- a/dom/tests/mochitest/bugs/test_bug397571.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=397571
--->
-<head>
-  <title>Test for Bug 397571</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank"
-  href="https://bugzilla.mozilla.org/show_bug.cgi?id=397571">
-  Mozilla Bug 397571</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 397571 **/
-
-// Get the interface
-var utils = SpecialPowers.DOMWindowUtils.SpecialPowers_wrappedObject;
-
-// Try to call functions without privileges
-var success = false;
-try {
-  isForced = utils.docCharsetIsForced;
-}
-catch(e) {
-  success = true;
-}
-ok(success == true, "should throw");
-
-success = false;
-try {
-  contentDisposition = utils.getDocumentMetadata("content-disposition");
-}
-catch(e) {
-  success = true;
-}
-ok(success == true, "should throw");
-
-var success = false;
-try {
-  utils.sendMouseEvent("mousedown", 0, 0, 0, 1, 0);
-}
-catch(e) {
-  success = true;
-}
-ok(success, "should throw");
-
-var success = false;
-try {
-  utils.sendKeyEvent("keydown", 0, 0, 0);
-}
-catch(e) {
-  success = true;
-}
-ok(success, "should throw");
-
-var success = false;
-try {
-  utils.focus(null);
-}
-catch(e) {
-  success = true;
-}
-ok(success, "should throw");
-
-// Get privilege
-utils = SpecialPowers.wrap(utils);
-
-// Try again
-var success = true;
-try {
-  isForced = utils.docCharsetIsForced;
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-var success = true;
-try {
-  contentDisposition = utils.getDocumentMetadata("content-disposition");
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-var success = true;
-try {
-   utils.sendMouseEvent("mousedown", 0, 0, 0, 1, 0);
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-var success = true;
-try {
-  utils.sendKeyEvent("keydown", 0, 0, 0);
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-var success = true;
-try {
-  utils.focus(null);
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-// TEMPORARY workaround for leak bug 524037: send a mouseup event as
-// well so that we don't leak.
-var success = true;
-try {
-   utils.sendMouseEvent("mouseup", 0, 0, 0, 1, 0);
-}
-catch(e) {
-  success = false;
-}
-ok(success, "shouldn't throw");
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -1196,18 +1196,16 @@ var interfaceNamesInGlobalScope =
     "WebGLVertexArray",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WebSocket",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WheelEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Window",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "WindowUtils",
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "Worker",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "XMLDocument",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "XMLHttpRequest",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "XMLHttpRequestUpload",
 // IMPORTANT: Do not change this list without review from a DOM peer!