Bug 560643 - Add a special jsval type to XPIDL. Part 1, rename JSVal -> jsval in existing IDL. r+sr=jst.
authorJason Orendorff <jorendorff@mozilla.com>
Wed, 12 May 2010 08:18:51 -0500
changeset 42675 bff36a551ab7ef270abeaab81bcf690c2d08cf94
parent 42674 8cb8888c68d3506090aaf083564b8ae4df854161
child 42676 ccf4b3b2317cf0ef0e126efdaa0e835a33bc14de
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs560643
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 560643 - Add a special jsval type to XPIDL. Part 1, rename JSVal -> jsval in existing IDL. r+sr=jst.
caps/idl/nsIScriptSecurityManager.idl
dom/interfaces/json/nsIJSON.idl
extensions/jssh/nsJSSh.cpp
js/jsd/idl/jsdIDebuggerService.idl
js/src/xpconnect/idl/nsIDispatchSupport.idl
js/src/xpconnect/idl/nsIXPCScriptable.idl
js/src/xpconnect/idl/nsIXPCSecurityManager.idl
js/src/xpconnect/idl/nsIXPConnect.idl
js/src/xpconnect/shell/xpcshell.cpp
js/src/xpconnect/src/nsXPConnect.cpp
js/src/xpconnect/src/xpccomponents.cpp
js/src/xpconnect/src/xpcjsid.cpp
js/src/xpconnect/src/xpcruntimesvc.cpp
js/src/xpconnect/src/xpcwrappednative.cpp
js/src/xpconnect/tests/TestXPC.cpp
xpcom/ds/nsIVariant.idl
xpcom/ds/nsVariant.cpp
--- a/caps/idl/nsIScriptSecurityManager.idl
+++ b/caps/idl/nsIScriptSecurityManager.idl
@@ -46,17 +46,17 @@ interface nsIScriptSecurityManager : nsI
 {
     ///////////////// Security Checks //////////////////
     /**
      * Checks whether the running script is allowed to access aProperty.
      */
     [noscript] void checkPropertyAccess(in JSContextPtr aJSContext,
                                         in JSObjectPtr aJSObject,
                                         in string aClassName,
-                                        in JSVal aProperty,
+                                        in jsval aProperty,
                                         in PRUint32 aAction);
 
     /**
      * Check that the script currently running in context "cx" can load "uri".
      *
      * Will return error code NS_ERROR_DOM_BAD_URI if the load request 
      * should be denied.
      *
--- a/dom/interfaces/json/nsIJSON.idl
+++ b/dom/interfaces/json/nsIJSON.idl
@@ -41,17 +41,17 @@
 interface nsIInputStream;
 interface nsIOutputStream;
 interface nsIScriptGlobalObject;
 
 %{ C++
 #include "jspubtd.h"
 %}
 
-      native JSVal(jsval);
+      native jsval(jsval);
 [ptr] native JSValPtr(jsval);
 [ptr] native JSContext(JSContext);
 
 /**
  * Encode and decode JSON text.
  */
 [scriptable, uuid(6fcf09ee-87d0-42ec-a72a-8d60114e974f)]
 interface nsIJSON : nsISupports
@@ -66,10 +66,10 @@ interface nsIJSON : nsISupports
   void /* JSObject */ decode(in AString str);
 
   void /* JSObject */ decodeFromStream(in nsIInputStream stream,
                                        in long contentLength);
 
   [noscript] AString  encodeFromJSVal(in JSValPtr value, in JSContext cx);
 
   // Make sure you GCroot the result of this function before using it.
-  [noscript] JSVal    decodeToJSVal(in AString str, in JSContext cx);
+  [noscript] jsval    decodeToJSVal(in AString str, in JSContext cx);
 };
--- a/extensions/jssh/nsJSSh.cpp
+++ b/extensions/jssh/nsJSSh.cpp
@@ -740,17 +740,17 @@ nsJSSh::GetPrincipal()
                             nsIXPCScriptable::USE_JSSTUB_FOR_DELPROPERTY   | \
                             nsIXPCScriptable::USE_JSSTUB_FOR_SETPROPERTY   | \
                             nsIXPCScriptable::DONT_ENUM_STATIC_PROPS       | \
                             nsIXPCScriptable::DONT_ENUM_QUERY_INTERFACE    | \
                             nsIXPCScriptable::DONT_REFLECT_INTERFACE_NAMES
 #include "xpc_map_end.h" /* This will #undef the above */
 
 /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx,
-   in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+   in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsJSSh::NewResolve(nsIXPConnectWrappedNative *wrapper,
                    JSContext * cx, JSObject * obj,
                    jsval id, PRUint32 flags, 
                    JSObject * *objp, PRBool *_retval)
 {
   JSBool resolved;
   
--- a/js/jsd/idl/jsdIDebuggerService.idl
+++ b/js/jsd/idl/jsdIDebuggerService.idl
@@ -48,17 +48,17 @@
 [ptr] native JSDObject(JSDObject);
 [ptr] native JSDProperty(JSDProperty);
 [ptr] native JSDScript(JSDScript);
 [ptr] native JSDStackFrameInfo(JSDStackFrameInfo);
 [ptr] native JSDThreadState(JSDThreadState);
 [ptr] native JSDValue(JSDValue);
 [ptr] native JSRuntime(JSRuntime);
 [ptr] native JSContext(JSContext);
-native JSVal(jsval);
+native jsval(jsval);
 
 /* interfaces we declare in this file */
 interface jsdIDebuggerService;
 interface jsdIFilter;
 interface jsdINestCallback;
 interface jsdIFilterEnumerator;
 interface jsdIContextEnumerator;
 interface jsdIScriptEnumerator;
@@ -359,17 +359,17 @@ interface jsdIDebuggerService : nsISuppo
      * When called from another language this method returns an xpconnect
      * defined error code.
      */
     jsdIValue wrapValue (/*in jsvalue value*/);
 
     /**
      * The same as above but to be called from C++.
      */
-    [noscript] jsdIValue wrapJSValue (in JSVal value);
+    [noscript] jsdIValue wrapJSValue (in jsval value);
     
     /* XXX these two routines are candidates for refactoring.  The only problem
      * is that it is not clear where and how they should land.
      */
 
     /**
      * Push a new network queue, and enter a new UI event loop.
      * @param callback jsdINestCallback instance to be called back after the
--- a/js/src/xpconnect/idl/nsIDispatchSupport.idl
+++ b/js/src/xpconnect/idl/nsIDispatchSupport.idl
@@ -64,24 +64,24 @@ interface IDispatch;
 [uuid(38df70e9-12f8-4732-af91-df36c38dc6f6)]
 interface nsIDispatchSupport : nsISupports
 {
     /**
      * Converts a COM Variant to a jsval.
      * @param comvar The COM Variant to be converted.
      * @param val The jsval to receive the converted value.
      */
-    void COMVariant2JSVal(in COMVARIANTPtr comvar, out JSVal val);
+    void COMVariant2JSVal(in COMVARIANTPtr comvar, out jsval val);
 
     /**
      * Converts a jsval to a COM Variant
      * @param var The jsval to be converted.
      * @param comvar The COM Variant to receive the converted value
      */
-    void JSVal2COMVariant(in JSVal var, out COMVARIANT comvar);
+    void JSVal2COMVariant(in jsval var, out COMVARIANT comvar);
     
     /**
      * Test if the class is safe to host.
      * @param clsid The nsID representation of the CLSID to test.
      * @param classExists Returns containing PR_FALSE if the class is
      *                    not registered.
      */
     boolean isClassSafeToHost(in JSContextPtr cx, in nsCIDRef cid,
--- a/js/src/xpconnect/idl/nsIXPCScriptable.idl
+++ b/js/src/xpconnect/idl/nsIXPCScriptable.idl
@@ -117,74 +117,74 @@ interface nsIXPCScriptable : nsISupports
 
     void   create(in nsIXPConnectWrappedNative wrapper,
                   in JSContextPtr cx, in JSObjectPtr obj);
 
     void   postCreate(in nsIXPConnectWrappedNative wrapper,
                       in JSContextPtr cx, in JSObjectPtr obj);
 
     PRBool addProperty(in nsIXPConnectWrappedNative wrapper,
-                       in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                       in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                        in JSValPtr vp);
 
     PRBool delProperty(in nsIXPConnectWrappedNative wrapper,
-                       in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                       in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                        in JSValPtr vp);
 
     // The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if
     // this method does something.
     PRBool getProperty(in nsIXPConnectWrappedNative wrapper,
-                       in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                       in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                        in JSValPtr vp);
 
     // The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if
     // this method does something.
     PRBool setProperty(in nsIXPConnectWrappedNative wrapper,
-                       in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                       in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                        in JSValPtr vp);
 
     PRBool enumerate(in nsIXPConnectWrappedNative wrapper,
                      in JSContextPtr cx, in JSObjectPtr obj);
 
     PRBool newEnumerate(in nsIXPConnectWrappedNative wrapper,
                         in JSContextPtr cx, in JSObjectPtr obj,
                         in PRUint32 enum_op, in JSValPtr statep, out JSID idp);
 
     PRBool newResolve(in nsIXPConnectWrappedNative wrapper,
-                      in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                      in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                       in PRUint32 flags, out JSObjectPtr objp);
 
     PRBool convert(in nsIXPConnectWrappedNative wrapper,
                    in JSContextPtr cx, in JSObjectPtr obj,
                    in PRUint32 type, in JSValPtr vp);
 
     void   finalize(in nsIXPConnectWrappedNative wrapper,
                     in JSContextPtr cx, in JSObjectPtr obj);
 
     PRBool checkAccess(in nsIXPConnectWrappedNative wrapper,
-                       in JSContextPtr cx, in JSObjectPtr obj, in JSVal id,
+                       in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
                        in PRUint32 mode, in JSValPtr vp);
 
     PRBool call(in nsIXPConnectWrappedNative wrapper,
                 in JSContextPtr cx, in JSObjectPtr obj,
                 in PRUint32 argc, in JSValPtr argv, in JSValPtr vp);
 
     PRBool construct(in nsIXPConnectWrappedNative wrapper,
                      in JSContextPtr cx, in JSObjectPtr obj,
                      in PRUint32 argc, in JSValPtr argv, in JSValPtr vp);
 
     PRBool hasInstance(in nsIXPConnectWrappedNative wrapper,
                        in JSContextPtr cx, in JSObjectPtr obj,
-                       in JSVal val, out PRBool bp);
+                       in jsval val, out PRBool bp);
 
     void trace(in nsIXPConnectWrappedNative wrapper,
                in JSTracerPtr trc, in JSObjectPtr obj);
 
     PRBool equality(in nsIXPConnectWrappedNative wrapper,
-                    in JSContextPtr cx, in JSObjectPtr obj, in JSVal val);
+                    in JSContextPtr cx, in JSObjectPtr obj, in jsval val);
 
     JSObjectPtr outerObject(in nsIXPConnectWrappedNative wrapper,
                             in JSContextPtr cx, in JSObjectPtr obj);
 
     JSObjectPtr innerObject(in nsIXPConnectWrappedNative wrapper,
                             in JSContextPtr cx, in JSObjectPtr obj);
 
     void postCreatePrototype(in JSContextPtr cx, in JSObjectPtr proto);
