Closed Bug 1701765 Opened 3 years ago Closed 3 years ago

Inline nsDocumentViewer::CallChildren() calls in HintCharacterSet code

Categories

(Core :: Internationalization, task)

task

Tracking

()

RESOLVED FIXED
89 Branch
Fission Milestone Future
Tracking Status
firefox89 --- fixed

People

(Reporter: cpeterson, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

@ Henri, nsDocumentViewer::CallChildren() does not work for OOP frames. The callers were audited in bug 1597474. kmag suggests that the remaining callers of nsDocumentViewer::CallChildren() from HintCharacterSet code either rename the CallChildren function or inline its code into the caller's function.

What do you recommend?

https://searchfox.org/mozilla-central/search?case=true&q=CallChildren

Flags: needinfo?(hsivonen)

This HintCharacterSet refactoring doesn't need to block Fission.

Fission Milestone: --- → Future

To add some detail, we discussed this, and there was some suggestion that according to spec, this data shouldn't be propagated to cross-origin documents, meaning that the non-Fission-aware CallChildren behavior is probably OK. If that's the case, it can stay, but given that we want to remove that helper, it should be inlined in those call sites, and the behavior should be changed such that it's the same for cross-origin frames regardless of what process they're in.

If that isn't the case, then the fields need to be moved to BrowsingContext or WindowContext and propagated through some other mechanism.

We use the "hint charset" as a place where we keep the encoding over a late meta or late encoding detection reload.

I don't see the propagation to children making any sense, since the children are destroyed by the reload and new child viewers created when the corresponding iframes are eventually re-created.

I suggest removing the CallChildren part and checking if the encoding reload stuff still works. https://searchfox.org/mozilla-central/source/testing/web-platform/tests/encoding-detection has reload tests, but they don't have iframes.

Flags: needinfo?(hsivonen)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

OK, I'm just going to repurpose this bug to inline the CallChildren calls in the short term, since I'd really like to get rid of the public API before someone else starts using it.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: Remove, rename, or inline nsDocumentViewer::CallChildren() calls in HintCharacterSet code → Inline nsDocumentViewer::CallChildren() calls in HintCharacterSet code

CallChildren is deprecated due to Fission. We should remove it so that we
don't wind up with new callers.

Assignee: nobody → kmaglione+bmo
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7c544c2ee8cd
Inline CallChildren calls in HintCharacterSet code. r=hsivonen
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: