Closed Bug 1171305 Opened 9 years ago Closed 9 years ago

Remove lots of now-unnecessary null-checks involving XPCMaps

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

Part 2 of bug 1050035 removed a bunch of unnecessary null checks relating to
XPCMaps. But that patch got backed out. So here are those bits again.
This version is better than the previous version -- it removes some checks in
XPCWrappedNativeScope.cpp that I missed last time.

More importantly, the previous patch incorrectly assumed that
JSObject2WrappedJSMap::new() was infallible and called
mWrappedJSMap->ShutdownMarker() without a null-check. This patch fixes that by
making it (and JSObject2JSObjectMap::new()) infallible via the NS_ABORT_OOM
calls.
Attachment #8615039 - Flags: review?(mrbkap)
Attachment #8615039 - Flags: review?(mrbkap) → review+
Thank you for the fast review.
https://hg.mozilla.org/mozilla-central/rev/f8c84800344a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: