Bug 758408 - Fix XML slot handling (r=Waldo)

This commit is contained in:
Bill McCloskey 2012-07-19 16:56:14 -07:00
parent d5a7a5b982
commit 483224b99d

View File

@ -7470,7 +7470,7 @@ namespace js {
bool bool
GlobalObject::getFunctionNamespace(JSContext *cx, Value *vp) GlobalObject::getFunctionNamespace(JSContext *cx, Value *vp)
{ {
HeapSlot &v = getSlotRef(FUNCTION_NS); Value v = getSlot(FUNCTION_NS);
if (v.isUndefined()) { if (v.isUndefined()) {
JSRuntime *rt = cx->runtime; JSRuntime *rt = cx->runtime;
JSLinearString *prefix = rt->atomState.typeAtoms[JSTYPE_FUNCTION]; JSLinearString *prefix = rt->atomState.typeAtoms[JSTYPE_FUNCTION];
@ -7489,7 +7489,8 @@ GlobalObject::getFunctionNamespace(JSContext *cx, Value *vp)
if (!JSObject::clearType(cx, obj)) if (!JSObject::clearType(cx, obj))
return false; return false;
v.set(this, FUNCTION_NS, ObjectValue(*obj)); v = ObjectValue(*obj);
setSlot(FUNCTION_NS, v);
} }
*vp = v; *vp = v;