--- a/js/src/xpconnect/idl/nsIXPCSecurityManager.idl
+++ b/js/src/xpconnect/idl/nsIXPCSecurityManager.idl
@@ -47,17 +47,17 @@
 
 class nsAXPCNativeCallContext;
 %}
 
 interface nsIClassInfo;
 
 [ptr] native JSContextPtr(JSContext);
 [ptr] native JSObjectPtr(JSObject);
-      native JSVal(jsval);
+      native jsval(jsval);
 [ptr] native JSStackFramePtr(JSStackFrame);
 
 [uuid(31431440-f1ce-11d2-985a-006008962422)]
 interface nsIXPCSecurityManager : nsISupports
 {
     /**
     * These flags are used when calling nsIXPConnect::SetSecurityManager
     */
@@ -104,11 +104,11 @@ interface nsIXPCSecurityManager : nsISup
     const PRUint32 ACCESS_SET_PROPERTY = 2;
 
     void CanAccess(in PRUint32 aAction,
                    in nsAXPCNativeCallContextPtr aCallContext,
                    in JSContextPtr aJSContext,
                    in JSObjectPtr aJSObject,
                    in nsISupports aObj,
                    in nsIClassInfo aClassInfo,
-                   in JSVal aName,
+                   in jsval aName,
                    inout voidPtr aPolicy);
 };
--- a/js/src/xpconnect/idl/nsIXPConnect.idl
+++ b/js/src/xpconnect/idl/nsIXPConnect.idl
@@ -54,17 +54,17 @@
 %{ C++
 #include "jspubtd.h"
 #include "xptinfo.h"
 #include "nsAXPCNativeCallContext.h"
 %}
 
 /***************************************************************************/
 
-// NB: JSVal is declared in nsIVariant.idl
+// NB: jsval is declared in nsIVariant.idl
 
 [ptr] native JSContextPtr(JSContext);
 [ptr] native JSClassPtr(JSClass);
 [ptr] native JSObjectPtr(JSObject);
 [ptr] native JSValPtr(jsval);
       native JSPropertyOp(JSPropertyOp);
       native JSEqualityOp(JSEqualityOp);
       native JSID(jsid);
@@ -175,18 +175,18 @@ interface nsIXPConnectWrappedNative : ns
     readonly attribute nsISupports      Native;
     readonly attribute JSObjectPtr      JSObjectPrototype;
 
     /**
      * These are here as an aid to nsIXPCScriptable implementors
      */
 
     readonly attribute nsIXPConnect XPConnect;
-    nsIInterfaceInfo FindInterfaceWithMember(in JSVal nameID);
-    nsIInterfaceInfo FindInterfaceWithName(in JSVal nameID);
+    nsIInterfaceInfo FindInterfaceWithMember(in jsval nameID);
+    nsIInterfaceInfo FindInterfaceWithName(in jsval nameID);
 
     void debugDump(in short depth);
 
     void refreshPrototype();
     /* 
      * This returns a pointer into the instance and care should be taken
      * to make sure the pointer is not kept past the life time of the
      * object it points into.
@@ -495,17 +495,17 @@ interface nsIXPConnect : nsISupports
      * aJSContext.
      */
     void
     wrapNativeToJSVal(in JSContextPtr aJSContext,
                       in JSObjectPtr  aScope,
                       in nsISupports  aCOMObj,
                       in nsIIDPtr     aIID,
                       in boolean      aAllowWrapper,
-                      out JSVal       aVal,
+                      out jsval       aVal,
                       out nsIXPConnectJSObjectHolder aHolder);
 
     /**
     * wrapJS will yield a new or previously existing xpcom interface pointer
     * to represent the JSObject passed in.
     *
     * This method now correctly deals with cases where the passed in JSObject
     * already has an associated xpcom interface for the cases:
@@ -528,17 +528,17 @@ interface nsIXPConnect : nsISupports
     */
     void
     wrapJS(in JSContextPtr aJSContext,
            in JSObjectPtr  aJSObj,
            in nsIIDRef     aIID,
            [iid_is(aIID),retval] out nsQIResult result);
 
     /**
-     * Wraps the given JSVal in a nsIVariant and returns the new variant.
+     * Wraps the given jsval in a nsIVariant and returns the new variant.
      */
     nsIVariant
     jSValToVariant(in JSContextPtr cx, in JSValPtr aJSVal);
 
     /**
     * This only succeeds if the JSObject is a nsIXPConnectWrappedNative.
     * A new wrapper is *never* constructed.
     */
@@ -660,18 +660,18 @@ interface nsIXPConnect : nsISupports
 
     nsIXPConnectJSObjectHolder
     getWrappedNativePrototype(in JSContextPtr aJSContext,
                               in JSObjectPtr  aScope,
                               in nsIClassInfo aClassInfo);
 
     void releaseJSContext(in JSContextPtr aJSContext, in PRBool noGC);
 
-    JSVal variantToJS(in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value);
-    nsIVariant JSToVariant(in JSContextPtr ctx, in JSVal value);
+    jsval variantToJS(in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value);
+    nsIVariant JSToVariant(in JSContextPtr ctx, in jsval value);
 
     /**
      * Preconfigure XPCNativeWrapper automation so that when a scripted
      * caller whose filename starts with filenamePrefix accesses a wrapped
      * native that is not flagged as "system", the wrapped native will be
      * automatically wrapped with an XPCNativeWrapper.
      *
      * @param aFilenamePrefix the UTF-8 filename prefix to match, which
@@ -718,37 +718,37 @@ interface nsIXPConnect : nsISupports
      *                         computation (including exceptions) will
      *                         be coerced into strings created in the
      *                         sandbox.
      * @return The result of the evaluation as a jsval. If the caller
      *         intends to use the return value from this call the caller
      *         is responsible for rooting the jsval before making a call
      *         to this method.
      */
