Closed Bug 1662771 Opened 4 years ago Closed 4 years ago

Remove willDestroy JSWindowActor method and update docs

Categories

(Core :: DOM: Content Processes, task, P3)

task

Tracking

()

RESOLVED FIXED
84 Branch
Fission Milestone M6c
Tracking Status
firefox84 --- fixed

People

(Reporter: cpeterson, Assigned: enndeakin)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/84922363f4014eae684aabc4f1d06380066494c5/dom/docs/ipc/jsactors.rst#207

willDestroy documentation recommends:

You should override this method if you have any cleanup you need to do before going away.

But willDestroy is not guaranteed to be called. The docs should instead recommend doing clean up (that doesn't require sending a message) in didDestroy.

Re-purposing this bug to remove willDestroy method as it was misused and we haven't found a strong reason to have it around. All uses of it will be replaced by didDestroy in bug 1651802. We also need to remove references to it in https://firefox-source-docs.mozilla.org/dom/ipc/jsactors.html#willdestroy .

Type: defect → task
Summary: Update willDestroy documentation to recommend doing clean up in didDestroy → Remove willDestroy JSWindowActor method and update docs
See Also: → 1642080
Depends on: 1651802
See Also: → 1661586

Steven, can we close this willDestroy meta bug now? Are there any more uses of willDesroy in code or docs that need to be removed?

Flags: needinfo?(smacleod)

(In reply to Chris Peterson [:cpeterson] from comment #2)

Steven, can we close this willDestroy meta bug now? Are there any more uses of willDesroy in code or docs that need to be removed?

It looks like at least TestProcessActor[1] still has a willDestroy() and that the actual machinery for willDestroy hasn't been removed at this point. If I recall correctly, Neil was going to be finishing that off? Either way I think Neil would be in a better position to fully answer this question and I've needinfo'd them.

[1] https://hg.mozilla.org/integration/autoland/file/5edc54d87ce82ee7866c30fd08225f21025ed755/toolkit/actors/TestProcessActorChild.jsm

Flags: needinfo?(smacleod) → needinfo?(enndeakin)

Yes, I am looking into removing the code that invokes willDestroy still.

Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Flags: needinfo?(enndeakin)
Pushed by neil@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/257be68f7462
remove willDestroy callback from JSActors, r=nika
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
See Also: → 1843958
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: