Bug 1290337 - Part 20: Replace Value parameter to const Value& in storage. r=mak
authorTooru Fujisawa <arai_a@mac.com>
Sun, 11 Sep 2016 18:21:36 +0900
changeset 316065 a2c62b2557b44af96ccf8913cacc9a71cd292c51
parent 316064 a22273977e5ac0c81663ede57b6e280732e14f3c
child 316066 138dd1cfe696eb4adfe6e1f2290b29a352b4f650
push id30759
push userphilringnalda@gmail.com
push dateSat, 01 Oct 2016 06:25:09 +0000
treeherdermozilla-central@fcc62bbf09ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1290337
milestone52.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 1290337 - Part 20: Replace Value parameter to const Value& in storage. r=mak
storage/mozStoragePrivateHelpers.cpp
storage/mozStoragePrivateHelpers.h
--- a/storage/mozStoragePrivateHelpers.cpp
+++ b/storage/mozStoragePrivateHelpers.cpp
@@ -112,17 +112,17 @@ checkAndLogStatementPerformance(sqlite3_
 #endif
   message.AppendLiteral(" (http://mzl.la/1FuID0j).");
   NS_WARNING(message.get());
 }
 
 nsIVariant *
 convertJSValToVariant(
   JSContext *aCtx,
-  JS::Value aValue)
+  const JS::Value& aValue)
 {
   if (aValue.isInt32())
     return new IntegerVariant(aValue.toInt32());
 
   if (aValue.isDouble())
     return new FloatVariant(aValue.toDouble());
 
   if (aValue.isString()) {
--- a/storage/mozStoragePrivateHelpers.h
+++ b/storage/mozStoragePrivateHelpers.h
@@ -60,17 +60,17 @@ void checkAndLogStatementPerformance(sql
  *        The JSContext the value is from.
  * @param aValue
  *        The JavaScript value to convert.  All primitive types are supported,
  *        but only Date objects are supported from the Date family.  Date
  *        objects are coerced to PRTime (nanoseconds since epoch) values.
  * @return the variant if conversion was successful, nullptr if conversion
  *         failed.  The caller is responsible for addref'ing if non-null.
  */
-nsIVariant *convertJSValToVariant(JSContext *aCtx, JS::Value aValue);
+nsIVariant *convertJSValToVariant(JSContext *aCtx, const JS::Value& aValue);
 
 /**
  * Convert a provided nsIVariant implementation to our own thread-safe
  * refcounting implementation, if needed.
  *
  * @param aValue
  *        The original nsIVariant to be converted.
  * @return a thread-safe refcounting nsIVariant implementation.