Bug 922159 - Rename Creator WebIDL extended attribute to NewObject. r=bz.
☠☠ backed out by da094d24f933 ☠ ☠
authorPeter Van der Beken <peterv@propagandism.org>
Mon, 30 Sep 2013 18:32:22 +0200
changeset 166626 64a19bc0e198e94705f109b232a65895b3c46488
parent 166625 89b5b123e01a086175d953ac072c308ccffc2e3c
child 166627 7ba9be5d51dfe713d13df76d93d9ad52010a52c3
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs922159
milestone27.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 922159 - Rename Creator WebIDL extended attribute to NewObject. r=bz.
dom/bindings/Codegen.py
dom/bindings/parser/WebIDL.py
dom/bindings/test/TestCodeGen.webidl
dom/bindings/test/TestExampleGen.webidl
dom/bindings/test/TestJSImplGen.webidl
dom/webidl/AudioContext.webidl
dom/webidl/BluetoothAdapter.webidl
dom/webidl/BluetoothManager.webidl
dom/webidl/CanvasRenderingContext2D.webidl
dom/webidl/DOMParser.webidl
dom/webidl/DesktopNotification.webidl
dom/webidl/Document.webidl
dom/webidl/HTMLMediaElement.webidl
dom/webidl/HTMLVideoElement.webidl
dom/webidl/IDBKeyRange.webidl
dom/webidl/MediaSource.webidl
dom/webidl/Navigator.webidl
dom/webidl/Promise.webidl
dom/webidl/SVGGraphicsElement.webidl
dom/webidl/SVGMatrix.webidl
dom/webidl/SVGPathElement.webidl
dom/webidl/SVGPoint.webidl
dom/webidl/SVGSVGElement.webidl
dom/webidl/SVGTextContentElement.webidl
dom/webidl/SourceBuffer.webidl
dom/webidl/WebGLRenderingContext.webidl
dom/webidl/XPathEvaluator.webidl
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -3928,17 +3928,17 @@ class CGArgumentConverter(CGThing):
         variadicConversion += ("\n"
                                "  }\n"
                                "}")
         return variadicConversion
 
 sequenceWrapLevel = 0
 
 def getWrapTemplateForType(type, descriptorProvider, result, successCode,
-                           isCreator, exceptionCode, typedArraysAreStructs):
+                           returnsNewObject, exceptionCode, typedArraysAreStructs):
     """
     Reflect a C++ value stored in "result", of IDL type "type" into JS.  The
     "successCode" is the code to run once we have successfully done the
     conversion and must guarantee that execution of the conversion template
     stops once the successCode has executed (e.g. by doing a 'return', or by
     doing a 'break' if the entire conversion template is inside a block that
     the 'break' will exit).
 
@@ -4015,17 +4015,17 @@ def getWrapTemplateForType(type, descrip
     if type.isArray():
         raise TypeError("Can't handle array return values yet")
 
     if type.isSequence():
         if type.nullable():
             # Nullable sequences are Nullable< nsTArray<T> >
             (recTemplate, recInfall) = getWrapTemplateForType(type.inner, descriptorProvider,
                                                               "%s.Value()" % result, successCode,
-                                                              isCreator, exceptionCode,
+                                                              returnsNewObject, exceptionCode,
                                                               typedArraysAreStructs)
             return ("""
 if (%s.IsNull()) {
 %s
 }
 %s""" % (result, CGIndenter(CGGeneric(setValue("JSVAL_NULL"))).define(), recTemplate), recInfall)
 
         # Now do non-nullable sequences.  Our success code is just to break to
@@ -4037,17 +4037,17 @@ if (%s.IsNull()) {
         sequenceWrapLevel += 1
         innerTemplate = wrapForType(
             type.inner, descriptorProvider,
             {
                 'result' :  "%s[%s]" % (result, index),
                 'successCode': "break;",
                 'jsvalRef': "tmp",
                 'jsvalHandle': "&tmp",
-                'isCreator': isCreator,
+                'returnsNewObject': returnsNewObject,
                 'exceptionCode': exceptionCode,
                 'obj': "returnArray"
                 }
             )
         sequenceWrapLevel -= 1
         innerTemplate = CGIndenter(CGGeneric(innerTemplate), 6).define()
         return (("""
 uint32_t length = %s.Length();
@@ -4084,18 +4084,18 @@ if (!returnArray) {
         else:
             wrappingCode = ""
 
         if not descriptor.interface.isExternal() and not descriptor.skipGen:
             if descriptor.wrapperCache:
                 assert descriptor.nativeOwnership != 'owned'
                 wrapMethod = "WrapNewBindingObject"
             else:
-                if not isCreator:
-                    raise MethodNotCreatorError(descriptor.interface.identifier.name)
+                if not returnsNewObject:
+                    raise MethodNotNewObjectError(descriptor.interface.identifier.name)
                 if descriptor.nativeOwnership == 'owned':
                     wrapMethod = "WrapNewBindingNonWrapperCachedOwnedObject"
                 else:
                     wrapMethod = "WrapNewBindingNonWrapperCachedObject"
             wrap = "%s(cx, ${obj}, %s, ${jsvalHandle})" % (wrapMethod, result)
             if not descriptor.hasXPConnectImpls:
                 # Can only fail to wrap as a new-binding object
                 # if they already threw an exception.
@@ -4198,17 +4198,17 @@ if (!returnArray) {
     if not (type.isUnion() or type.isPrimitive() or type.isDictionary() or
             type.isDate() or
             (type.isSpiderMonkeyInterface() and typedArraysAreStructs)):
         raise TypeError("Need to learn to wrap %s" % type)
 
     if type.nullable():
         (recTemplate, recInfal) = getWrapTemplateForType(type.inner, descriptorProvider,
                                                          "%s.Value()" % result, successCode,
-                                                         isCreator, exceptionCode,
+                                                         returnsNewObject, exceptionCode,
                                                          typedArraysAreStructs)
         return ("if (%s.IsNull()) {\n" % result +
                 CGIndenter(CGGeneric(setValue("JSVAL_NULL"))).define() + "\n" +
                 "}\n" + recTemplate, recInfal)
 
     if type.isSpiderMonkeyInterface():
         assert typedArraysAreStructs
         # See comments in WrapNewBindingObject explaining why we need
@@ -4271,47 +4271,48 @@ def wrapForType(type, descriptorProvider
                              the name
       * 'successCode' (optional): the code to run once we have successfully
                                   done the conversion, if not supplied 'return
                                   true;' will be used as the code.  The
                                   successCode must ensure that once it runs no
                                   more of the conversion template will be
                                   executed (e.g. by doing a 'return' or 'break'
                                   as appropriate).
-      * 'isCreator' (optional): If true, we're wrapping for the return value of
-                                a [Creator] method.  Assumed false if not set.
+      * 'returnsNewObject' (optional): If true, we're wrapping for the return
+                                       value of a [NewObject] method.  Assumed
+                                       false if not set.
       * 'exceptionCode' (optional): Code to run when a JS exception is thrown.
                                     The default is "return false;".  The code
                                     passed here must return.
     """
     wrap = getWrapTemplateForType(type, descriptorProvider,
                                   templateValues.get('result', 'result'),
                                   templateValues.get('successCode', None),
-                                  templateValues.get('isCreator', False),
+                                  templateValues.get('returnsNewObject', False),
                                   templateValues.get('exceptionCode',
                                                      "return false;"),
                                   templateValues.get('typedArraysAreStructs',
                                                      False))[0]
 
     defaultValues = {'obj': 'obj'}
     return string.Template(wrap).substitute(defaultValues, **templateValues)
 
 def infallibleForMember(member, type, descriptorProvider):
     """
     Determine the fallibility of changing a C++ value of IDL type "type" into
-    JS for the given attribute. Apart from isCreator, all the defaults are used,
-    since the fallbility does not change based on the boolean values,
+    JS for the given attribute. Apart from returnsNewObject, all the defaults
+    are used, since the fallbility does not change based on the boolean values,
     and the template will be discarded.
 
     CURRENT ASSUMPTIONS:
         We assume that successCode for wrapping up return values cannot contain
         failure conditions.
     """
     return getWrapTemplateForType(type, descriptorProvider, 'result', None,\
-                                  memberIsCreator(member), "return false;",
+                                  memberReturnsNewObject(member), "return false;",
                                   False)[1]
 
 def leafTypeNeedsCx(type, retVal):
     return (type.isAny() or type.isObject() or
             (retVal and type.isSpiderMonkeyInterface()))
 
 def leafTypeNeedsScopeObject(type, retVal):
     return retVal and type.isSpiderMonkeyInterface()
@@ -4579,17 +4580,17 @@ def getUnionMemberName(type):
     if type.isGeckoInterface():
         return type.inner.identifier.name
     if type.isEnum():
         return type.inner.identifier.name
     if type.isArray() or type.isSequence():
         return str(type)
     return type.name
 
-class MethodNotCreatorError(Exception):
+class MethodNotNewObjectError(Exception):
     def __init__(self, typename):
         self.typename = typename
 
 # A counter for making sure that when we're wrapping up things in
 # nested sequences we don't use the same variable name to iterate over
 # different sequences.
 sequenceWrapLevel = 0
 
@@ -4853,36 +4854,36 @@ if (!${obj}) {
 
     def getArguments(self):
         return [(a, "arg" + str(i)) for (i, a) in enumerate(self.arguments)]
 
     def isFallible(self):
         return not 'infallible' in self.extendedAttributes
 
     def wrap_return_value(self):
-        isCreator = memberIsCreator(self.idlNode)
-        if isCreator:
+        returnsNewObject = memberReturnsNewObject(self.idlNode)
+        if returnsNewObject:
             # We better be returning addrefed things!
             assert(isResultAlreadyAddRefed(self.extendedAttributes) or
-                   # Creators can return raw pointers to owned objects
+                   # NewObject can return raw pointers to owned objects
                    (self.returnType.isGeckoInterface() and
                     self.descriptor.getDescriptor(self.returnType.unroll().inner.identifier.name).nativeOwnership == 'owned') or
                    # Workers use raw pointers for new-object return
                    # values or something
                    self.descriptor.getDescriptor(self.returnType.unroll().inner.identifier.name).nativeOwnership == 'worker')
 
         resultTemplateValues = { 'jsvalRef': 'args.rval()',
                                  'jsvalHandle': 'args.rval()',
-                                 'isCreator': isCreator}
+                                 'returnsNewObject': returnsNewObject}
         try:
             return wrapForType(self.returnType, self.descriptor,
                                resultTemplateValues)
-        except MethodNotCreatorError, err:
-            assert not isCreator
-            raise TypeError("%s being returned from non-creator method or property %s.%s" %
+        except MethodNotNewObjectError, err:
+            assert not returnsNewObject
+            raise TypeError("%s being returned from non-NewObject method or property %s.%s" %
                             (err.typename,
                              self.descriptor.interface.identifier.name,
                              self.idlNode.identifier.name))
 
     def getErrorReport(self):
         jsImplemented = ""
         if self.descriptor.interface.isJSImplemented():
             jsImplemented = ", true"
@@ -5789,18 +5790,18 @@ if (!JS_GetProperty(cx, obj, "%s", &v)) 
 }
 
 if (!v.isObject()) {
   return ThrowErrorMessage(cx, MSG_NOT_OBJECT, "%s.%s");
 }
 
 return JS_SetProperty(cx, &v.toObject(), "%s", args[0]);""" % (attrName, self.descriptor.interface.identifier.name, attrName, forwardToAttrName))).define()
 
-def memberIsCreator(member):
-    return member.getExtendedAttribute("Creator") is not None
+def memberReturnsNewObject(member):
+    return member.getExtendedAttribute("NewObject") is not None
 
 class CGMemberJITInfo(CGThing):
     """
     A class for generating the JITInfo for a property that points to
     our specialized getter and setter.
     """
     def __init__(self, descriptor, member):
         self.member = member
@@ -8533,17 +8534,17 @@ if (""",
             {
                 'result' : "currentValue",
                 'successCode' : ("if (!%s) {\n"
                                  "  return false;\n"
                                  "}\n"
                                  "break;" % propDef),
                 'jsvalRef': "temp",
                 'jsvalHandle': "&temp",
-                'isCreator': False,
+                'returnsNewObject': False,
                 'obj': "parentObject",
                 'typedArraysAreStructs': True
             })
         conversion = CGGeneric(innerTemplate)
         conversion = CGWrapper(conversion,
                                pre=("JS::Rooted<JS::Value> temp(cx);\n"
                                     "%s const & currentValue = %s;\n" %
                                     (declType.define(), memberData)
@@ -9129,17 +9130,17 @@ class CGNativeMember(ClassMethod):
                 if nativeType[0] == "dom":
                     nativeType.pop(0)
             result = CGGeneric("::".join(nativeType))
             if self.resultAlreadyAddRefed:
                 if isMember:
                     holder = "nsRefPtr"
                 else:
                     holder = "already_AddRefed"
-                if memberIsCreator(self.member):
+                if memberReturnsNewObject(self.member):
                     warning = ""
                 else:
                     warning = "// Mark this as resultNotAddRefed to return raw pointers\n"
                 result = CGWrapper(result,
                                    pre=("%s%s<" % (warning, holder)),
                                    post=">")
             else:
                 result = CGWrapper(result, post="*")
@@ -10094,20 +10095,20 @@ class FakeMember():
         self.treatUndefinedAs = self.treatNullAs = "Default"
     def isStatic(self):
         return False
     def isAttr(self):
         return False
     def isMethod(self):
         return False
     def getExtendedAttribute(self, name):
-        # Claim to be a [Creator] so we can avoid the "mark this
+        # Claim to be a [NewObject] so we can avoid the "mark this
         # resultNotAddRefed" comments CGNativeMember codegen would
         # otherwise stick in.
-        if name == "Creator":
+        if name == "NewObject":
             return True
         return None
 
 class CallbackMember(CGNativeMember):
     def __init__(self, sig, name, descriptorProvider, needThisHandling, rethrowContentException=False):
         """
         needThisHandling is True if we need to be able to accept a specified
         thisObj, False otherwise.
@@ -10253,17 +10254,17 @@ class CallbackMember(CGNativeMember):
                 'result' : result,
                 'successCode' : "continue;" if arg.variadic else "break;",
                 'jsvalRef' : "argv.handleAt(%s)" % jsvalIndex,
                 'jsvalHandle' : "argv.handleAt(%s)" % jsvalIndex,
                 # XXXbz we don't have anything better to use for 'obj',
                 # really...  It's OK to use CallbackPreserveColor because
                 # CallSetup already handled the unmark-gray bits for us.
                 'obj' : 'CallbackPreserveColor()',
-                'isCreator': False,
+                'returnsNewObject': False,
                 'exceptionCode' : self.exceptionCode
                 })
         if arg.variadic:
             conversion = string.Template(
                 "for (uint32_t idx = 0; idx < ${arg}.Length(); ++idx) {\n" +
                 CGIndenter(CGGeneric(conversion)).define() + "\n"
                 "}\n"
                 "break;").substitute({ "arg": arg.identifier.name })
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -919,22 +919,22 @@ class IDLInterface(IDLObjectWithScope):
                     name = attr.value()
                     allowForbidden = False
 
                 methodIdentifier = IDLUnresolvedIdentifier(self.location, name,
                                                            allowForbidden=allowForbidden)
 
                 method = IDLMethod(self.location, methodIdentifier, retType,
                                    args, static=True)
-                # Constructors are always Creators and are always
+                # Constructors are always NewObject and are always
                 # assumed to be able to throw (since there's no way to
                 # indicate otherwise) and never have any other
                 # extended attributes.
                 method.addExtendedAttributes(
-                    [IDLExtendedAttribute(self.location, ("Creator",)),
+                    [IDLExtendedAttribute(self.location, ("NewObject",)),
                      IDLExtendedAttribute(self.location, ("Throws",))])
 
 
                 if identifier == "Constructor":
                     method.resolve(self)
                 else:
                     # We need to detect conflicts for NamedConstructors across
                     # interfaces. We first call resolve on the parentScope,
@@ -2755,17 +2755,17 @@ class IDLAttribute(IDLInterfaceMember):
               identifier == "SetterThrows" or
               identifier == "Pure" or
               identifier == "Throws" or
               identifier == "GetterThrows" or
               identifier == "ChromeOnly" or
               identifier == "SameObject" or
               identifier == "Constant" or
               identifier == "Func" or
-              identifier == "Creator"):
+              identifier == "NewObject"):
             # Known attributes that we don't need to do anything with here
             pass
         else:
             raise WebIDLError("Unknown extended attribute %s on attribute" % identifier,
                               [attr.location])
         IDLInterfaceMember.handleExtendedAttribute(self, attr)
 
     def resolve(self, parentScope):
@@ -3303,17 +3303,17 @@ class IDLMethod(IDLInterfaceMember, IDLS
             if not sig[0].isVoid():
                 raise WebIDLError("[LenientFloat] used on a non-void method",
                                   [attr.location, self.location])
             if not any(arg.type.includesRestrictedFloat() for arg in sig[1]):
                 raise WebIDLError("[LenientFloat] used on an operation with no "
                                   "restricted float type arguments",
                                   [attr.location, self.location])
         elif (identifier == "Throws" or
-              identifier == "Creator" or
+              identifier == "NewObject" or
               identifier == "ChromeOnly" or
               identifier == "Pref" or
               identifier == "Func" or
               identifier == "WebGLHandlesContextLoss"):
             # Known attributes that we don't need to do anything with here
             pass
         else:
             raise WebIDLError("Unknown extended attribute %s on method" % identifier,
--- a/dom/bindings/test/TestCodeGen.webidl
+++ b/dom/bindings/test/TestCodeGen.webidl
@@ -228,27 +228,27 @@ interface TestInterface {
   attribute TestInterface nonNullSelf;
   attribute TestInterface? nullableSelf;
   // Optional arguments
   void passOptionalSelf(optional TestInterface? arg);
   void passOptionalNonNullSelf(optional TestInterface arg);
   void passOptionalSelfWithDefault(optional TestInterface? arg = null);
 
   // Non-wrapper-cache interface types
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
 
   // Non-castable interface types
   IndirectlyImplementedInterface receiveOther();
   IndirectlyImplementedInterface? receiveNullableOther();
   IndirectlyImplementedInterface receiveWeakOther();
   IndirectlyImplementedInterface? receiveWeakNullableOther();
   void passOther(IndirectlyImplementedInterface arg);
--- a/dom/bindings/test/TestExampleGen.webidl
+++ b/dom/bindings/test/TestExampleGen.webidl
@@ -124,27 +124,27 @@ interface TestExampleInterface {
   attribute TestInterface nonNullSelf;
   attribute TestInterface? nullableSelf;
   // Optional arguments
   void passOptionalSelf(optional TestInterface? arg);
   void passOptionalNonNullSelf(optional TestInterface arg);
   void passOptionalSelfWithDefault(optional TestInterface? arg = null);
 
   // Non-wrapper-cache interface types
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
 
   // Non-castable interface types
   IndirectlyImplementedInterface receiveOther();
   IndirectlyImplementedInterface? receiveNullableOther();
   IndirectlyImplementedInterface receiveWeakOther();
   IndirectlyImplementedInterface? receiveWeakNullableOther();
   void passOther(IndirectlyImplementedInterface arg);
--- a/dom/bindings/test/TestJSImplGen.webidl
+++ b/dom/bindings/test/TestJSImplGen.webidl
@@ -140,28 +140,28 @@ interface TestJSImplInterface {
   attribute TestJSImplInterface nonNullSelf;
   attribute TestJSImplInterface? nullableSelf;
   // Optional arguments
   void passOptionalSelf(optional TestJSImplInterface? arg);
   void passOptionalNonNullSelf(optional TestJSImplInterface arg);
   void passOptionalSelfWithDefault(optional TestJSImplInterface? arg = null);
 
   // Non-wrapper-cache interface types
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
-  [Creator]
+  [NewObject]
   TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
 
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
-  [Creator]
+  [NewObject]
   sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
 
   // Non-castable interface types
   IndirectlyImplementedInterface receiveOther();
   IndirectlyImplementedInterface? receiveNullableOther();
   // Callback interface ignores 'resultNotAddRefed'. See bug 843272.
   //IndirectlyImplementedInterface receiveWeakOther();
   //IndirectlyImplementedInterface? receiveWeakNullableOther();
--- a/dom/webidl/AudioContext.webidl
+++ b/dom/webidl/AudioContext.webidl
@@ -16,88 +16,88 @@ callback DecodeErrorCallback = void ();
 [Constructor, PrefControlled]
 interface AudioContext : EventTarget {
 
     readonly attribute AudioDestinationNode destination;
     readonly attribute float sampleRate;
     readonly attribute double currentTime;
     readonly attribute AudioListener listener;
 
-    [Creator, Throws]
+    [NewObject, Throws]
     AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate);
 
     void decodeAudioData(ArrayBuffer audioData,
                          DecodeSuccessCallback successCallback,
                          optional DecodeErrorCallback errorCallback);
 
     // AudioNode creation 
-    [Creator]
+    [NewObject]
     AudioBufferSourceNode createBufferSource();
 
-    [Creator, Throws]
+    [NewObject, Throws]
     MediaStreamAudioDestinationNode createMediaStreamDestination();
 
-    [Creator, Throws]
+    [NewObject, Throws]
     ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
                                               optional unsigned long numberOfInputChannels = 2,
                                               optional unsigned long numberOfOutputChannels = 2);
 
-    [Creator]
+    [NewObject]
     AnalyserNode createAnalyser();
-    [Creator, Throws]
+    [NewObject, Throws]
     MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
-    [Creator, Throws]
+    [NewObject, Throws]
     MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
-    [Creator]
+    [NewObject]
     GainNode createGain();
-    [Creator, Throws]
+    [NewObject, Throws]
     DelayNode createDelay(optional double maxDelayTime = 1);
-    [Creator]
+    [NewObject]
     BiquadFilterNode createBiquadFilter();
-    [Creator]
+    [NewObject]
     WaveShaperNode createWaveShaper();
-    [Creator]
+    [NewObject]
     PannerNode createPanner();
-    [Creator]
+    [NewObject]
     ConvolverNode createConvolver();
 
-    [Creator, Throws]
+    [NewObject, Throws]
     ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
-    [Creator, Throws]
+    [NewObject, Throws]
     ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
 
-    [Creator]
+    [NewObject]
     DynamicsCompressorNode createDynamicsCompressor();
 
-    [Creator]
+    [NewObject]
     OscillatorNode createOscillator();
-    [Creator, Throws]
+    [NewObject, Throws]
     PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
 
 };
 
 /*
  * The origin of this IDL file is
  * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
  */
 [PrefControlled]
 partial interface AudioContext {
-    [Creator, Throws]
+    [NewObject, Throws]
     AudioBuffer? createBuffer(ArrayBuffer buffer, boolean mixToMono);
 
     // Same as createGain()
-    [Creator,Pref="media.webaudio.legacy.AudioContext"]
+    [NewObject,Pref="media.webaudio.legacy.AudioContext"]
     GainNode createGainNode();
 
     // Same as createDelay()
-    [Creator, Throws, Pref="media.webaudio.legacy.AudioContext"]
+    [NewObject, Throws, Pref="media.webaudio.legacy.AudioContext"]
     DelayNode createDelayNode(optional double maxDelayTime = 1);
 
     // Same as createScriptProcessor()
-    [Creator, Throws, Pref="media.webaudio.legacy.AudioContext"]
+    [NewObject, Throws, Pref="media.webaudio.legacy.AudioContext"]
     ScriptProcessorNode createJavaScriptNode(optional unsigned long bufferSize = 0,
                                              optional unsigned long numberOfInputChannels = 2,
                                              optional unsigned long numberOfOutputChannels = 2);
 };
 
 enum AudioChannel {
   "normal",
   "content",
--- a/dom/webidl/BluetoothAdapter.webidl
+++ b/dom/webidl/BluetoothAdapter.webidl
@@ -60,39 +60,39 @@ interface BluetoothAdapter : EventTarget
            attribute EventHandler   onhfpstatuschanged;
 
   // Fired when sco connection status changed
            attribute EventHandler   onscostatuschanged;
 
   // Fired when remote devices query current media play status
            attribute EventHandler   onrequestmediaplaystatus;
 
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setName(DOMString name);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setDiscoverable(boolean discoverable);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setDiscoverableTimeout(unsigned long timeout);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest startDiscovery();
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest stopDiscovery();
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest pair(BluetoothDevice device);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest unpair(BluetoothDevice device);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest getPairedDevices();
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest getConnectedDevices(unsigned short serviceUuid);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setPinCode(DOMString deviceAddress, DOMString pinCode);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setPasskey(DOMString deviceAddress, unsigned long passkey);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest setPairingConfirmation(DOMString deviceAddress, boolean confirmation);
 
   /**
    * Connect/Disconnect to a specific service of a target remote device.
    * To check the value of service UUIDs, please check "Bluetooth Assigned
    * Numbers" / "Service Discovery Protocol" for more information.
    *
    * Note that service UUID is optional. If it isn't passed when calling
@@ -102,36 +102,36 @@ interface BluetoothAdapter : EventTarget
    *
    * Reply success if the connection of any profile is successfully
    * established/released; reply error if we failed to connect/disconnect all
    * of the planned profiles.
    *
    * @param device Remote device
    * @param profile 2-octets service UUID. This is optional.
    */
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest connect(BluetoothDevice device, optional unsigned short serviceUuid);
 
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest disconnect(BluetoothDevice device, optional unsigned short serviceUuid);
 
   // One device can only send one file at a time
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest sendFile(DOMString deviceAddress, Blob blob);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest stopSendingFile(DOMString deviceAddress);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest confirmReceivingFile(DOMString deviceAddress, boolean confirmation);
 
   // Connect/Disconnect SCO (audio) connection
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest connectSco();
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest disconnectSco();
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest isScoConnected();
 
   /**
    * Additional HFP methods to handle CDMA network.
    *
    * In GSM network we observe call operations from RIL call state changes;
    * however in CDMA network RIL call states do not change under some call
    * operations, so we need these additional methods to be informed of these
@@ -142,13 +142,13 @@ interface BluetoothAdapter : EventTarget
   [Creator, Throws]
   DOMRequest answerWaitingCall();
   [Creator, Throws]
   DOMRequest ignoreWaitingCall();
   [Creator, Throws]
   DOMRequest toggleCalls();
 
   // AVRCP 1.3 methods
-  [Creator,Throws]
+  [NewObject,Throws]
   DOMRequest sendMediaMetaData(optional MediaMetaData mediaMetaData);
-  [Creator,Throws]
+  [NewObject,Throws]
   DOMRequest sendMediaPlayStatus(optional MediaPlayStatus mediaPlayStatus);
 };
--- a/dom/webidl/BluetoothManager.webidl
+++ b/dom/webidl/BluetoothManager.webidl
@@ -8,11 +8,11 @@ interface BluetoothManager : EventTarget
   readonly attribute boolean      enabled;
 
            attribute EventHandler onenabled;
            attribute EventHandler ondisabled;
            attribute EventHandler onadapteradded;
 
   [Throws]
   boolean     isConnected(unsigned short aProfile);
-  [Creator, Throws]
+  [NewObject, Throws]
   DOMRequest? getDefaultAdapter();
 };
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -43,21 +43,21 @@ interface CanvasRenderingContext2D {
   // compositing
            attribute unrestricted double globalAlpha; // (default 1.0)
            [Throws]
            attribute DOMString globalCompositeOperation; // (default source-over)
 
   // colors and styles (see also the CanvasDrawingStyles interface)
            attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
            attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
-  [Creator]
+  [NewObject]
   CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
-  [Creator, Throws]
+  [NewObject, Throws]
   CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
-  [Creator, Throws]
+  [NewObject, Throws]
   CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, [TreatNullAs=EmptyString] DOMString repetition);
 
   // shadows
            [LenientFloat]
            attribute double shadowOffsetX; // (default 0)
            [LenientFloat]
            attribute double shadowOffsetY; // (default 0)
            [LenientFloat]
@@ -91,37 +91,37 @@ interface CanvasRenderingContext2D {
 // NOT IMPLEMENTED  boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
   boolean isPointInStroke(double x, double y);
 
   // text (see also the CanvasDrawingStyles interface)
   [Throws, LenientFloat]
   void fillText(DOMString text, double x, double y, optional double maxWidth);
   [Throws, LenientFloat]
   void strokeText(DOMString text, double x, double y, optional double maxWidth);
-  [Creator, Throws]
+  [NewObject, Throws]
   TextMetrics measureText(DOMString text);
 
   // drawing images
 // NOT IMPLEMENTED           attribute boolean imageSmoothingEnabled; // (default true)
   [Throws, LenientFloat]
   void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy);
   [Throws, LenientFloat]
   void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy, double dw, double dh);
   [Throws, LenientFloat]
   void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
 
   // hit regions
 // NOT IMPLEMENTED  void addHitRegion(HitRegionOptions options);
 
   // pixel manipulation
-  [Creator, Throws]
+  [NewObject, Throws]
   ImageData createImageData(double sw, double sh);
-  [Creator, Throws]
+  [NewObject, Throws]
   ImageData createImageData(ImageData imagedata);
-  [Creator, Throws]
+  [NewObject, Throws]
   ImageData getImageData(double sx, double sy, double sw, double sh);
   [Throws]
   void putImageData(ImageData imagedata, double dx, double dy);
   [Throws]
   void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
 
   // Mozilla-specific stuff
   // FIXME Bug 768048 mozCurrentTransform/mozCurrentTransformInverse should return a WebIDL array.
--- a/dom/webidl/DOMParser.webidl
+++ b/dom/webidl/DOMParser.webidl
@@ -18,29 +18,29 @@ enum SupportedType {
   "image/svg+xml"
 };
 
 // the latter is Mozilla-specific
 [Constructor,
  Constructor(Principal? prin, optional URI? documentURI = null,
              optional URI? baseURI = null)]
 interface DOMParser {
-  [Creator, Throws]
+  [NewObject, Throws]
   Document parseFromString(DOMString str, SupportedType type);
 
   // Mozilla-specific stuff
   // Throws if the passed-in length is greater than the actual sequence length
-  [Creator, Throws, ChromeOnly]
+  [NewObject, Throws, ChromeOnly]
   Document parseFromBuffer(sequence<octet> buf, unsigned long bufLen,
                            SupportedType type);
   // Throws if the passed-in length is greater than the actual typed array length
-  [Creator, Throws, ChromeOnly]
+  [NewObject, Throws, ChromeOnly]
   Document parseFromBuffer(Uint8Array buf, unsigned long bufLen,
                            SupportedType type);
-  [Creator, Throws, ChromeOnly]
+  [NewObject, Throws, ChromeOnly]
   Document parseFromStream(InputStream stream, DOMString? charset,
                            long contentLength, SupportedType type);
   [Throws, ChromeOnly]
   void init(optional Principal? principal = null,
             optional URI? documentURI = null,
             optional URI? baseURI = null);
 };
 
--- a/dom/webidl/DesktopNotification.webidl
+++ b/dom/webidl/DesktopNotification.webidl
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 interface MozObserver;
 
 [HeaderFile="mozilla/dom/DesktopNotification.h"]
 interface DesktopNotificationCenter
 {
-  [Creator]
+  [NewObject]
   DesktopNotification createNotification(DOMString title,
                                          DOMString description,
                                          optional DOMString iconURL = "");
 };
 
 interface DesktopNotification : EventTarget
 {
   [Throws]
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -35,58 +35,58 @@ interface Document : Node {
 
   readonly attribute DocumentType? doctype;
   readonly attribute Element? documentElement;
   HTMLCollection getElementsByTagName(DOMString localName);
   HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
   HTMLCollection getElementsByClassName(DOMString classNames);
   Element? getElementById(DOMString elementId);
 
-  [Creator, Throws]
+  [NewObject, Throws]
   Element createElement(DOMString localName);
-  [Creator, Throws]
+  [NewObject, Throws]
   Element createElementNS(DOMString? namespace, DOMString qualifiedName);
-  [Creator]
+  [NewObject]
   DocumentFragment createDocumentFragment();
-  [Creator]
+  [NewObject]
   Text createTextNode(DOMString data);
-  [Creator]
+  [NewObject]
   Comment createComment(DOMString data);
-  [Creator, Throws]
+  [NewObject, Throws]
   ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
 
   [Throws]
   Node importNode(Node node, optional boolean deep = true);
   [Throws]
   Node adoptNode(Node node);
 
-  [Creator, Throws]
+  [NewObject, Throws]
   Event createEvent(DOMString interface);
 
-  [Creator, Throws]
+  [NewObject, Throws]
   Range createRange();
 
   // NodeFilter.SHOW_ALL = 0xFFFFFFFF
-  [Creator, Throws]
+  [NewObject, Throws]
   NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
-  [Creator, Throws]
+  [NewObject, Throws]
   TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
 
   // NEW
   // No support for prepend/append yet
   // void prepend((Node or DOMString)... nodes);
   // void append((Node or DOMString)... nodes);
 
   // These are not in the spec, but leave them for now for backwards compat.
   // So sort of like Gecko extensions
-  [Creator, Throws]
+  [NewObject, Throws]
   CDATASection createCDATASection(DOMString data);
-  [Creator, Throws]
+  [NewObject, Throws]
   Attr createAttribute(DOMString name);
-  [Creator, Throws]
+  [NewObject, Throws]
   Attr createAttributeNS(DOMString? namespace, DOMString name);
   readonly attribute DOMString? inputEncoding;
 };
 
 // http://www.whatwg.org/specs/web-apps/current-work/#the-document-object
 partial interface Document {
   [PutForwards=href, Unforgeable] readonly attribute Location? location;
   //(HTML only)         attribute DOMString domain;
@@ -285,17 +285,17 @@ partial interface Document {
   [Func="IsChromeOrXBL"]
   Element? getBindingParent(Node node);
   [Throws, Func="IsChromeOrXBL"]
   void loadBindingDocument(DOMString documentURL);
 
   // nsIDOMDocumentTouch
   // XXXbz I can't find the sane spec for this stuff, so just cribbing
   // from our xpidl for now.
-  [Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+  [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
   Touch createTouch(optional Window? view = null,
                     optional EventTarget? target = null,
                     optional long identifier = 0,
                     optional long pageX = 0,
                     optional long pageY = 0,
                     optional long screenX = 0,
                     optional long screenY = 0,
                     optional long clientX = 0,
@@ -303,24 +303,24 @@ partial interface Document {
                     optional long radiusX = 0,
                     optional long radiusY = 0,
                     optional float rotationAngle = 0,
                     optional float force = 0);
   // XXXbz a hack to get around the fact that we don't support variadics as
   // distinguishing arguments yet.  Once this hack is removed. we can also
   // remove the corresponding overload on nsIDocument, since Touch... and
   // sequence<Touch> look the same in the C++.
-  [Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+  [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
   TouchList createTouchList(Touch touch, Touch... touches);
   // XXXbz and another hack for the fact that we can't usefully have optional
   // distinguishing arguments but need a working zero-arg form of
   // createTouchList().
-  [Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+  [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
   TouchList createTouchList();
-  [Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+  [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
   TouchList createTouchList(sequence<Touch> touches);
 
   [ChromeOnly]
   attribute boolean styleSheetChangeEventsEnabled;
 
   [ChromeOnly, Throws]
   void obsoleteSheet(URI sheetURI);
   [ChromeOnly, Throws]
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -25,17 +25,17 @@ interface HTMLMediaElement : HTMLElement
            attribute DOMString crossOrigin;
   const unsigned short NETWORK_EMPTY = 0;
   const unsigned short NETWORK_IDLE = 1;
   const unsigned short NETWORK_LOADING = 2;
   const unsigned short NETWORK_NO_SOURCE = 3;
   readonly attribute unsigned short networkState;
   [SetterThrows]
            attribute DOMString preload;
-  [Creator]
+  [NewObject]
   readonly attribute TimeRanges buffered;
   void load();
   DOMString canPlayType(DOMString type);
 
   // ready state
   const unsigned short HAVE_NOTHING = 0;
   const unsigned short HAVE_METADATA = 1;
   const unsigned short HAVE_CURRENT_DATA = 2;
@@ -50,19 +50,19 @@ interface HTMLMediaElement : HTMLElement
   // TODO: Bug 847375 - void fastSeek(double time);
   readonly attribute unrestricted double duration;
   // TODO: Bug 847376 - readonly attribute any startDate;
   readonly attribute boolean paused;
   [SetterThrows]
            attribute double defaultPlaybackRate;
   [SetterThrows]
            attribute double playbackRate;
-  [Creator]
+  [NewObject]
   readonly attribute TimeRanges played;
-  [Creator]
+  [NewObject]
   readonly attribute TimeRanges seekable;
   readonly attribute boolean ended;
   [SetterThrows]
            attribute boolean autoplay;
   [SetterThrows]
            attribute boolean loop;
   [Throws]
   void play();
--- a/dom/webidl/HTMLVideoElement.webidl
+++ b/dom/webidl/HTMLVideoElement.webidl
@@ -43,11 +43,11 @@ partial interface HTMLVideoElement {
   readonly attribute double mozFrameDelay;
 
   // True if the video has an audio track available.
   readonly attribute boolean mozHasAudio;
 };
 
 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
 partial interface HTMLVideoElement {
-  [Pref="media.mediasource.enabled", Creator]
+  [Pref="media.mediasource.enabled", NewObject]
   VideoPlaybackQuality getVideoPlaybackQuality();
 };
--- a/dom/webidl/IDBKeyRange.webidl
+++ b/dom/webidl/IDBKeyRange.webidl
@@ -13,17 +13,17 @@ interface IDBKeyRange {
   [Throws]
   readonly attribute any     lower;
   [Throws]
   readonly attribute any     upper;
   [Constant]
   readonly attribute boolean lowerOpen;
   [Constant]
   readonly attribute boolean upperOpen;
-  [Creator, Throws]
+  [NewObject, Throws]
   static IDBKeyRange only (any value);
-  [Creator, Throws]
+  [NewObject, Throws]
   static IDBKeyRange lowerBound (any lower, optional boolean open = false);
-  [Creator, Throws]
+  [NewObject, Throws]
   static IDBKeyRange upperBound (any upper, optional boolean open = false);
-  [Creator, Throws]
+  [NewObject, Throws]
   static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
 };
--- a/dom/webidl/MediaSource.webidl
+++ b/dom/webidl/MediaSource.webidl
@@ -23,16 +23,16 @@ enum MediaSourceEndOfStreamError {
 
 [Constructor, Pref="media.mediasource.enabled"]
 interface MediaSource : EventTarget {
   readonly attribute SourceBufferList sourceBuffers;
   readonly attribute SourceBufferList activeSourceBuffers;
   readonly attribute MediaSourceReadyState readyState;
   [SetterThrows]
   attribute unrestricted double duration;
-  [Creator, Throws]
+  [NewObject, Throws]
   SourceBuffer addSourceBuffer(DOMString type);
   [Throws]
   void removeSourceBuffer(SourceBuffer sourceBuffer);
   [Throws]
   void endOfStream(optional MediaSourceEndOfStreamError error);
   static boolean isTypeSupported(DOMString type);
 };
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -106,17 +106,17 @@ interface NavigatorBattery {
     [Throws, Func="Navigator::HasBatterySupport"]
     readonly attribute BatteryManager? battery;
 };
 Navigator implements NavigatorBattery;
 
 // https://wiki.mozilla.org/WebAPI/DataStore
 [NoInterfaceObject]
 interface NavigatorDataStore {
-    [Throws, Creator, Pref="dom.datastore.enabled"]
+    [Throws, NewObject, Pref="dom.datastore.enabled"]
     Promise getDataStores(DOMString name);
 };
 Navigator implements NavigatorDataStore;
 
 // http://www.w3.org/TR/vibration/#vibration-interface
 partial interface Navigator {
     // We don't support sequences in unions yet
     //boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
--- a/dom/webidl/Promise.webidl
+++ b/dom/webidl/Promise.webidl
@@ -17,20 +17,20 @@ callback AnyCallback = any (optional any
 interface Promise {
   // TODO bug 875289 - static Promise fulfill(any value);
 
   // Disable the static methods when the interface object is supposed to be
   // disabled, just in case some code decides to walk over to .constructor from
   // the proto of a promise object or someone screws up and manages to create a
   // Promise object in this scope without having resolved the interface object
   // first.
-  [Creator, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
+  [NewObject, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
   static Promise resolve(any value); // same as any(value)
-  [Creator, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
+  [NewObject, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
   static Promise reject(any value);
 
-  [Creator]
+  [NewObject]
   Promise then([TreatUndefinedAs=Missing] optional AnyCallback fulfillCallback,
                [TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
 
-  [Creator]
+  [NewObject]
   Promise catch([TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
 };
--- a/dom/webidl/SVGGraphicsElement.webidl
+++ b/dom/webidl/SVGGraphicsElement.webidl
@@ -11,17 +11,17 @@
  */
 
 interface SVGGraphicsElement : SVGElement {
   readonly attribute SVGAnimatedTransformList transform;
 
   readonly attribute SVGElement? nearestViewportElement;
   readonly attribute SVGElement? farthestViewportElement;
 
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGRect getBBox();
   // Not implemented
   // SVGRect getStrokeBBox();
   SVGMatrix? getCTM();
   SVGMatrix? getScreenCTM();
   [Throws]
   SVGMatrix getTransformToElement(SVGGraphicsElement element);
 };
--- a/dom/webidl/SVGMatrix.webidl
+++ b/dom/webidl/SVGMatrix.webidl
@@ -20,32 +20,32 @@ interface SVGMatrix {
   attribute float c;
   [SetterThrows]
   attribute float d;
   [SetterThrows]
   attribute float e;
   [SetterThrows]
   attribute float f;
 
-  [Creator]
+  [NewObject]
   SVGMatrix multiply(SVGMatrix secondMatrix);
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGMatrix inverse();
-  [Creator]
+  [NewObject]
   SVGMatrix translate(float x, float y);
-  [Creator]
+  [NewObject]
   SVGMatrix scale(float scaleFactor);
-  [Creator]
+  [NewObject]
   SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY);
-  [Creator]
+  [NewObject]
   SVGMatrix rotate(float angle);
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGMatrix rotateFromVector(float x, float y);
-  [Creator]
+  [NewObject]
   SVGMatrix flipX();
-  [Creator]
+  [NewObject]
   SVGMatrix flipY();
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGMatrix skewX(float angle);
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGMatrix skewY(float angle);
 };
 
--- a/dom/webidl/SVGPathElement.webidl
+++ b/dom/webidl/SVGPathElement.webidl
@@ -10,53 +10,53 @@
  * liability, trademark and document use rules apply.
  */
 interface SVGPathElement : SVGGraphicsElement {
 
   readonly attribute SVGAnimatedNumber pathLength;
 
   [Throws]
   float getTotalLength();
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGPoint getPointAtLength(float distance);
   unsigned long getPathSegAtLength(float distance);
-  [Creator]
+  [NewObject]
   SVGPathSegClosePath createSVGPathSegClosePath();
-  [Creator]
+  [NewObject]
   SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x, float y);
-  [Creator]
+  [NewObject]
   SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x, float y);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float x, float y);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoRel createSVGPathSegLinetoRel(float x, float y);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
-  [Creator]
+  [NewObject]
   SVGPathSegArcAbs createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
-  [Creator]
+  [NewObject]
   SVGPathSegArcRel createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(float x);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(float x);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(float y);
-  [Creator]
+  [NewObject]
   SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(float y);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
-  [Creator]
+  [NewObject]
   SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
 };
 
 SVGPathElement implements SVGAnimatedPathData;
 
--- a/dom/webidl/SVGPoint.webidl
+++ b/dom/webidl/SVGPoint.webidl
@@ -12,12 +12,12 @@
 
 interface SVGPoint {
 
   [SetterThrows]
   attribute float x;
   [SetterThrows]
   attribute float y;
 
-  [Creator]
+  [NewObject]
   SVGPoint matrixTransform(SVGMatrix matrix);
 };
 
--- a/dom/webidl/SVGSVGElement.webidl
+++ b/dom/webidl/SVGSVGElement.webidl
@@ -38,31 +38,31 @@ interface SVGSVGElement : SVGGraphicsEle
   boolean animationsPaused();
   float getCurrentTime();
   void setCurrentTime(float seconds);
   // NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
   // NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
   // boolean checkIntersection(SVGElement element, SVGRect rect);
   // boolean checkEnclosure(SVGElement element, SVGRect rect);
   void deselectAll();
-  [Creator]
+  [NewObject]
   SVGNumber createSVGNumber();
-  [Creator]
+  [NewObject]
   SVGLength createSVGLength();
-  [Creator]
+  [NewObject]
   SVGAngle createSVGAngle();
-  [Creator]
+  [NewObject]
   SVGPoint createSVGPoint();
-  [Creator]
+  [NewObject]
   SVGMatrix createSVGMatrix();
