Bug 1290337 - Part 16: Replace Value parameter to const Value& in dom. r=smaug
This commit is contained in:
@@ -112,7 +112,7 @@ DoDrawImageSecurityCheck(dom::HTMLCanvasElement *aCanvasElement,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CoerceDouble(JS::Value v, double* d)
|
CoerceDouble(const JS::Value& v, double* d)
|
||||||
{
|
{
|
||||||
if (v.isDouble()) {
|
if (v.isDouble()) {
|
||||||
*d = v.toDouble();
|
*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
|
// Make a double out of |v|, treating undefined values as 0.0 (for
|
||||||
// the sake of sparse arrays). Return true iff coercion
|
// the sake of sparse arrays). Return true iff coercion
|
||||||
// succeeded.
|
// succeeded.
|
||||||
bool CoerceDouble(JS::Value v, double* d);
|
bool CoerceDouble(const JS::Value& v, double* d);
|
||||||
|
|
||||||
/* Float validation stuff */
|
/* Float validation stuff */
|
||||||
#define VALIDATE(_f) if (!IsFinite(_f)) return false
|
#define VALIDATE(_f) if (!IsFinite(_f)) return false
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ NPVariantToJSVal(NPP npp, JSContext *cx, const NPVariant *variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
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!");
|
NS_ASSERTION(npp, "Must have an NPP to wrap a jsval!");
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool
|
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_
|
#endif // nsJSNPRuntime_h_
|
||||||
|
|||||||
@@ -6655,7 +6655,7 @@ EventTarget::IsOnCurrentThread(bool* aIsOnCurrentThread)
|
|||||||
BEGIN_WORKERS_NAMESPACE
|
BEGIN_WORKERS_NAMESPACE
|
||||||
|
|
||||||
WorkerCrossThreadDispatcher*
|
WorkerCrossThreadDispatcher*
|
||||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, JS::Value aWorker)
|
GetWorkerCrossThreadDispatcher(JSContext* aCx, const JS::Value& aWorker)
|
||||||
{
|
{
|
||||||
if (!aWorker.isObject()) {
|
if (!aWorker.isObject()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
WorkerCrossThreadDispatcher*
|
WorkerCrossThreadDispatcher*
|
||||||
GetWorkerCrossThreadDispatcher(JSContext* aCx, JS::Value aWorker);
|
GetWorkerCrossThreadDispatcher(JSContext* aCx, const JS::Value& aWorker);
|
||||||
|
|
||||||
// Random unique constant to facilitate JSPrincipal debugging
|
// Random unique constant to facilitate JSPrincipal debugging
|
||||||
const uint32_t kJSPrincipalsDebugToken = 0x7e2df9d2;
|
const uint32_t kJSPrincipalsDebugToken = 0x7e2df9d2;
|
||||||
|
|||||||
Reference in New Issue
Block a user