Back out revision 2a1149f381ed (bug 873209) because apparently pushValue does not adjust the frame size and hence we got a CLOSED TREE

This commit is contained in:
Boris Zbarsky 2013-05-17 23:03:38 -04:00
parent 9787473d56
commit 83c903514d
4 changed files with 12 additions and 7 deletions

View File

@ -6242,9 +6242,8 @@ CodeGenerator::visitGetDOMProperty(LGetDOMProperty *ins)
masm.checkStackAlignment();
// Make space for the outparam. Pre-initialize it to UndefinedValue so we
// can trace it at GC time.
masm.pushValue(UndefinedValue());
/* Make Space for the outparam */
masm.adjustStack(-int32_t(sizeof(Value)));
masm.movePtr(StackPointer, ValueReg);
masm.Push(ObjectReg);
@ -6308,7 +6307,7 @@ CodeGenerator::visitSetDOMProperty(LSetDOMProperty *ins)
masm.checkStackAlignment();
// Push the argument. Rooting will happen at GC time.
// Push thei argument. Rooting will happen at GC time.
ValueOperand argVal = ToValue(ins, LSetDOMProperty::Value);
masm.Push(argVal);
masm.movePtr(StackPointer, ValueReg);

View File

@ -832,14 +832,14 @@ MarkIonExitFrame(JSTracer *trc, const IonFrameIterator &frame)
if (frame.isDOMExit()) {
IonDOMExitFrameLayout *dom = frame.exitFrame()->DOMExit();
gc::MarkObjectRoot(trc, dom->thisObjAddress(), "ion-dom-args");
if (dom->isMethodFrame()) {
if (dom->isSetterFrame()) {
gc::MarkValueRoot(trc, dom->vp(), "ion-dom-args");
} else if (dom->isMethodFrame()) {
IonDOMMethodExitFrameLayout *method =
reinterpret_cast<IonDOMMethodExitFrameLayout *>(dom);
size_t len = method->argc() + 2;
Value *vp = method->vp();
gc::MarkValueRootRange(trc, len, vp, "ion-dom-args");
} else {
gc::MarkValueRoot(trc, dom->vp(), "ion-dom-args");
}
return;
}

View File

@ -397,6 +397,9 @@ class IonDOMExitFrameLayout
inline JSObject **thisObjAddress() {
return &thisObj;
}
inline bool isSetterFrame() {
return footer_.ionCode() == ION_FRAME_DOMSETTER;
}
inline bool isMethodFrame() {
return footer_.ionCode() == ION_FRAME_DOMMETHOD;
}

View File

@ -362,6 +362,9 @@ class IonDOMExitFrameLayout
inline JSObject **thisObjAddress() {
return &thisObj;
}
inline bool isSetterFrame() {
return footer_.ionCode() == ION_FRAME_DOMSETTER;
}
inline bool isMethodFrame() {
return footer_.ionCode() == ION_FRAME_DOMMETHOD;
}