Closed Bug 1061891 Opened 10 years ago Closed 10 years ago

We can't check whether a nsMainThreadPtrHandle is null

Categories

(Core :: XPCOM, defect)

33 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

Attachments

(1 file, 1 obsolete file)

It is quite common to have a `nsMainThreadPtrHolder<someCallbackType>` that we want to dispatch to the main thread iff it is not null. At the moment, doing this is quite clumsy. However, I believe that we could easily add a method `isNull()` that would simplify things.
Summary: nsMainThreadPtrHolder should have a method isNull() → We can't check whether a nsMainThreadPtrHandle is null
Assignee: nobody → dteller
Attachment #8486343 - Flags: review?(bobbyholley)
Attachment #8486343 - Flags: review?(bobbyholley) → review+
I just realized that we can mark this `operator!` as `const`, so I did.

Try: https://tbpl.mozilla.org/?tree=Try&rev=82e3df1419ff
Attachment #8486343 - Attachment is obsolete: true
Attachment #8487819 - Flags: review?(bobbyholley)
Attachment #8487819 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/fd23aa1410fb
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: