[INFER] Fix broken DefineConstructorAndPrototype logic, make jstype unsigned.

This commit is contained in:
Brian Hackett 2011-03-31 03:26:10 -07:00
parent 4b2582d94a
commit 41b3f4b682
2 changed files with 5 additions and 5 deletions

View File

@ -74,7 +74,7 @@ struct ClonedTypeSet;
* lower 3 bits indicate a particular primitive type below, and if those bits
* are zero then a pointer to a type object.
*/
typedef jsword jstype;
typedef jsuword jstype;
/* The primitive types. */
const jstype TYPE_UNDEFINED = 1;

View File

@ -4011,11 +4011,11 @@ DefineConstructorAndPrototype(JSContext *cx, JSObject *obj, JSProtoKey key, JSAt
* inference may need to access these, and js_GetClassPrototype will
* fail if it tries to do a reentrant reconstruction of the class.
*/
if (key != JSProto_Null && !(clasp->flags & JSCLASS_CONSTRUCT_PROTOTYPE) &&
!SetClassObject(cx, obj, key, fun, proto)) {
goto bad;
if (key != JSProto_Null && !(clasp->flags & JSCLASS_CONSTRUCT_PROTOTYPE)) {
if (!SetClassObject(cx, obj, key, fun, proto))
goto bad;
cached = true;
}
cached = true;
AutoValueRooter tvr2(cx, ObjectValue(*fun));
if (!DefineStandardSlot(cx, obj, key, atom, tvr2.value(), 0, named))