Bug 889148 - Remove legacy QS/classinfo bits from events even more. r=smaug, peterv
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Fri, 05 Jul 2013 07:53:59 +0900
changeset 137529 296f84d14045
parent 137528 170e1863b9b6
child 137530 1ee4f0e1fcd2
push id24927
push userryanvm@gmail.com
push dateMon, 08 Jul 2013 01:19:31 +0000
treeherdermozilla-central@17a47dcef75d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, peterv
bugs889148
milestone25.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 889148 - Remove legacy QS/classinfo bits from events even more. r=smaug, peterv
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMEvent.h
content/html/content/src/nsGenericHTMLElement.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfo.h
js/xpconnect/src/dictionary_helper_gen.py
js/xpconnect/src/dom_quickstubs.qsconf
js/xpconnect/src/event_impl_gen.conf.in
js/xpconnect/src/event_impl_gen.py
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -26,17 +26,16 @@
 #include "nsIURI.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScriptError.h"
 #include "mozilla/Preferences.h"
 #include "nsJSUtils.h"
 #include "DictionaryHelpers.h"
 #include "nsLayoutUtils.h"
 #include "nsIScrollableFrame.h"
-#include "nsDOMClassInfoID.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsPIWindowRoot.h"
 #include "nsGlobalWindow.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 static char *sPopupAllowedEvents;
--- a/content/events/src/nsDOMEvent.h
+++ b/content/events/src/nsDOMEvent.h
@@ -11,17 +11,16 @@
 #include "nsISupports.h"
 #include "nsCOMPtr.h"
 #include "nsIDOMEventTarget.h"
 #include "nsPIDOMWindow.h"
 #include "nsPoint.h"
 #include "nsGUIEvent.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsAutoPtr.h"
-#include "nsIJSNativeInitializer.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/EventBinding.h"
 #include "nsIScriptGlobalObject.h"
 
 class nsIContent;
 class nsPresContext;
 struct JSContext;
 class JSObject;
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -1456,26 +1456,16 @@ protected:
 #define NS_HTML_CONTENT_INTERFACES(_base)                                     \
   NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(_base, nsIDOMHTMLElement)
 
 #define NS_INTERFACE_MAP_ENTRY_IF_TAG(_interface, _tag)                       \
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(_interface,                              \
                                      mNodeInfo->Equals(nsGkAtoms::_tag))
 
 