-    [noscript] JSVal evalInSandboxObject(in AString source, in JSContextPtr cx,
+    [noscript] jsval evalInSandboxObject(in AString source, in JSContextPtr cx,
                                          in nsIXPConnectJSObjectHolder sandbox,
                                          in PRBool returnStringOnly);
 
     /**
      * Wrap a jsval in a cross origin wrapper.
      * @param aJSContext A context to use to create objects.
      * @param aParent The parent to create the wrapper with.
      * @param aWrappedObj The object to wrap.
      */
-    [noscript] JSVal getXOWForObject(in JSContextPtr aJSContext,
+    [noscript] jsval getXOWForObject(in JSContextPtr aJSContext,
                                      in JSObjectPtr aParent,
                                      in JSObjectPtr aWrappedObj);
 
     /**
      * Wrap a jsval in a chrome object wrapper.
      * @param aJSContext A context to use to create objects.
      * @param aParent The parent to create the wrapper with.
      * @param aWrappedObj The object to wrap.
      */
-    [noscript] JSVal getCOWForObject(in JSContextPtr aJSContext,
+    [noscript] jsval getCOWForObject(in JSContextPtr aJSContext,
                                      in JSObjectPtr aParent,
                                      in JSObjectPtr aWrappedObj);
 
     /**
      * Tells updateXOWs to clear the scope of all of the XOWs it finds.
      */
     const PRUint32 XPC_XOW_CLEARSCOPE = 1;
 
@@ -844,17 +844,17 @@ interface nsIXPConnect : nsISupports
      *     is given then aFilenameFlags will not be calculated and will be
      *     assumed to be 0 unless another value is given. If this parameter is
      *     null then aFilenameFlags will be calculated and the value of that
      *     argument will be ignored.
      * @param aFilenameFlags
      *     The filename flags from the script that will use this wrapper. See
      *     above (aPrincipal) for details.
      */
-    [noscript] JSVal getWrapperForObject(
+    [noscript] jsval getWrapperForObject(
         in JSContextPtr aJSContext,
         in JSObjectPtr aObject,
         in JSObjectPtr aScope,
         in nsIPrincipal aPrincipal,
         in unsigned long aFilenameFlags);
 
 %{C++
 #ifndef XPCONNECT_STANDALONE
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -1317,28 +1317,28 @@ FullTrustSecMan::CanCreateInstance(JSCon
 
 NS_IMETHODIMP
 FullTrustSecMan::CanGetService(JSContext * aJSContext, const nsCID & aCID)
 {
     return NS_OK;
 }
 
 #ifndef XPCONNECT_STANDALONE
-/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in JSVal aName, inout voidPtr aPolicy); */
+/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in jsval aName, inout voidPtr aPolicy); */
 NS_IMETHODIMP
 FullTrustSecMan::CanAccess(PRUint32 aAction,
                            nsAXPCNativeCallContext *aCallContext,
                            JSContext * aJSContext, JSObject * aJSObject,
                            nsISupports *aObj, nsIClassInfo *aClassInfo,
                            jsval aName, void * *aPolicy)
 {
     return NS_OK;
 }
 
-/* [noscript] void checkPropertyAccess (in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in string aClassName, in JSVal aProperty, in PRUint32 aAction); */
+/* [noscript] void checkPropertyAccess (in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in string aClassName, in jsval aProperty, in PRUint32 aAction); */
 NS_IMETHODIMP
 FullTrustSecMan::CheckPropertyAccess(JSContext * aJSContext,
                                      JSObject * aJSObject,
                                      const char *aClassName,
                                      jsval aProperty, PRUint32 aAction)
 {
     return NS_OK;
 }
--- a/js/src/xpconnect/src/nsXPConnect.cpp
+++ b/js/src/xpconnect/src/nsXPConnect.cpp
@@ -1329,17 +1329,17 @@ nsXPConnect::WrapNative(JSContext * aJSC
         return UnexpectedFailure(NS_ERROR_FAILURE);
     XPCLazyCallContext lccx(ccx);
 
     jsval v;
     return NativeInterface2JSObject(lccx, aScope, aCOMObj, &aIID, PR_FALSE, &v,
                                     aHolder);
 }
 
-/* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDPtr aIID, out JSVal aVal, out nsIXPConnectJSObjectHolder aHolder); */
+/* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDPtr aIID, out jsval aVal, out nsIXPConnectJSObjectHolder aHolder); */
 NS_IMETHODIMP
 nsXPConnect::WrapNativeToJSVal(JSContext * aJSContext,
                                JSObject * aScope,
                                nsISupports *aCOMObj,
                                const nsIID * aIID,
                                PRBool aAllowWrapping,
                                jsval *aVal,
                                nsIXPConnectJSObjectHolder **aHolder)
@@ -2127,17 +2127,17 @@ nsXPConnect::GetWrappedNativePrototype(J
                                                      proto->GetJSProtoObject());
     if(!holder)
         return UnexpectedFailure(NS_ERROR_FAILURE);
 
     NS_ADDREF(holder);
     return NS_OK;
 }
 
-/* [noscript] JSVal GetCrossOriginWrapperForValue(in JSContextPtr aJSContext, in JSVal aCurrentVal); */
+/* [noscript] jsval GetCrossOriginWrapperForValue(in JSContextPtr aJSContext, in jsval aCurrentVal); */
 NS_IMETHODIMP
 nsXPConnect::GetXOWForObject(JSContext * aJSContext,
                              JSObject * aParent,
                              JSObject * aWrappedObj,
                              jsval * rval)
 {
     *rval = OBJECT_TO_JSVAL(aWrappedObj);
     return XPCCrossOriginWrapper::WrapObject(aJSContext, aParent, rval)
@@ -2356,17 +2356,17 @@ nsXPConnect::DebugDumpEvalInJSStackFrame
     else if(!cx)
         printf("there is no JSContext on the nsIThreadJSContextStack!\n");
     else
         xpc_DumpEvalInJSStackFrame(cx, aFrameNumber, aSourceText);
 
     return NS_OK;
 }
 
-/* JSVal variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */
+/* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */
 NS_IMETHODIMP 
 nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scope, nsIVariant* value, jsval* _retval)
 {
     NS_PRECONDITION(ctx, "bad param");
     NS_PRECONDITION(scope, "bad param");
     NS_PRECONDITION(value, "bad param");
     NS_PRECONDITION(_retval, "bad param");
 
@@ -2382,17 +2382,17 @@ nsXPConnect::VariantToJS(JSContext* ctx,
             return rv;
 
         return NS_ERROR_FAILURE;
     }
 
     return NS_OK;
 }
 
-/* nsIVariant JSToVariant (in JSContextPtr ctx, in JSVal value); */
+/* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */
 NS_IMETHODIMP 
 nsXPConnect::JSToVariant(JSContext* ctx, jsval value, nsIVariant** _retval)
 {
     NS_PRECONDITION(ctx, "bad param");
     NS_PRECONDITION(value, "bad param");
     NS_PRECONDITION(_retval, "bad param");
 
     XPCCallContext ccx(NATIVE_CALLER, ctx);
--- a/js/src/xpconnect/src/xpccomponents.cpp
+++ b/js/src/xpconnect/src/xpccomponents.cpp
@@ -321,17 +321,17 @@ nsXPCComponents_Interfaces::NewEnumerate
         default:
             e = (nsIEnumerator*) JSVAL_TO_PRIVATE(*statep);
             NS_IF_RELEASE(e);
             *statep = JSVAL_NULL;
             return NS_OK;
     }
 }
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents_Interfaces::NewResolve(nsIXPConnectWrappedNative *wrapper,
                                        JSContext * cx, JSObject * obj,
                                        jsval id, PRUint32 flags,
                                        JSObject * *objp, PRBool *_retval)
 {
     const char* name = nsnull;
 
@@ -655,17 +655,17 @@ nsXPCComponents_InterfacesByID::NewEnume
         default:
             e = (nsIEnumerator*) JSVAL_TO_PRIVATE(*statep);
             NS_IF_RELEASE(e);
             *statep = JSVAL_NULL;
             return NS_OK;
     }
 }
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents_InterfacesByID::NewResolve(nsIXPConnectWrappedNative *wrapper,
                                            JSContext * cx, JSObject * obj,
                                            jsval id, PRUint32 flags,
                                            JSObject * *objp, PRBool *_retval)
 {
     const jschar* name = nsnull;
 
@@ -960,17 +960,17 @@ nsXPCComponents_Classes::NewEnumerate(ns
         default:
             e = (nsISimpleEnumerator*) JSVAL_TO_PRIVATE(*statep);
             NS_IF_RELEASE(e);
             *statep = JSVAL_NULL;
             return NS_OK;
     }
 }
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents_Classes::NewResolve(nsIXPConnectWrappedNative *wrapper,
                                     JSContext * cx, JSObject * obj,
                                     jsval id, PRUint32 flags,
                                     JSObject * *objp, PRBool *_retval)
 
 {
     const char* name = nsnull;
@@ -1231,17 +1231,17 @@ IsRegisteredCLSID(const char* str)
     nsCOMPtr<nsIComponentRegistrar> compMgr;
     if(NS_FAILED(NS_GetComponentRegistrar(getter_AddRefs(compMgr))) || !compMgr ||
        NS_FAILED(compMgr->IsCIDRegistered(id, &registered)))
         return PR_FALSE;
 
     return registered;
 }
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents_ClassesByID::NewResolve(nsIXPConnectWrappedNative *wrapper,
                                         JSContext * cx, JSObject * obj,
                                         jsval id, PRUint32 flags,
                                         JSObject * *objp, PRBool *_retval)
 {
     const char* name = nsnull;
 
@@ -1468,17 +1468,17 @@ nsXPCComponents_Results::NewEnumerate(ns
             iter = (void**) JSVAL_TO_PRIVATE(*statep);
             delete [] (char*) iter;
             *statep = JSVAL_NULL;
             return NS_OK;
     }
 }
 
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents_Results::NewResolve(nsIXPConnectWrappedNative *wrapper,
                                     JSContext * cx, JSObject * obj,
                                     jsval id, PRUint32 flags,
                                     JSObject * *objp, PRBool *_retval)
 {
     const char* name = nsnull;
 
@@ -1724,17 +1724,17 @@ nsXPCComponents_ID::CallOrConstruct(nsIX
     JSObject* newobj = xpc_NewIDObject(cx, obj, id);
 
     if(vp)
         *vp = OBJECT_TO_JSVAL(newobj);
 
     return NS_OK;
 }
 
-/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
+/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
 NS_IMETHODIMP
 nsXPCComponents_ID::HasInstance(nsIXPConnectWrappedNative *wrapper,
                                 JSContext * cx, JSObject * obj,
                                 jsval val, PRBool *bp, PRBool *_retval)
 {
     if(bp)
         *bp = JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIJSID));
     return NS_OK;
