Bug 677993 followup: Use uintptr_t instead of size_t for casting unsigned values to/from void*, in JSObject::getArrayLength & setArrayLength. rs=waldo
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 12 Aug 2011 11:28:51 -0700
changeset 74354 88e9970b7e8000344740bff062aa1d21074bae2e
parent 74353 fcb383e5e61e14659c3b488cd7c171e2d4b9fdb0
child 74355 56eaf58dc5fba57e88eb8991cafd1abb19ef17f3
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerswaldo
bugs677993
milestone8.0a1
Bug 677993 followup: Use uintptr_t instead of size_t for casting unsigned values to/from void*, in JSObject::getArrayLength & setArrayLength. rs=waldo
js/src/jsobjinlines.h
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -338,24 +338,24 @@ JSObject::slotsAndStructSize(uint32 nslo
     return sizeof(js::Value) * (ndslots + nfslots)
            + (isFun ? sizeof(JSFunction) : sizeof(JSObject));
 }
 
 inline uint32
 JSObject::getArrayLength() const
 {
     JS_ASSERT(isArray());
-    return (uint32)(size_t) getPrivate();
+    return (uint32)(uintptr_t) getPrivate();
 }
 
 inline void
 JSObject::setArrayLength(uint32 length)
 {
     JS_ASSERT(isArray());
-    setPrivate((void*)(size_t)length);
+    setPrivate((void*)(uintptr_t) length);
 }
 
 inline uint32
 JSObject::getDenseArrayCapacity()
 {
     JS_ASSERT(isDenseArray());
     return numSlots();
 }