Closed Bug 1613431 Opened 5 years ago Closed 4 years ago

Figure out how synced fields should work if the owner (Browsing/WindowContext) is discarded

Categories

(Core :: DOM: Navigation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Fission Milestone M6a
Tracking Status
firefox81 --- fixed

People

(Reporter: smaug, Assigned: farre)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Priority: -- → P3

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:

  1. 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.
  2. 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.
  3. Mark the methods as MUST_USE and return a nsresult, or similar type, requiring callers to either Unused << 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.

Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(bugs)
Flags: needinfo?(afarre)

I like 3. That at least forces one to think whether it matters if syncing failed.

Flags: needinfo?(bugs)

I think I agree with Olli. Number 3.

Flags: needinfo?(afarre)

kmag votes for option 3.

M5 to prevent introducing new regressions.

Fission Milestone: --- → M5
Flags: needinfo?(kmaglione+bmo)
Priority: P3 → P2

M6 because we've now decided what to do, so it doesn't need to block M5. Should be a high priority for M6!

Fission Milestone: M5 → M6
Priority: P2 → P1

Tentatively moving P1 Fission M6 bugs to M6a.

Fission Milestone: M6 → M6a

Andreas, would you be able to work on this to implement #3 as mentioned by Nika in comment 1?

Flags: needinfo?(afarre)
Assignee: nobody → afarre
Status: NEW → ASSIGNED
Flags: needinfo?(afarre)
Whiteboard: [7/15] patches up for review
Whiteboard: [7/15] patches up for review → [7/24] patches need revision
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d29677fb419 Part 1: Have synced setters return nsresult. r=nika https://hg.mozilla.org/integration/autoland/rev/b326d33f98cb Part 2: Ignore synced setters return value. r=nika https://hg.mozilla.org/integration/autoland/rev/de69e3c1635a Part 3: Handle synced setters return value. r=nika https://hg.mozilla.org/integration/autoland/rev/2698c61b00f5 Part 4: Require that synced field setters' return value is handled. r=nika
Blocks: 1656492
Whiteboard: [7/24] patches need revision
Regressions: 1671697
Regressions: 1662791
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: