Figure out how synced fields should work if the owner (Browsing/WindowContext) is discarded
Categories
(Core :: DOM: Navigation, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: smaug, Assigned: farre)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
The current behaviour here is "If the target has been discarded, changes will be ignored", rather than the crashing behaviour we previously had. https://searchfox.org/mozilla-central/rev/5a10be606f2d76ef22f1f44565749490de991d35/docshell/base/SyncedContext.h#48
In terms of behaviours which we could have here, I think there are 3 options:
- Crash. This is the old behaviour, and we stopped doing it because people wouldn't find these situations when testing, and we'd end up introducing crashes for users.
- Ignore the request silently. This is close(-ish) to the current behaviour. We technically return a
nsresult
which is failing if the set failed, but nobody checks it. - Mark the methods as
MUST_USE
and return ansresult
, or similar type, requiring callers to eitherUnused <<
the value, or deal with the case where the BC is discarded.
ni?s to a variety of people in case they have thoughts here.
Reporter | ||
Comment 2•5 years ago
|
||
I like 3. That at least forces one to think whether it matters if syncing failed.
Comment 4•5 years ago
|
||
kmag votes for option 3.
M5 to prevent introducing new regressions.
Comment 5•5 years ago
|
||
M6 because we've now decided what to do, so it doesn't need to block M5. Should be a high priority for M6!
Comment 7•4 years ago
|
||
Andreas, would you be able to work on this to implement #3 as mentioned by Nika in comment 1?
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
Assignee | ||
Comment 9•4 years ago
|
||
Depends on D83645
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D83646
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D83647
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Updated•4 years ago
|
Comment 13•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4d29677fb419
https://hg.mozilla.org/mozilla-central/rev/b326d33f98cb
https://hg.mozilla.org/mozilla-central/rev/de69e3c1635a
https://hg.mozilla.org/mozilla-central/rev/2698c61b00f5
Description
•