Bug 1184564 part 2 - Use Value instead of jsval in dom/ and storage/. r=bz
authorJan de Mooij <jdemooij@mozilla.com>
Sat, 18 Jul 2015 21:45:35 +0200
changeset 253573 78740e4f499862f76bb0f8045d5398e8dcaf5aa2
parent 253572 5fc4e125b2b7c56d36efc0c1335cd71961570fe7
child 253574 88d00f2bce22ffd11044791ac6d1b7a4f06de049
push id62487
push userjandemooij@gmail.com
push dateSat, 18 Jul 2015 19:47:24 +0000
treeherdermozilla-inbound@52b5efb72cc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1184564
milestone42.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 1184564 part 2 - Use Value instead of jsval in dom/ and storage/. r=bz
dom/base/nsDOMClassInfo.cpp
dom/workers/Workers.h
storage/mozStorageAsyncStatementJSHelper.cpp
storage/mozStorageStatementJSHelper.cpp
storage/mozStorageStatementRow.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -897,27 +897,27 @@ nsDOMClassInfo::AddProperty(nsIXPConnect
 {
   NS_WARNING("nsDOMClassInfo::AddProperty Don't call me!");
 
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
 nsDOMClassInfo::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                            JSObject *obj, jsid id, jsval *vp,
+                            JSObject *obj, jsid id, JS::Value *vp,
                             bool *_retval)
 {
   NS_WARNING("nsDOMClassInfo::GetProperty Don't call me!");
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMClassInfo::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                            JSObject *obj, jsid id, jsval *vp,
+                            JSObject *obj, jsid id, JS::Value *vp,
                             bool *_retval)
 {
   NS_WARNING("nsDOMClassInfo::SetProperty Don't call me!");
 
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
@@ -1334,17 +1334,17 @@ public:
 
   nsresult PreCreate(JSContext *cx, JSObject *globalObj, JSObject **parentObj);
 
   nsresult Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                      JS::Handle<JSObject*> obj, const JS::CallArgs &args,
                      bool *_retval);
 
   nsresult HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                       JS::Handle<JSObject*> obj, const jsval &val, bool *bp,
+                       JS::Handle<JSObject*> obj, const JS::Value &val, bool *bp,
                        bool *_retval);
 
   nsresult ResolveInterfaceConstants(JSContext *cx, JS::Handle<JSObject*> obj);
 
 private:
   const nsGlobalNameStruct *GetNameStruct()
   {
     if (!mClassName) {
@@ -1494,17 +1494,17 @@ nsDOMConstructor::Construct(nsIXPConnect
   }
 
   return BaseStubConstructor(mWeakOwner, name_struct, cx, obj, args);
 }
 
 nsresult
 nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
                               JSContext * cx, JS::Handle<JSObject*> obj,
-                              const jsval &v, bool *bp, bool *_retval)
+                              const JS::Value &v, bool *bp, bool *_retval)
 
 {
   // No need to look these up in the hash.
   *bp = false;
   if (v.isPrimitive()) {
     return NS_OK;
   }
 
--- a/dom/workers/Workers.h
+++ b/dom/workers/Workers.h
@@ -335,17 +335,17 @@ public:
 
   // Generically useful function for running a bit of C++ code on the worker
   // thread.
   bool
   PostTask(WorkerTask* aTask);
 };
 
 WorkerCrossThreadDispatcher*
-GetWorkerCrossThreadDispatcher(JSContext* aCx, jsval aWorker);
+GetWorkerCrossThreadDispatcher(JSContext* aCx, JS::Value aWorker);
 
 // Random unique constant to facilitate JSPrincipal debugging
 const uint32_t kJSPrincipalsDebugToken = 0x7e2df9d2;
 
 namespace exceptions {
 
 // Implemented in Exceptions.cpp
 void
--- a/storage/mozStorageAsyncStatementJSHelper.cpp
+++ b/storage/mozStorageAsyncStatementJSHelper.cpp
@@ -23,17 +23,17 @@ namespace storage {
 
 ////////////////////////////////////////////////////////////////////////////////
 //// AsyncStatementJSHelper
 
 nsresult
 AsyncStatementJSHelper::getParams(AsyncStatement *aStatement,
                                   JSContext *aCtx,
                                   JSObject *aScopeObj,
-                                  jsval *_params)
+                                  JS::Value *_params)
 {
   MOZ_ASSERT(NS_IsMainThread());
   nsresult rv;
 
 #ifdef DEBUG
   int32_t state;
   (void)aStatement->GetState(&state);
   NS_ASSERTION(state == mozIStorageAsyncStatement::MOZ_STORAGE_STATEMENT_READY,
@@ -86,17 +86,17 @@ NS_INTERFACE_MAP_END
 #define XPC_MAP_FLAGS nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE
 #include "xpc_map_end.h"
 
 NS_IMETHODIMP
 AsyncStatementJSHelper::GetProperty(nsIXPConnectWrappedNative *aWrapper,
                                     JSContext *aCtx,
                                     JSObject *aScopeObj,
                                     jsid aId,
-                                    jsval *_result,
+                                    JS::Value *_result,
                                     bool *_retval)
 {
   if (!JSID_IS_STRING(aId))
     return NS_OK;
 
   // Cast to async via mozI* since direct from nsISupports is ambiguous.
   JS::RootedObject scope(aCtx, aScopeObj);
   JS::RootedId id(aCtx, aId);
--- a/storage/mozStorageStatementJSHelper.cpp
+++ b/storage/mozStorageStatementJSHelper.cpp
@@ -24,17 +24,17 @@ namespace storage {
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Global Functions
 
 static
 bool
 stepFunc(JSContext *aCtx,
          uint32_t,
-         jsval *_vp)
+         JS::Value *_vp)
 {
   nsCOMPtr<nsIXPConnect> xpc(Service::getXPConnect());
   nsCOMPtr<nsIXPConnectWrappedNative> wrapper;
   JSObject *obj = JS_THIS_OBJECT(aCtx, _vp);
   if (!obj) {
     return false;
   }
 
@@ -77,17 +77,17 @@ stepFunc(JSContext *aCtx,
 
 ////////////////////////////////////////////////////////////////////////////////
 //// StatementJSHelper
 
 nsresult
 StatementJSHelper::getRow(Statement *aStatement,
                           JSContext *aCtx,
                           JSObject *aScopeObj,
-                          jsval *_row)
+                          JS::Value *_row)
 {
   MOZ_ASSERT(NS_IsMainThread());
   nsresult rv;
 
 #ifdef DEBUG
   int32_t state;
   (void)aStatement->GetState(&state);
   NS_ASSERTION(state == mozIStorageStatement::MOZ_STORAGE_STATEMENT_EXECUTING,
@@ -121,17 +121,17 @@ StatementJSHelper::getRow(Statement *aSt
   _row->setObject(*obj);
   return NS_OK;
 }
 
 nsresult
 StatementJSHelper::getParams(Statement *aStatement,
                              JSContext *aCtx,
                              JSObject *aScopeObj,
-                             jsval *_params)
+                             JS::Value *_params)
 {
   MOZ_ASSERT(NS_IsMainThread());
   nsresult rv;
 
 #ifdef DEBUG
   int32_t state;
   (void)aStatement->GetState(&state);
   NS_ASSERTION(state == mozIStorageStatement::MOZ_STORAGE_STATEMENT_READY,
@@ -185,17 +185,17 @@ NS_INTERFACE_MAP_END
 #define XPC_MAP_FLAGS nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE
 #include "xpc_map_end.h"
 
 NS_IMETHODIMP
 StatementJSHelper::GetProperty(nsIXPConnectWrappedNative *aWrapper,
                                JSContext *aCtx,
                                JSObject *aScopeObj,
                                jsid aId,
-                               jsval *_result,
+                               JS::Value *_result,
                                bool *_retval)
 {
   if (!JSID_IS_STRING(aId))
     return NS_OK;
 
   JS::Rooted<JSObject*> scope(aCtx, aScopeObj);
   JS::Rooted<jsid> id(aCtx, aId);
 
--- a/storage/mozStorageStatementRow.cpp
+++ b/storage/mozStorageStatementRow.cpp
@@ -39,17 +39,17 @@ NS_IMPL_ISUPPORTS(
 #define XPC_MAP_FLAGS nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE
 #include "xpc_map_end.h"
 
 NS_IMETHODIMP
 StatementRow::GetProperty(nsIXPConnectWrappedNative *aWrapper,
                           JSContext *aCtx,
                           JSObject *aScopeObj,
                           jsid aId,
-                          jsval *_vp,
+                          JS::Value *_vp,
                           bool *_retval)
 {
   NS_ENSURE_TRUE(mStatement, NS_ERROR_NOT_INITIALIZED);
 
   JS::RootedObject scope(aCtx, aScopeObj);
   if (JSID_IS_STRING(aId)) {
     ::JSAutoByteString idBytes(aCtx, JSID_TO_STRING(aId));
     NS_ENSURE_TRUE(!!idBytes, NS_ERROR_OUT_OF_MEMORY);