Clarify the ownership of xptiInterfaceInfo pointers in xptiprivate.h; r=froydnj

RESOLVED FIXED in mozilla38

Status

()

Core
XPCOM
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Away for a while, Assigned: Away for a while)

Tracking

(Blocks: 1 bug)

unspecified
mozilla38
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

3 years ago
Assignee: nobody → ehsan
Blocks: 1114683
(Assignee)

Comment 1

3 years ago
Created attachment 8550809 [details] [diff] [review]
Clarify the ownership of xptiInterfaceInfo pointers in xptiprivate.h
Attachment #8550809 - Flags: review?(nfroyd)
Comment on attachment 8550809 [details] [diff] [review]
Clarify the ownership of xptiInterfaceInfo pointers in xptiprivate.h

Review of attachment 8550809 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
@@ -689,4 @@
>                   !mParent &&
>                   mEntry->Parent(),
>                  "bad BuildParent call");
> -    mParent = mEntry->Parent()->InterfaceInfo().take();

Ha!

::: xpcom/reflect/xptinfo/xptiprivate.h
@@ +304,5 @@
>  
>      xptiInterfaceEntry*     mParent;      // Valid only when fully resolved
>  
> +    xptiInterfaceInfo* MOZ_UNSAFE_REF("The safety of this pointer is ensured "
> +                                      "by the semantics of XPTIWorkingSet.")

xptiWorkingSet, please, so grep can find it easily.
Attachment #8550809 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/b8f271c913a9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.