зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290337 - Part 16: Replace Value parameter to const Value& in dom. r=smaug
This commit is contained in:
Родитель
681cacc1f6
Коммит
26cadb42f0
|
@ -112,7 +112,7 @@ DoDrawImageSecurityCheck(dom::HTMLCanvasElement *aCanvasElement,
|
|||
}
|
||||
|
||||
bool
|
||||
CoerceDouble(JS::Value v, double* d)
|
||||
CoerceDouble(const JS::Value& v, double* d)
|
||||
{
|
||||
if (v.isDouble()) {
|
||||
*d = v.toDouble();
|
||||
|
|
|
@ -49,7 +49,7 @@ void DoDrawImageSecurityCheck(dom::HTMLCanvasElement *aCanvasElement,
|
|||
// Make a double out of |v|, treating undefined values as 0.0 (for
|
||||
// the sake of sparse arrays). Return true iff coercion
|
||||
// succeeded.
|
||||
bool CoerceDouble(JS::Value v, double* d);
|
||||
bool CoerceDouble(const JS::Value& v, double* d);
|
||||
|
||||
/* Float validation stuff */
|
||||
#define VALIDATE(_f) if (!IsFinite(_f)) return false
|
||||
|
|
|
@ -539,7 +539,7 @@ NPVariantToJSVal(NPP npp, JSContext *cx, const NPVariant *variant)
|
|||
}
|
||||
|
||||
bool
|
||||
JSValToNPVariant(NPP npp, JSContext *cx, JS::Value val, NPVariant *variant)
|
||||
JSValToNPVariant(NPP npp, JSContext *cx, const JS::Value& val, NPVariant *variant)
|
||||
{
|
||||
NS_ASSERTION(npp, "Must have an NPP to wrap a jsval!");
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ public:
|
|||
};
|
||||
|
||||
bool
|
||||
JSValToNPVariant(NPP npp, JSContext *cx, JS::Value val, NPVariant *variant);
|
||||
JSValToNPVariant(NPP npp, JSContext *cx, const JS::Value& val, NPVariant *variant);
|
||||
|
||||
|
||||
#endif // nsJSNPRuntime_h_
|
||||
|
|
|
@ -6655,7 +6655,7 @@ EventTarget::IsOnCurrentThread(bool* aIsOnCurrentThread)
|
|||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
WorkerCrossThreadDispatcher*
|
||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, JS::Value aWorker)
|
||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, const JS::Value& aWorker)
|
||||
{
|
||||
if (!aWorker.isObject()) {
|
||||
return nullptr;
|
||||
|
|
|
@ -348,7 +348,7 @@ public:
|
|||
};
|
||||
|
||||
WorkerCrossThreadDispatcher*
|
||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, JS::Value aWorker);
|
||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, const JS::Value& aWorker);
|
||||
|
||||
// Random unique constant to facilitate JSPrincipal debugging
|
||||
const uint32_t kJSPrincipalsDebugToken = 0x7e2df9d2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче