mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
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:
parent
095594eed0
commit
78d52fad9d
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user