@@ -2000,17 +2000,17 @@ nsXPCComponents_Exception::CallOrConstru
     }
 
     if(vp)
         *vp = OBJECT_TO_JSVAL(newObj);
 
     return NS_OK;
 }
 
-/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
+/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
 NS_IMETHODIMP
 nsXPCComponents_Exception::HasInstance(nsIXPConnectWrappedNative *wrapper,
                                        JSContext * cx, JSObject * obj,
                                        jsval val, PRBool *bp,
                                        PRBool *_retval)
 {
     if(bp)
         *bp = JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIException));
@@ -2630,17 +2630,17 @@ nsXPCComponents_Constructor::CallOrConst
     }
 
     if(vp)
         *vp = OBJECT_TO_JSVAL(newObj);
 
     return NS_OK;
 }
 
-/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
+/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
 NS_IMETHODIMP
 nsXPCComponents_Constructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
                                          JSContext * cx, JSObject * obj,
                                          jsval val, PRBool *bp,
                                          PRBool *_retval)
 {
     if(bp)
         *bp = JSValIsInterfaceOfType(cx, val, NS_GET_IID(nsIXPCConstructor));
@@ -4068,17 +4068,17 @@ nsXPCComponents::GetManager(nsIComponent
 #define XPC_MAP_CLASSNAME           nsXPCComponents
 #define XPC_MAP_QUOTED_CLASSNAME   "nsXPCComponents"
 #define                             XPC_MAP_WANT_NEWRESOLVE
 #define                             XPC_MAP_WANT_GETPROPERTY
 #define                             XPC_MAP_WANT_SETPROPERTY
 #define XPC_MAP_FLAGS               nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE
 #include "xpc_map_end.h" /* This will #undef the above */
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 nsXPCComponents::NewResolve(nsIXPConnectWrappedNative *wrapper,
                             JSContext * cx, JSObject * obj,
                             jsval id, PRUint32 flags,
                             JSObject * *objp, PRBool *_retval)
 {
     XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
     if(!rt)
@@ -4099,17 +4099,17 @@ nsXPCComponents::NewResolve(nsIXPConnect
 
     *objp = obj;
     *_retval = JS_DefinePropertyById(cx, obj, idid, JSVAL_VOID, nsnull, nsnull,
                                      JSPROP_ENUMERATE | JSPROP_PERMANENT |
                                      attrs);
     return NS_OK;
 }
 
-/* PRBool getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp); */
+/* PRBool getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in JSValPtr vp); */
 NS_IMETHODIMP
 nsXPCComponents::GetProperty(nsIXPConnectWrappedNative *wrapper,
                              JSContext * cx, JSObject * obj,
                              jsval id, jsval * vp, PRBool *_retval)
 {
     XPCContext* xpcc = XPCContext::GetXPCContext(cx);
     if(!xpcc)
         return NS_ERROR_FAILURE;
@@ -4134,17 +4134,17 @@ nsXPCComponents::GetProperty(nsIXPConnec
         if(!JS_NewNumberValue(cx, (jsdouble) res, vp))
             return NS_ERROR_OUT_OF_MEMORY;
         rv = NS_SUCCESS_I_DID_SOMETHING;
     }
 
     return rv;
 }
 
-/* PRBool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp); */
+/* PRBool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in JSValPtr vp); */
 NS_IMETHODIMP
 nsXPCComponents::SetProperty(nsIXPConnectWrappedNative *wrapper,
                              JSContext * cx, JSObject * obj, jsval id,
                              jsval * vp, PRBool *_retval)
 {
     XPCContext* xpcc = XPCContext::GetXPCContext(cx);
     if(!xpcc)
         return NS_ERROR_FAILURE;
--- a/js/src/xpconnect/src/xpcjsid.cpp
+++ b/js/src/xpconnect/src/xpcjsid.cpp
@@ -465,17 +465,17 @@ nsJSIID::NewID(nsIInterfaceInfo* aInfo)
         return nsnull;
 
     nsJSIID* idObj = new nsJSIID(aInfo);
     NS_IF_ADDREF(idObj);
     return idObj;
 }
 
 
-/* PRBool resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id); */
+/* PRBool resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id); */
 NS_IMETHODIMP
 nsJSIID::NewResolve(nsIXPConnectWrappedNative *wrapper,
                     JSContext * cx, JSObject * obj,
                     jsval id, PRUint32 flags,
                     JSObject * *objp, PRBool *_retval)
 {
     XPCCallContext ccx(JS_CALLER, cx);
 
@@ -536,17 +536,17 @@ nsJSIID::Enumerate(nsIXPConnectWrappedNa
            !xpc_ForcePropertyResolve(cx, obj, member->GetName()))
         {
             return NS_ERROR_UNEXPECTED;
         }
     }
     return NS_OK;
 }
 
-/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
+/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
 NS_IMETHODIMP
 nsJSIID::HasInstance(nsIXPConnectWrappedNative *wrapper,
                      JSContext * cx, JSObject * obj,
                      jsval val, PRBool *bp, PRBool *_retval)
 {
     *bp = JS_FALSE;
     nsresult rv = NS_OK;
 
@@ -922,17 +922,17 @@ nsJSCID::Construct(nsIXPConnectWrappedNa
     XPCCallContext ccx(JS_CALLER, cx, obj, nsnull,
                        rt->GetStringJSVal(XPCJSRuntime::IDX_CREATE_INSTANCE),
                        argc, argv, vp);
 
     *_retval = XPCWrappedNative::CallMethod(ccx);
     return NS_OK;
 }
 
-/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
+/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
 NS_IMETHODIMP
 nsJSCID::HasInstance(nsIXPConnectWrappedNative *wrapper,
                      JSContext * cx, JSObject * obj,
                      jsval val, PRBool *bp, PRBool *_retval)
 {
     *bp = JS_FALSE;
     nsresult rv = NS_OK;
 
--- a/js/src/xpconnect/src/xpcruntimesvc.cpp
+++ b/js/src/xpconnect/src/xpcruntimesvc.cpp
@@ -60,17 +60,17 @@ NS_IMPL_THREADSAFE_RELEASE(BackstagePass
 #define XPC_MAP_FLAGS       nsIXPCScriptable::USE_JSSTUB_FOR_ADDPROPERTY   | \
                             nsIXPCScriptable::USE_JSSTUB_FOR_DELPROPERTY   | \
                             nsIXPCScriptable::USE_JSSTUB_FOR_SETPROPERTY   | \
                             nsIXPCScriptable::DONT_ENUM_STATIC_PROPS       | \
                             nsIXPCScriptable::DONT_ENUM_QUERY_INTERFACE    | \
                             nsIXPCScriptable::DONT_REFLECT_INTERFACE_NAMES
 #include "xpc_map_end.h" /* This will #undef the above */
 
-/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */
+/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 BackstagePass::NewResolve(nsIXPConnectWrappedNative *wrapper,
                           JSContext * cx, JSObject * obj,
                           jsval id, PRUint32 flags, 
                           JSObject * *objp, PRBool *_retval)
 {
     JSBool resolved;
 
--- a/js/src/xpconnect/src/xpcwrappednative.cpp
+++ b/js/src/xpconnect/src/xpcwrappednative.cpp
@@ -3047,34 +3047,34 @@ NS_IMETHODIMP XPCWrappedNative::GetXPCon
         NS_IF_ADDREF(temp);
         *aXPConnect = temp;
     }
     else
         *aXPConnect = nsnull;
     return NS_OK;
 }
 
-/* XPCNativeInterface FindInterfaceWithMember (in JSVal name); */
+/* XPCNativeInterface FindInterfaceWithMember (in jsval name); */
 NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(jsval name, nsIInterfaceInfo * *_retval)
 {
     XPCNativeInterface* iface;
     XPCNativeMember*  member;
 
     if(GetSet()->FindMember(name, &member, &iface) && iface)
     {
         nsIInterfaceInfo* temp = iface->GetInterfaceInfo();
         NS_IF_ADDREF(temp);
         *_retval = temp;
     }
     else
         *_retval = nsnull;
     return NS_OK;
 }
 
-/* XPCNativeInterface FindInterfaceWithName (in JSVal name); */
+/* XPCNativeInterface FindInterfaceWithName (in jsval name); */
 NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithName(jsval name, nsIInterfaceInfo * *_retval)
 {
     XPCNativeInterface* iface = GetSet()->FindNamedInterface(name);
     if(iface)
     {
         nsIInterfaceInfo* temp = iface->GetInterfaceInfo();
         NS_IF_ADDREF(temp);
         *_retval = temp;
--- a/js/src/xpconnect/tests/TestXPC.cpp
+++ b/js/src/xpconnect/tests/TestXPC.cpp
@@ -278,17 +278,17 @@ MySecMan::CanGetService(JSContext * aJSC
                     "security exception")));
             return NS_ERROR_FAILURE;
         default:
             NS_ERROR("bad case");
             return NS_OK;
     }
 }
 
-/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in JSVal aName, inout voidPtr aPolicy); */
+/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in jsval aName, inout voidPtr aPolicy); */
 NS_IMETHODIMP 
 MySecMan::CanAccess(PRUint32 aAction, nsAXPCNativeCallContext *aCallContext, JSContext * aJSContext, JSObject * aJSObject, nsISupports *aObj, nsIClassInfo *aClassInfo, jsval aName, void * *aPolicy)
 {
     switch(mMode)
     {
         case OK_ALL:
             return NS_OK;
         case VETO_ALL:
--- a/xpcom/ds/nsIVariant.idl
+++ b/xpcom/ds/nsIVariant.idl
@@ -76,17 +76,17 @@ interface nsIDataType : nsISupports
     const PRUint16 VTYPE_EMPTY_ARRAY         = 254;
     const PRUint16 VTYPE_EMPTY               = 255;
 };
 
 %{ C++
 #include "jspubtd.h"
 %}
 
-native JSVal(jsval);
+native jsval(jsval);
 
 /**
  * XPConnect has magic to transparently convert between nsIVariant and JS types.
  * We mark the interface [scriptable] so that JS can use methods
  * that refer to this interface. But we mark all the methods and attributes
  * [noscript] since any nsIVariant object will be automatically converted to a
  * JS type anyway.
  */
@@ -112,17 +112,17 @@ interface nsIVariant : nsISupports
     [notxpcom] nsresult     getAsID(out nsID retval);
     [noscript] AString      getAsAString();
     [noscript] DOMString    getAsDOMString();
     [noscript] ACString     getAsACString();
     [noscript] AUTF8String  getAsAUTF8String();
     [noscript] string       getAsString();
     [noscript] wstring      getAsWString();
     [noscript] nsISupports  getAsISupports();
-    [noscript] JSVal        getAsJSVal();
+    [noscript] jsval        getAsJSVal();
 
     [noscript] void getAsInterface(out nsIIDPtr iid, 
                                    [iid_is(iid), retval] out nsQIResult iface);
 
     [notxpcom] nsresult getAsArray(out PRUint16 type, out nsIID iid,
                                    out PRUint32 count, out voidPtr ptr);
 
     [noscript] void getAsStringWithSize(out PRUint32 size, 
--- a/xpcom/ds/nsVariant.cpp
+++ b/xpcom/ds/nsVariant.cpp
@@ -1884,17 +1884,17 @@ NS_IMETHODIMP nsVariant::GetAsWString(PR
 NS_IMETHODIMP nsVariant::GetAsISupports(nsISupports **_retval)
 {
     return nsVariant::ConvertToISupports(mData, _retval);
 }
 
 /* jsval getAsJSVal() */
 NS_IMETHODIMP nsVariant::GetAsJSVal(jsval *_retval)
 {
-    // Can only get the JSVal from an XPCVariant.
+    // Can only get the jsval from an XPCVariant.
     return NS_ERROR_CANNOT_CONVERT_DATA;
 }
 
 /* void getAsInterface (out nsIIDPtr iid, [iid_is (iid), retval] out nsQIResult iface); */
 NS_IMETHODIMP nsVariant::GetAsInterface(nsIID * *iid, void * *iface)
 {
     return nsVariant::ConvertToInterface(mData, iid, iface);
 }