-  [Creator]
+  [NewObject]
   SVGRect createSVGRect();
-  [Creator]
+  [NewObject]
   SVGTransform createSVGTransform();
-  [Creator]
+  [NewObject]
   SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
   [Throws]
   Element? getElementById(DOMString elementId);
 };
 
 /*SVGSVGElement implements ViewCSS;
 SVGSVGElement implements DocumentCSS;*/
 SVGSVGElement implements SVGFitToViewBox;
--- a/dom/webidl/SVGTextContentElement.webidl
+++ b/dom/webidl/SVGTextContentElement.webidl
@@ -23,17 +23,17 @@ interface SVGTextContentElement : SVGGra
   long getNumberOfChars();
   float getComputedTextLength();
   [Throws]
   float getSubStringLength(unsigned long charnum, unsigned long nchars);
   [Throws]
   SVGPoint getStartPositionOfChar(unsigned long charnum);
   [Throws]
   SVGPoint getEndPositionOfChar(unsigned long charnum);
-  [Creator, Throws]
+  [NewObject, Throws]
   SVGRect getExtentOfChar(unsigned long charnum);
   [Throws]
   float getRotationOfChar(unsigned long charnum);
   long getCharNumAtPosition(SVGPoint point);
   [Throws, Pref="svg.text.css-frames.enabled"]
   void selectSubString(unsigned long charnum, unsigned long nchars);
 };
 
--- a/dom/webidl/SourceBuffer.webidl
+++ b/dom/webidl/SourceBuffer.webidl
@@ -15,17 +15,17 @@ enum SourceBufferAppendMode {
     "sequence"
 };
 
 [Pref="media.mediasource.enabled"]
 interface SourceBuffer : EventTarget {
   [SetterThrows]
   attribute SourceBufferAppendMode mode;
   readonly attribute boolean updating;
-  [Creator, Throws]
+  [NewObject, Throws]
   readonly attribute TimeRanges buffered;
   [SetterThrows]
   attribute double timestampOffset;
   //readonly attribute AudioTrackList audioTracks;
   //readonly attribute VideoTrackList videoTracks;
   //readonly attribute TextTrackList textTracks;
   [SetterThrows]
   attribute double appendWindowStart;
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -584,19 +584,19 @@ interface WebGLRenderingContext {
                                  GLenum renderbuffertarget, 
                                  WebGLRenderbuffer? renderbuffer);
     void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, 
                               WebGLTexture? texture, GLint level);
     void frontFace(GLenum mode);
 
     void generateMipmap(GLenum target);
 
-    [Creator]
+    [NewObject]
     WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index);
-    [Creator]
+    [NewObject]
     WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index);
 
     sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program);
 
     [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name);
 
     any getBufferParameter(GLenum target, GLenum pname);
     [Throws]
