Remove agnostic Hold/DropScriptObject nsContentUtils functions

RESOLVED FIXED in mozilla14

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 609042 [details] [diff] [review]
Patch v1

There's some nice code removal to be done here.
Attachment #609042 - Flags: review?(mrbkap)

Comment 1

5 years ago
Peterv should probably look at the patch.
(It looks good to me.)

Updated

5 years ago
Attachment #609042 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 2

5 years ago
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.
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/8f188d988941
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
(Assignee)

Updated

4 years ago
Depends on: 907364
You need to log in before you can comment on or make changes to this bug.