Backed out bug 480657. Massive failures across all platforms.
This commit is contained in:
@@ -2010,57 +2010,6 @@ js_Object(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
#ifdef JS_TRACER
|
||||
JSObject* FASTCALL
|
||||
js_Object_tn(JSContext* cx, JSObject* ctor)
|
||||
{
|
||||
JS_ASSERT(HAS_FUNCTION_CLASS(ctor));
|
||||
JSFunction* fun = GET_FUNCTION_PRIVATE(cx, ctor);
|
||||
JSClass* clasp = (FUN_INTERPRETED(fun) || (fun->flags & JSFUN_TRACEABLE))
|
||||
? &js_ObjectClass
|
||||
: FUN_CLASP(fun);
|
||||
JS_ASSERT(clasp != &js_ArrayClass);
|
||||
|
||||
JS_LOCK_OBJ(cx, ctor);
|
||||
JSScope *scope = OBJ_SCOPE(ctor);
|
||||
JS_ASSERT(scope->object == ctor);
|
||||
JSAtom* atom = cx->runtime->atomState.classPrototypeAtom;
|
||||
|
||||
JSScopeProperty *sprop = SCOPE_GET_PROPERTY(scope, ATOM_TO_JSID(atom));
|
||||
JS_ASSERT(SPROP_HAS_VALID_SLOT(sprop, scope));
|
||||
jsval v = LOCKED_OBJ_GET_SLOT(ctor, sprop->slot);
|
||||
JS_UNLOCK_SCOPE(cx, scope);
|
||||
|
||||
JSObject* proto;
|
||||
if (JSVAL_IS_PRIMITIVE(v)) {
|
||||
if (!js_GetClassPrototype(cx, JSVAL_TO_OBJECT(ctor->fslots[JSSLOT_PARENT]),
|
||||
INT_TO_JSID(JSProto_Object), &proto)) {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
proto = JSVAL_TO_OBJECT(v);
|
||||
}
|
||||
|
||||
JS_ASSERT(JS_ON_TRACE(cx));
|
||||
JSObject* obj = (JSObject*) js_NewGCThing(cx, GCX_OBJECT, sizeof(JSObject));
|
||||
if (!obj)
|
||||
return NULL;
|
||||
|
||||
obj->classword = jsuword(clasp);
|
||||
obj->fslots[JSSLOT_PROTO] = OBJECT_TO_JSVAL(proto);
|
||||
obj->fslots[JSSLOT_PARENT] = ctor->fslots[JSSLOT_PARENT];
|
||||
for (unsigned i = JSSLOT_PRIVATE; i != JS_INITIAL_NSLOTS; ++i)
|
||||
obj->fslots[i] = JSVAL_VOID;
|
||||
|
||||
obj->map = js_HoldObjectMap(cx, proto->map);
|
||||
obj->dslots = NULL;
|
||||
return obj;
|
||||
}
|
||||
|
||||
JS_DEFINE_TRCINFO_1(js_Object,
|
||||
(2, (extern, CONSTRUCTOR_RETRY, js_Object_tn, CONTEXT, CALLEE, 0, 0)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Given pc pointing after a property accessing bytecode, return true if the
|
||||
* access is "object-detecting" in the sense used by web scripts, e.g., when
|
||||
@@ -2633,14 +2582,9 @@ js_InitEval(JSContext *cx, JSObject *obj)
|
||||
JSObject *
|
||||
js_InitObjectClass(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
JSObject *proto = JS_InitClass(cx, obj, NULL, &js_ObjectClass, js_Object,
|
||||
1, object_props, object_methods, NULL,
|
||||
object_static_methods);
|
||||
#ifdef JS_TRACER
|
||||
if (proto)
|
||||
js_SetTraceableNative(cx, proto, js_Object_trcinfo);
|
||||
#endif
|
||||
return proto;
|
||||
return JS_InitClass(cx, obj, NULL, &js_ObjectClass, js_Object, 1,
|
||||
object_props, object_methods, NULL,
|
||||
object_static_methods);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -5651,15 +5595,6 @@ js_GetWrappedObject(JSContext *cx, JSObject *obj)
|
||||
return obj;
|
||||
}
|
||||
|
||||
void
|
||||
js_SetTraceableNative(JSContext *cx, JSObject *proto, JSTraceableNative *trcinfo)
|
||||
{
|
||||
JSFunction *fun = GET_FUNCTION_PRIVATE(cx, JS_GetConstructor(cx, proto));
|
||||
JS_ASSERT(!(fun->flags & JSFUN_TRACEABLE));
|
||||
fun->u.n.trcinfo = trcinfo;
|
||||
fun->flags |= JSFUN_TRACEABLE;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user