Closed Bug 1247362 Opened 4 years ago Closed 4 years ago

move mAnonymousGlobalScope tracing into nsMessageManagerScriptExecutor

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

It's silly that we trace nsMessageManagerScriptExecutor::mAnonymousGlobalScope
in its separate subclasses.  mccr8 points out this is probably because we don't
have a good way of inheriting from multiple CC'd classes at the moment.  Be
that as it may, we can at least make things better by moving the common code
into a method on nsMessageManagerScriptExecutor and calling that from the
subclasses.
Having a Trace method seems to be how things are done elsewhere, though that's
not very a descriptive name.  I could change things to call:

  tmp->nsMessageManagerScriptExecutor::Trace(aCallbacks, aClosure);

to make things a little more obvious at the callsites, if you like.
Attachment #8718018 - Flags: review?(continuation)
Attachment #8718018 - Flags: review?(continuation) → review+
(In reply to Nathan Froyd [:froydnj] from comment #1)
> Having a Trace method seems to be how things are done elsewhere, though
> that's
> not very a descriptive name.  I could change things to call:
> 
>   tmp->nsMessageManagerScriptExecutor::Trace(aCallbacks, aClosure);
> 
> to make things a little more obvious at the callsites, if you like.
Yes, I think that would be nicer, thanks.
https://hg.mozilla.org/mozilla-central/rev/66066bb4a97e
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.