Closed Bug 738996 Opened 8 years ago Closed 8 years ago

Remove agnostic Hold/DropScriptObject nsContentUtils functions

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
There's some nice code removal to be done here.
Attachment #609042 - Flags: review?(mrbkap)
Peterv should probably look at the patch.
(It looks good to me.)
Attachment #609042 - Flags: review?(mrbkap) → review+
Peter, please let me know if you still need to review.
Comment on attachment 609042 [details] [diff] [review]
Patch v1

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

::: dom/src/events/nsJSEventListener.cpp
@@ +86,5 @@
>    // until we are done with it.
>    NS_ASSERTION(aScopeObject && aContext,
>                 "EventListener with no context or scope?");
> +  nsContentUtils::HoldJSObjects(this,
> +                                &NS_CYCLE_COLLECTION_NAME(nsJSEventListener));

I think this needs to use NS_HOLD_JS_OBJECTS since you also use NS_DROP_JS_OBJECTS.

@@ +92,5 @@
>  
>  nsJSEventListener::~nsJSEventListener() 
>  {
> +  if (mContext) {
> +    nsContentUtils::DropJSObjects(this);

I think this needs to use NS_DROP_JS_OBJECTS.
https://hg.mozilla.org/mozilla-central/rev/8f188d988941
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
Depends on: 907364
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.