Bug 469237: Use offsetof instead of a magic constant. r=jorendorff

This commit is contained in:
Jim Blandy 2009-04-07 15:41:47 -07:00
parent cbb1d7f51f
commit 065b4086c2

View File

@ -5892,7 +5892,7 @@ TraceRecorder::test_property_cache(JSObject* obj, LIns* obj_ins, JSObject*& obj2
// No need to guard native-ness of global object.
JS_ASSERT(OBJ_IS_NATIVE(globalObj));
if (aobj != globalObj) {
size_t op_offset = 0;
size_t op_offset = offsetof(JSObjectOps, newObjectMap);
if (mode == JOF_PROP || mode == JOF_VARPROP) {
JS_ASSERT(!(format & JOF_SET));
op_offset = offsetof(JSObjectOps, getProperty);