Bug 1256488 - Add explicit casts to fix MSVC warning C4365. r=fitzgen
authorKit Cambridge <kcambridge@mozilla.com>
Mon, 18 Apr 2016 17:29:43 -0700
changeset 332249 eb272cc767ac5a4f2bdcb6d8c1cce7f13db4d65d
parent 332248 ddd7892d4ed6c18b9bbc1a6e25803b5e628452a7
child 332250 296093225409c25a837753a753780d14ae20f965
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfitzgen
bugs1256488
milestone48.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 1256488 - Add explicit casts to fix MSVC warning C4365. r=fitzgen MozReview-Commit-ID: HuVL7COgcX7
js/public/Value.h
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -551,25 +551,25 @@ static inline bool
 JSVAL_IS_BOOLEAN_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_BOOLEAN;
 }
 
 static inline bool
 JSVAL_TO_BOOLEAN_IMPL(jsval_layout l)
 {
-    return l.s.payload.boo;
+    return bool(l.s.payload.boo);
 }
 
 static inline jsval_layout
 BOOLEAN_TO_JSVAL_IMPL(bool b)
 {
     jsval_layout l;
     l.s.tag = JSVAL_TAG_BOOLEAN;
-    l.s.payload.boo = b;
+    l.s.payload.boo = uint32_t(b);
     return l;
 }
 
 static inline bool
 JSVAL_IS_MAGIC_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_MAGIC;
 }