@@ -607,29 +607,29 @@ interface WebGLRenderingContext {
     [Throws]
     any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, 
                                           GLenum pname);
     any getProgramParameter(WebGLProgram? program, GLenum pname);
     DOMString? getProgramInfoLog(WebGLProgram? program);
     any getRenderbufferParameter(GLenum target, GLenum pname);
     any getShaderParameter(WebGLShader? shader, GLenum pname);
 
-    [Creator]
+    [NewObject]
     WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
 
     DOMString? getShaderInfoLog(WebGLShader? shader);
 
     DOMString? getShaderSource(WebGLShader? shader);
 
     any getTexParameter(GLenum target, GLenum pname);
 
     [Throws]
     any getUniform(WebGLProgram? program, WebGLUniformLocation? location);
 
-    [Creator]
+    [NewObject]
     WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name);
 
     [Throws]
     any getVertexAttrib(GLuint index, GLenum pname);
 
     [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname);
 
     void hint(GLenum target, GLenum mode);
--- a/dom/webidl/XPathEvaluator.webidl
+++ b/dom/webidl/XPathEvaluator.webidl
@@ -6,18 +6,18 @@
 
 interface XPathExpression;
 interface XPathNSResolver;
 interface XPathResult;
 
 [Constructor]
 interface XPathEvaluator {
   // Based on nsIDOMXPathEvaluator
-  [Creator, Throws]
+  [NewObject, Throws]
   XPathExpression createExpression(DOMString expression,
                                    XPathNSResolver? resolver);
-  [Creator, Throws]
+  [NewObject, Throws]
   XPathNSResolver createNSResolver(Node? nodeResolver);
   [Throws]
   XPathResult evaluate(DOMString expression, Node? contextNode,
                        XPathNSResolver? resolver, unsigned short type,
                        XPathResult? result);
 };