Bug 845021: Add size_t cast in assertion, to silence build warning, in ObjectWrapperChild::AnswerNewEnumerateNext. r=Waldo
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 25 Feb 2013 13:46:56 -0800
changeset 122949 e6b97651a16725667a6469d559e22f8006fcce2d
parent 122948 ea8134dfa48112e07bc36b85ed353fbd245b8340
child 122950 3d958ab2652367c5409a2650c37226f1b87383a5
push id1387
push userphilringnalda@gmail.com
push dateTue, 26 Feb 2013 22:32:56 +0000
treeherderfx-team@ad4cc4e97774 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs845021
milestone22.0a1
Bug 845021: Add size_t cast in assertion, to silence build warning, in ObjectWrapperChild::AnswerNewEnumerateNext. r=Waldo
js/ipc/ObjectWrapperChild.cpp
--- a/js/ipc/ObjectWrapperChild.cpp
+++ b/js/ipc/ObjectWrapperChild.cpp
@@ -475,17 +475,17 @@ ObjectWrapperChild::AnswerNewEnumerateNe
 
     if (!strIds)
         return false;
 
     jsval v = JS_GetReservedSlot(state, sNextIdIndexSlot);
 
     int32_t i = JSVAL_TO_INT(v);
     NS_ASSERTION(i >= 0, "Index of next jsid negative?");
-    NS_ASSERTION(i <= strIds->Length(), "Index of next jsid too large?");
+    NS_ASSERTION(size_t(i) <= strIds->Length(), "Index of next jsid too large?");
 
     if (size_t(i) == strIds->Length()) {
         *status = JS_TRUE;
         return JSObject_to_JSVariant(cx, NULL, statep);
     }
 
     *idp = strIds->ElementAt(i);
     JS_SetReservedSlot(state, sNextIdIndexSlot, INT_TO_JSVAL(i + 1));