Bug 1613465 - Remove two null checks of infallible new in XPConnect. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D61742

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew McCreight 2020-02-06 13:19:58 +00:00
parent 095594eed0
commit 78d52fad9d
2 changed files with 1 additions and 4 deletions

View File

@ -252,9 +252,6 @@ already_AddRefed<XPCNativeInterface> XPCNativeInterface::NewInstance(
if (totalCount > MAX_LOCAL_MEMBER_COUNT) {
members = new XPCNativeMember[totalCount];
if (!members) {
return nullptr;
}
} else {
members = local_members;
}

View File

@ -119,7 +119,7 @@ XPCWrappedNativeProto* XPCWrappedNativeProto::GetNewOrUsed(
proto = new XPCWrappedNativeProto(scope, classInfo, set.forget());
if (!proto || !proto->Init(cx, scriptable)) {
if (!proto->Init(cx, scriptable)) {
delete proto.get();
return nullptr;
}