Bug 1162766 - Fix more bad implicit constructors in js. r=evilpie
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Thu, 07 May 2015 15:24:56 -0700
changeset 243388 8bcd2e511413b074af96c3a1727d35d384e8f804
parent 243387 730d9ce9776b6936f90d295ca2e2ff65d903885d
child 243389 107ff1a3cebd31da16c14b6bb69d3751bea2f4a4
push id28738
push usercbook@mozilla.com
push dateTue, 12 May 2015 14:11:31 +0000
treeherderautoland@bedce1b405a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs1162766
milestone40.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 1162766 - Fix more bad implicit constructors in js. r=evilpie
js/src/builtin/Intl.cpp
js/src/jit/JitcodeMap.cpp
--- a/js/src/builtin/Intl.cpp
+++ b/js/src/builtin/Intl.cpp
@@ -247,18 +247,18 @@ static void
 unum_setTextAttribute(UNumberFormat* fmt, UNumberFormatTextAttribute tag, const UChar* newValue,
                       int32_t newValueLength, UErrorCode* status)
 {
     MOZ_CRASH("unum_setTextAttribute: Intl API disabled");
 }
 
 class Locale {
   public:
-    Locale(const char* language, const char* country = 0, const char* variant = 0,
-           const char* keywordsAndValues = 0);
+    explicit Locale(const char* language, const char* country = 0, const char* variant = 0,
+                    const char* keywordsAndValues = 0);
 };
 
 Locale::Locale(const char* language, const char* country, const char* variant,
                const char* keywordsAndValues)
 {
     MOZ_CRASH("Locale::Locale: Intl API disabled");
 }
 
--- a/js/src/jit/JitcodeMap.cpp
+++ b/js/src/jit/JitcodeMap.cpp
@@ -1182,17 +1182,17 @@ struct JitcodeMapBufferWriteSpewer
             buffer[bytes*3 - 1] = '\0';
 
         JitSpew(JitSpew_Profiling, "%s@%d[%d bytes] - %s", name, int(startPos), int(bytes), buffer);
 
         // Move to the end of the current buffer.
         startPos = writer->length();
     }
 #else // !DEBUG
-    JitcodeMapBufferWriteSpewer(CompactBufferWriter& w) {}
+    explicit JitcodeMapBufferWriteSpewer(CompactBufferWriter& w) {}
     void spewAndAdvance(const char* name) {}
 #endif // DEBUG
 };
 
 // Write a run, starting at the given NativeToBytecode entry, into the given buffer writer.
 /* static */ bool
 JitcodeRegionEntry::WriteRun(CompactBufferWriter& writer,
                              JSScript** scriptList, uint32_t scriptListSize,