Bug 880917 - Remove support for munging JS versions from JSD. r=luke
☠☠ backed out by c0d176e71ce2 ☠ ☠
authorBobby Holley <bobbyholley@gmail.com>
Thu, 13 Jun 2013 10:09:24 -0700
changeset 146447 5192a9233d8389e211305dac1d5496e67a222b54
parent 146442 da56c7a59b9ee6abdea559157c9367b4de94660f
child 146448 08fe7b7774504712faf0ff5cf7dcfb8904a1af89
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs880917
milestone24.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 880917 - Remove support for munging JS versions from JSD. r=luke A quick grep of Firebug indicates that it doesn't use this. And even if I missed it, doing so from a debugger with the current semantics is a feature we can't support going forward.
js/jsd/idl/jsdIDebuggerService.idl
js/jsd/jsd_xpc.cpp
--- a/js/jsd/idl/jsdIDebuggerService.idl
+++ b/js/jsd/idl/jsdIDebuggerService.idl
@@ -40,17 +40,17 @@ interface jsdIValue;
 interface jsdIObject;
 interface jsdIProperty;
 interface jsdIActivationCallback;
 
 /**
  * Debugger service. It is not a good idea to have more than one active client
  * of the debugger service.
  */
-[scriptable, uuid(9be5b327-6818-464d-9695-f33885fd8377)]
+[scriptable, uuid(029b8f0a-aa84-47eb-a60f-1a4752b7ad06)]
 interface jsdIDebuggerService : nsISupports
 {
     /** Internal use only. */
     [noscript] readonly attribute JSDContext        JSDContext;
 
     /**
      * Called when an error or warning occurs.
      */
@@ -83,39 +83,16 @@ interface jsdIDebuggerService : nsISuppo
      * Called before and after a toplevel script is evaluated.
      */
     attribute jsdICallHook      topLevelHook;
     /**
      * Called before and after a function is called.
      */
     attribute jsdICallHook      functionHook;
 
-
-    /**
-     * VERSION_* values must be kept in sync with the JSVersion enumeration in
-     * jspubtd.h.
-     */
-
-    /**
-     * Possible values for jsdIScript::version and jsdIContext::version.
-     */
-    const long VERSION_1_0     = 100;
-    const long VERSION_1_1     = 110;
-    const long VERSION_1_2     = 120;
-    const long VERSION_1_3     = 130;
-    const long VERSION_1_4     = 140;
-    const long VERSION_1_5     = 150;
-    const long VERSION_DEFAULT = 0;
-    const long VERSION_UNKNOWN = -1;
-
-    /**
-     * These flags need to be kept in sync with the context flags defined in
-     * jsdebug.h
-     */
-
     /**
      * Link native frames in call stacks.
      */
     const unsigned long ENABLE_NATIVE_FRAMES     = 0x01;
     /**
      * Normally, if a script has a 0 in JSD_SCRIPT_PROFILE_BIT it is included in
      * profile data, otherwise it is not profiled. Setting the
      * PROFILE_WHEN_SET flag reverses this convention.
@@ -718,23 +695,16 @@ interface jsdIContext : jsdIEphemeral
      */
     const long OPT_ISUPPORTS   = 0x08;
     /**
      * OPT_* values above, OR'd together.
      */
     attribute unsigned long          options;
 
     /**
-     * Last version set on this context.
-     * Scripts typically select this with the "language" attribute.
-     * See the VERSION_* consts on jsdIDebuggerService.
-     */
-    attribute long                   version;
-
-    /**
      * Unique tag among all valid jsdIContext objects, useful as a hash key.
      */
     readonly attribute unsigned long tag;
 
     /**
      * Private data for this context, if it is an nsISupports, |null| otherwise.
      */
     readonly attribute nsISupports   privateData;
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -1689,33 +1689,16 @@ jsdContext::GetTag(uint32_t *_rval)
     if (!mTag)
         mTag = ++jsdContext::LastTag;
     
     *_rval = mTag;
     return NS_OK;
 }
 
 NS_IMETHODIMP
-jsdContext::GetVersion (int32_t *_rval)
-{
-    ASSERT_VALID_EPHEMERAL;
-    *_rval = static_cast<int32_t>(JS_GetVersion(mJSCx));
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-jsdContext::SetVersion (int32_t id)
-{
-    ASSERT_VALID_EPHEMERAL;
-    JSVersion ver = static_cast<JSVersion>(id);
-    JS_SetVersion(mJSCx, ver);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
 jsdContext::GetGlobalObject (jsdIValue **_rval)
 {
     ASSERT_VALID_EPHEMERAL;
     JSObject *glob = js::GetDefaultGlobalForContext(mJSCx);
     JSDValue *jsdv = JSD_NewValue (mJSDCx, OBJECT_TO_JSVAL(glob));
     if (!jsdv)
         return NS_ERROR_FAILURE;
     *_rval = jsdValue::FromPtr (mJSDCx, jsdv);