mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 866112 - GC: Fix some misc rooting hazards in the shell r=terrence
This commit is contained in:
parent
672186739c
commit
18ed8e4e2b
@ -7601,7 +7601,8 @@ template <size_t ProtoChainDepth>
|
||||
ICUpdatedStub *
|
||||
ICSetElemDenseAddCompiler::getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes)
|
||||
{
|
||||
return ICSetElem_DenseAddImpl<ProtoChainDepth>::New(space, getStubCode(), obj_->getType(cx),
|
||||
Rooted<IonCode *> stubCode(cx, getStubCode());
|
||||
return ICSetElem_DenseAddImpl<ProtoChainDepth>::New(space, stubCode, obj_->getType(cx),
|
||||
shapes);
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ ion::CanEnterBaselineJIT(JSContext *cx, JSScript *scriptArg, StackFrame *fp, boo
|
||||
if (IsJSDEnabled(cx)) {
|
||||
if (JSOp(*cx->regs().pc) == JSOP_LOOPENTRY) // No OSR.
|
||||
return Method_Skipped;
|
||||
} else if (scriptArg->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) {
|
||||
} else if (script->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) {
|
||||
return Method_Skipped;
|
||||
}
|
||||
|
||||
|
@ -176,11 +176,11 @@ fun_getProperty(JSContext *cx, HandleObject obj_, HandleId id, MutableHandleValu
|
||||
/*
|
||||
* Censor the caller if we don't have full access to it.
|
||||
*/
|
||||
JSObject &caller = vp.toObject();
|
||||
if (caller.isWrapper() && !Wrapper::wrapperHandler(&caller)->isSafeToUnwrap()) {
|
||||
RootedObject caller(cx, &vp.toObject());
|
||||
if (caller->isWrapper() && !Wrapper::wrapperHandler(caller)->isSafeToUnwrap()) {
|
||||
vp.setNull();
|
||||
} else if (caller.isFunction()) {
|
||||
JSFunction *callerFun = caller.toFunction();
|
||||
} else if (caller->isFunction()) {
|
||||
JSFunction *callerFun = caller->toFunction();
|
||||
if (callerFun->isInterpreted() && callerFun->strict()) {
|
||||
JS_ReportErrorFlagsAndNumber(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL,
|
||||
JSMSG_CALLER_IS_STRICT);
|
||||
|
Loading…
Reference in New Issue
Block a user