Closed Bug 1633820 Opened 5 years ago Closed 5 years ago

Streamline uses of LoadContext now that BrowsingContext implements the interface

Categories

(Core :: DOM: Navigation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Fission Milestone M6b
Tracking Status
firefox78 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(5 files)

No description provided.

This patch asserts in various places that our LoadContext value on
BrowsingContext is consistent. This is done in order to get better diagnostics
for crashes such as those in bug 1629527.

The 'Id' variant was only used with b2g for remote mozbrowsers, and is no
longer relevant. The new code instead uses PBrowser directly in all cases.

This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f9ea871a0227 Part 1: Assert Coherent Load Context, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/762f0b2c154c Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/2475bbab03a8 Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/9803c41e42f9 Part 4: Remove OriginAttributes from TabContext, r=kmag https://hg.mozilla.org/integration/autoland/rev/4982d41d5e6b Part 5: Get rid of UnsafeIPCTabContext, r=kmag

Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&fromchange=4982d41d5e6bf8a219e88da8c8dad741e3426970&tochange=9bf8bfad28e6fa2b7bfb1d81ad38b28e4fa7e1bc&searchStr=build&selectedTaskRun=ScP50FuWRZ-9TklGmogVdQ-0

Backout link: https://hg.mozilla.org/integration/autoland/rev/9bf8bfad28e6fa2b7bfb1d81ad38b28e4fa7e1bc

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301084866&repo=autoland&lineNumber=28913

...
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/FileDescriptor.h:14:
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/IPDLParamTraits.h(39,26): error: no member named 'Write' in 'IPC::ParamTraits<nsSizeMode>'
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -      IPC::ParamTraits<P>::Write(aMsg, std::forward<R>(aParam));
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -      ~~~~~~~~~~~~~~~~~~~~~^
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/IPDLParamTraits.h(62,37): note: in instantiation of function template specialization 'mozilla::ipc::IPDLParamTraits<nsSizeMode>::Write<const nsSizeMode &>' requested here
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -    IPDLParamTraits<std::decay_t<P>>::Write(aMsg, aActor,
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -                                      ^
[task 2020-05-06T19:27:24.880Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/ipc/ipdl/PlatformWidgetTypes.cpp(56,5): note: in instantiation of function template specialization 'mozilla::ipc::WriteIPDLParam<const nsSizeMode &>' requested here
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -      WriteIPDLParam(aMsg, aActor, (aVar).sizeMode());
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -      ^
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  In file included from UnifiedProtocols37.cpp:2:
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  In file included from /builds/worker/workspace/obj-build/ipc/ipdl/PlatformWidgetTypes.cpp:7:
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  In file included from /builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders/mozilla/widget/PlatformWidgetTypes.h:15:
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/ProtocolUtils.h:22:
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/FileDescriptor.h:14:
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/IPDLParamTraits.h(45,33): error: no member named 'Read' in 'IPC::ParamTraits<nsSizeMode>'
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -      return IPC::ParamTraits<P>::Read(aMsg, aIter, aResult);
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -             ~~~~~~~~~~~~~~~~~~~~~^
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/ipc/IPDLParamTraits.h(70,30): note: in instantiation of function template specialization 'mozilla::ipc::IPDLParamTraits<nsSizeMode>::Read<nsSizeMode>' requested here
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -    return IPDLParamTraits<P>::Read(aMsg, aIter, aActor, aResult);
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -                               ^
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -  /builds/worker/workspace/obj-build/ipc/ipdl/PlatformWidgetTypes.cpp(94,12): note: in instantiation of function template specialization 'mozilla::ipc::ReadIPDLParam<nsSizeMode>' requested here
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -      if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->sizeMode())))))) {
[task 2020-05-06T19:27:24.881Z] 19:27:24     INFO -             ^
[task 2020-05-06T19:27:24.882Z] 19:27:24     INFO -  2 errors generated.
[task 2020-05-06T19:27:24.882Z] 19:27:24     INFO -  /builds/worker/checkouts/gecko/config/rules.mk:750: recipe for target 'UnifiedProtocols37.obj' failed
[task 2020-05-06T19:27:24.882Z] 19:27:24    ERROR -  make[4]: *** [UnifiedProtocols37.obj] Error 1
[task 2020-05-06T19:27:24.882Z] 19:27:24     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/ipc/ipdl'
[task 2020-05-06T19:27:24.882Z] 19:27:24     INFO -  make[4]: *** Waiting for unfinished jobs....
...
Flags: needinfo?(nika)
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef99672bd2af Part 1: Assert Coherent Load Context, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/7bbcb9266b87 Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/14cc454a8cbc Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/626e834293ed Part 4: Remove OriginAttributes from TabContext, r=kmag https://hg.mozilla.org/integration/autoland/rev/0a20dd1935d7 Part 5: Get rid of UnsafeIPCTabContext, r=kmag
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0028602d4931 Part 1: Assert Coherent Load Context, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/9303a3c6c204 Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/cb99aaea4365 Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/8e5d97fb8238 Part 4: Remove OriginAttributes from TabContext, r=kmag https://hg.mozilla.org/integration/autoland/rev/c7ae6a948bf3 Part 5: Get rid of UnsafeIPCTabContext, r=kmag
Flags: needinfo?(nika)
Regressions: 1637334
Regressions: 1637057
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: