mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 932530 - Check return of getType in more places; r=djvj
--HG-- extra : rebase_source : 58f83c065dd227ba14243891da6b12a6d610765c
This commit is contained in:
parent
3eb838cbbb
commit
6b2b9a1e43
@ -4730,8 +4730,10 @@ DoSetElemFallback(JSContext *cx, BaselineFrame *frame, ICSetElem_Fallback *stub,
|
||||
if (CanOptimizeDenseSetElem(cx, obj, index.toInt32(), oldShape, oldCapacity, oldInitLength,
|
||||
&addingCase, &protoDepth))
|
||||
{
|
||||
RootedTypeObject type(cx, obj->getType(cx));
|
||||
RootedShape shape(cx, obj->lastProperty());
|
||||
RootedTypeObject type(cx, obj->getType(cx));
|
||||
if (!type)
|
||||
return false;
|
||||
|
||||
if (addingCase && !DenseSetElemStubExists(cx, ICStub::SetElem_DenseAdd, stub, obj)) {
|
||||
IonSpew(IonSpew_BaselineIC,
|
||||
@ -9328,6 +9330,9 @@ ICUpdatedStub *
|
||||
ICSetProp_Native::Compiler::getStub(ICStubSpace *space)
|
||||
{
|
||||
RootedTypeObject type(cx, obj_->getType(cx));
|
||||
if (!type)
|
||||
return nullptr;
|
||||
|
||||
RootedShape shape(cx, obj_->lastProperty());
|
||||
ICUpdatedStub *stub = ICSetProp_Native::New(space, getStubCode(), type, shape, offset_);
|
||||
if (!stub || !stub->initUpdatingChain(cx, space))
|
||||
|
@ -4951,6 +4951,9 @@ class ICSetPropNativeAddCompiler : public ICStubCompiler {
|
||||
ICUpdatedStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes)
|
||||
{
|
||||
RootedTypeObject type(cx, obj_->getType(cx));
|
||||
if (!type)
|
||||
return nullptr;
|
||||
|
||||
RootedShape newShape(cx, obj_->lastProperty());
|
||||
|
||||
return ICSetProp_NativeAddImpl<ProtoChainDepth>::New(
|
||||
|
Loading…
Reference in New Issue
Block a user