-#define NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO_GETTER(_getter) \
-  if (aIID.Equals(NS_GET_IID(nsIClassInfo)) ||               \
-      aIID.Equals(NS_GET_IID(nsXPCClassInfo))) {             \
-    foundInterface = _getter ();                             \
-    if (!foundInterface) {                                   \
-      *aInstancePtr = nullptr;                                \
-      return NS_ERROR_OUT_OF_MEMORY;                         \
-    }                                                        \
-  } else
-
 #define NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC                                \
   NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL {                                 \
     mozilla::dom::Element::GetId(aId);                                         \
     return NS_OK;                                                              \
   }                                                                            \
   NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL {                           \
     mozilla::dom::Element::SetId(aId);                                         \
     return NS_OK;                                                              \
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -211,22 +211,20 @@
 #include "Navigator.h"
 
 #include "nsPluginArray.h"
 #include "nsMimeTypeArray.h"
 
 #include "nsIEventListenerService.h"
 #include "nsIMessageManager.h"
 #include "mozilla/dom/Element.h"
-#include "HTMLLegendElement.h"
 
 #include "mozilla/dom/indexedDB/IDBWrapperCache.h"
 #include "mozilla/dom/indexedDB/IDBRequest.h"
 #include "mozilla/dom/indexedDB/IDBDatabase.h"
-#include "mozilla/dom/indexedDB/IDBEvents.h"
 #include "mozilla/dom/indexedDB/IDBObjectStore.h"
 #include "mozilla/dom/indexedDB/IDBTransaction.h"
 #include "mozilla/dom/indexedDB/IDBCursor.h"
 #include "mozilla/dom/indexedDB/IDBKeyRange.h"
 #include "mozilla/dom/indexedDB/IDBIndex.h"
 
 using mozilla::dom::indexedDB::IDBWrapperCache;
 using mozilla::dom::workers::ResolveWorkerClasses;
--- a/dom/base/nsDOMClassInfo.h
+++ b/dom/base/nsDOMClassInfo.h
@@ -18,16 +18,17 @@
 #include "xpcpublic.h"
 #include "nsIRunnable.h"
 
 #ifdef XP_WIN
 #undef GetClassName
 #endif
 
 class nsContentList;
+class nsDocument;
 class nsGlobalWindow;
 class nsIDOMWindow;
 class nsIForm;
 class nsNPAPIPluginInstance;
 class nsObjectLoadingContent;
 class nsIObjectLoadingContent;
 
 class nsIDOMCrypto;
--- a/js/xpconnect/src/dictionary_helper_gen.py
+++ b/js/xpconnect/src/dictionary_helper_gen.py
@@ -436,26 +436,16 @@ if __name__ == '__main__':
             os.mkdir(options.cachedir)
         sys.path.append(options.cachedir)
 
     # Instantiate the parser.
     p = xpidl.IDLParser(outputdir=options.cachedir)
 
     conf = readConfigFile(filename)
 
-    if (len(filenames) > 1):
-        eventconfig = {}
-        execfile(filenames[1], eventconfig)
-        simple_events = eventconfig.get('simple_events', [])
-        for e in simple_events:
-            eventdict = ("%sInit" % e)
-            eventidl = ("nsIDOM%s.idl" % e)
-            conf.dictionaries.append([eventdict, eventidl]);
-
-
     if options.header_output is not None:
         outfd = open(options.header_output, 'w')
         print_header_file(outfd, conf)
         outfd.close()
     if options.stub_output is not None:
         makeutils.targets.append(options.stub_output)
         outfd = open(options.stub_output, 'w')
         print_cpp_file(outfd, conf)
--- a/js/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/xpconnect/src/dom_quickstubs.qsconf
@@ -48,21 +48,16 @@ members = [
     'nsIDOMJSWindow.dump',
     # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try.
     #'nsIDOMLocation.hostname',
     #'nsIDOMLocation.href',
 
     # dom/interfaces/core
     'nsIDOMDOMStringList.*',
 
-    'nsIDOMProgressEvent.lengthComputable',
-    'nsIDOMProgressEvent.loaded',
-    'nsIDOMProgressEvent.total',
-    #XXX Can't quickstub initProgressEvent because it has long long parameters.
-
     'nsIDOMTouchList.*',
 
     # dom/interfaces/storage
     'nsIDOMToString.toString',
     'nsIDOMStorage.setItem',
     'nsIDOMStorage.length',
     'nsIDOMStorage.getItem',
     'nsIDOMStorage.key',
@@ -130,17 +125,16 @@ irregularFilenames = {
 
     'nsIDOMWindowPerformance': 'nsIDOMWindow',
     }
 
 customIncludes = [
     'nsDOMQS.h',
     'nsPerformance.h',
     'mozilla/dom/EventTargetBinding.h',
-    'mozilla/dom/EventBinding.h',
     ]
 
 nsIDOMStorage_Clear_customMethodCallCode = """
     rv = self->Clear();
     if (NS_SUCCEEDED(rv))
         JS_ClearNonGlobalObject(cx, obj);
 """
 
@@ -170,10 +164,9 @@ customMethodCalls = {
         'canFail': False,
         },
     }
 
 newBindingProperties = {
     # Once the last entry here goes away, we can make the sNativePropertyHooks
     # of bindings static.
     'nsIDOMEventTarget': 'mozilla::dom::EventTargetBinding::sNativePropertyHooks.mNativeProperties.regular',
-    'nsIDOMEvent': 'mozilla::dom::EventBinding::sNativePropertyHooks.mNativeProperties.regular',
     }
--- a/js/xpconnect/src/event_impl_gen.conf.in
+++ b/js/xpconnect/src/event_impl_gen.conf.in
@@ -57,17 +57,16 @@ simple_events = [
 #endif
 #ifdef MOZ_WEBSPEECH
     'SpeechRecognitionEvent',
 #endif
   ]
 
 """ include file names """
 special_includes = [
-    'DictionaryHelpers.h',
     'nsContentUtils.h',
     'nsIDOMApplicationRegistry.h',
     'nsIDOMFile.h'
   ]
 
 """ name of the type to not include using #include "typename.h" """
 exclude_automatic_type_include = [
     'nsISupports',
--- a/js/xpconnect/src/event_impl_gen.py
+++ b/js/xpconnect/src/event_impl_gen.py
@@ -59,24 +59,16 @@ def firstCap(str):
 
 def getBaseName(iface):
     basename = ("%s" % iface.base[6:])
     if (basename == "Event"):
         basename = "nsDOMEvent"
     return basename
 
 def print_header_file(fd, conf):
-    fd.write("#if defined MOZ_GENERATED_EVENT_LIST\n")
-    for e in conf.simple_events:
-        fd.write("MOZ_GENERATED_EVENT(%s)\n" % e);
-    fd.write("#undef MOZ_GENERATED_EVENT\n");
-    fd.write("\n#elif defined MOZ_GENERATED_EVENTS_INCLUDES\n")
-    for e in conf.simple_events:
-        fd.write("#include \"nsIDOM%s.h\"\n" % e)
-    fd.write("#else\n")
     fd.write("#ifndef _gen_mozilla_idl_generated_events_h_\n"
              "#define _gen_mozilla_idl_generated_events_h_\n\n")
     fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n")
     fd.write("#include \"nscore.h\"\n")
     fd.write("class nsEvent;\n")
     fd.write("class nsIDOMEvent;\n")
     fd.write("class nsPresContext;\n")
     fd.write("namespace mozilla {\n");
@@ -86,17 +78,16 @@ def print_header_file(fd, conf):
     fd.write("}\n\n");
     for e in conf.simple_events:
         fd.write("nsresult\n")
         fd.write("NS_NewDOM%s(nsIDOMEvent** aInstance, " % e)
         fd.write("mozilla::dom::EventTarget* aOwner, ")
         fd.write("nsPresContext* aPresContext, nsEvent* aEvent);\n")
  
     fd.write("\n#endif\n")
-    fd.write("#endif\n")
 
 def print_classes_file(fd, conf):
     fd.write("#ifndef _gen_mozilla_idl_generated_event_declarations_h_\n")
     fd.write("#define _gen_mozilla_idl_generated_event_declarations_h_\n\n")
 
     fd.write("#include \"nsDOMEvent.h\"\n");
     includes = []
     for s in conf.special_includes:
@@ -401,20 +392,16 @@ def write_cpp(eventname, iface, fd, conf
     fd.write("NS_IMPL_CYCLE_COLLECTION_UNLINK_END\n\n");
     fd.write("NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(%s, %s)\n" % (classname, basename))
     for c in ccattributes:
         fd.write("  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(m%s)\n" % firstCap(c.name))
     fd.write("NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END\n\n");
 
     fd.write("NS_IMPL_ADDREF_INHERITED(%s, %s)\n" % (classname, basename))
     fd.write("NS_IMPL_RELEASE_INHERITED(%s, %s)\n\n" % (classname, basename))
-    fd.write("} // namespace dom\n")
-    fd.write("} // namespace mozilla\n\n")
-    fd.write("namespace mozilla {\n")
-    fd.write("namespace dom {\n\n")
 
     fd.write("NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(%s)\n" % classname)
     fd.write("  NS_INTERFACE_MAP_ENTRY(nsIDOM%s)\n" % eventname)
     fd.write("NS_INTERFACE_MAP_END_INHERITING(%s)\n\n" % basename)
 
     hasVariant = False
     for a in allattributes:
         if a.type == "nsIVariant":