Bug 1017764 - Remove SCRIPTVERSION_DEFAULT; r=jst
authorMs2ger <ms2ger@gmail.com>
Fri, 06 Jun 2014 10:06:26 +0200
changeset 207367 9d393ad3c53933e2917241a9d9bdb2b7cf467625
parent 207366 a84bd62d0b55923920e97285f7fa7b20f99e368a
child 207368 ea5754fabd067926bfd3ac92bf3d3016d05d38a3
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs1017764
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 1017764 - Remove SCRIPTVERSION_DEFAULT; r=jst This define has outlived its usefulness, as we have moved away from a language-agnostic DOM.
dom/base/nsIScriptContext.h
dom/events/EventListenerManager.cpp
--- a/dom/base/nsIScriptContext.h
+++ b/dom/base/nsIScriptContext.h
@@ -25,20 +25,16 @@ class nsIObjectOutputStream;
 class nsIScriptObjectPrincipal;
 class nsIDOMWindow;
 class nsIURI;
 
 #define NS_ISCRIPTCONTEXT_IID \
 { 0x274840b6, 0x7349, 0x4798, \
   { 0xbe, 0x24, 0xbd, 0x75, 0xa6, 0x46, 0x99, 0xb7 } }
 
-/* This MUST match JSVERSION_DEFAULT.  This version stuff if we don't
-   know what language we have is a little silly... */
-#define SCRIPTVERSION_DEFAULT JSVERSION_DEFAULT
-
 class nsIOffThreadScriptReceiver;
 
 /**
  * It is used by the application to initialize a runtime and run scripts.
  * A script runtime would implement this interface.
  */
 class nsIScriptContext : public nsISupports
 {
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -872,17 +872,17 @@ EventListenerManager::CompileEventHandle
 
   // Get the reflector for |aElement|, so that we can pass to setElement.
   if (NS_WARN_IF(!WrapNewBindingObject(cx, target, aElement, &v))) {
     return NS_ERROR_FAILURE;
   }
   JS::CompileOptions options(cx);
   options.setIntroductionType("eventHandler")
          .setFileAndLine(url.get(), lineNo)
-         .setVersion(SCRIPTVERSION_DEFAULT)
+         .setVersion(JSVERSION_DEFAULT)
          .setElement(&v.toObject())
          .setElementAttributeName(jsStr)
          .setDefineOnScope(false);
 
   JS::Rooted<JSObject*> handler(cx);
   result = nsJSUtils::CompileFunction(cx, target, options,
                                       nsAtomCString(typeAtom),
                                       argCount, argNames, *body, handler.address());