Граф коммитов

117 Коммитов

Автор SHA1 Сообщение Дата
James Teh 8363da33a8 Bug 1712210: Remove a pending child doc addition (if any) when the embedder accessible for an OOP iframe changes. r=eeejay
Previously, if an OuterDoc was never sent to the parent process and its id was reused later, we ended up adding the document to that accessible, which usually wasn't even an OuterDoc.
Alongside the actual fix, add some assertions to make breakage in this area easier to debug in future.

Differential Revision: https://phabricator.services.mozilla.com/D115777
2021-05-25 23:17:09 +00:00
Nika Layzell 274d7e3edd Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 16:51:58 +00:00
Andreea Pavel 35eeef915f Backed out 3 changesets (bug 1699721) for failing test_bug1699721.html on a CLOSED TREE
Backed out changeset ed3feb801017 (bug 1699721)
Backed out changeset d6f212c67002 (bug 1699721)
Backed out changeset ef06d9764cf1 (bug 1699721)
2021-03-31 19:27:34 +03:00
Nika Layzell 45d7327477 Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 15:37:49 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Henri Sivonen 96ae695458 Bug 1618386 - Add action ids to filter out stale active browsing context updates. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94969
2020-11-16 19:16:20 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Anny Gakhokidze 8b553ecfcf Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-28 17:20:30 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze e903c66d34 Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-05 16:44:01 +00:00
Nika Layzell 06dd04520e Bug 1652144 - Part 2: Consider current BrowsingContextGroup for process selection, r=farre
This requires keeping track of the current process used to host documents with a
particular remote type loaded in each BrowsingContextGroup. Due to lifecycle
oddities, this set is kept separate from the existing subscribers set on
BrowsingContextGroup.

Differential Revision: https://phabricator.services.mozilla.com/D84061
2020-07-30 20:27:37 +00:00
Butkovits Atila cf561cece0 Backed out 5 changesets (bug 1652144, bug 1654569, bug 1652085) for assertion failure nsDocShell.cpp. CLOSED TREE
Backed out changeset 4388af0c7d95 (bug 1654569)
Backed out changeset 66d5bb2ff027 (bug 1652085)
Backed out changeset 05132c178b4f (bug 1652144)
Backed out changeset fbdc7fd9cb96 (bug 1652144)
Backed out changeset 920a06a52b8b (bug 1652144)
2020-07-26 11:12:52 +03:00
Nika Layzell fc494ad88c Bug 1652144 - Part 2: Consider current BrowsingContextGroup for process selection, r=farre
This requires keeping track of the current process used to host documents with a
particular remote type loaded in each BrowsingContextGroup. Due to lifecycle
oddities, this set is kept separate from the existing subscribers set on
BrowsingContextGroup.

Differential Revision: https://phabricator.services.mozilla.com/D84061
2020-07-24 20:24:36 +00:00
Nika Layzell 73d17519e7 Bug 1639367 - Clean up TabContext logic for PBrowser, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D76055
2020-05-21 22:38:44 +00:00
Nika Layzell e6a9e27a19 Bug 1637088 - Delay creating BrowserBridgeChild until after new PBrowser has been created, r=farre,emilio
Differential Revision: https://phabricator.services.mozilla.com/D75614
2020-05-25 06:06:30 +00:00
Tim Huang 4b67d42692 Bug 1639195 - Part 1: Make BrowserChild::RecvLoadURL() to use the correct triggering princpal. r=ckerschb,mattwoodrow
This patch makes the triggering princpal to be propagated to the
BrowserChild when calling LoadURL in nsFrameLoader. And use it as the
triggering principal for loading instead of the system principal.

Differential Revision: https://phabricator.services.mozilla.com/D75965
2020-05-19 20:22:34 +00:00
Nika Layzell 136a1ffa7a Bug 1636279 - Part 1: Streamline WindowContext initialization, r=farre
This should make the flow of how data gets into the initial WindowContext state
more clear, and allows the setting of initial synced WindowContext fields.

Differential Revision: https://phabricator.services.mozilla.com/D74324
2020-05-08 20:44:12 +00:00
Nika Layzell 5b5f1a77c5 Bug 1634596 - Avoid switching into a new process if an ancestor is discarded, r=farre
This is a temporary workaround for the crashes this can cause. A more thorough
fix to discarded ancestor issues will be implemented in bug 1634759.

Differential Revision: https://phabricator.services.mozilla.com/D74101
2020-05-08 18:04:51 +00:00
Nika Layzell 6cb771c699 Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 22:18:54 +00:00
Razvan Maries 7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell d6a082e20a Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 17:18:48 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell e6c0899f5d Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-06 17:41:02 +00:00
Kris Maglione 1c70232c81 Bug 1614462: Part 3c - Remove dead TabContext IsMozBrowserElement fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70750
2020-04-20 22:15:21 +00:00
Ciure Andrei a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Kris Maglione bb26afd174 Bug 1614462: Part 3c - Remove dead TabContext IsMozBrowserElement fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70750
2020-04-20 20:12:00 +00:00
Ciure Andrei c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione 1c6b490044 Bug 1614462: Part 3c - Remove dead TabContext IsMozBrowserElement fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70750
2020-04-16 22:20:12 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Bogdan Tara 40fdcf8307 Backed out 2 changesets (bug 1621726) for web platform test failures CLOSED TREE
Backed out changeset ebe18133a194 (bug 1621726)
Backed out changeset c43c38de33b2 (bug 1621726)
2020-04-06 22:03:02 +03:00
Nika Layzell b6d18805e0 Bug 1621726 - Part 1: Manage PWindowGlobal with PContent instead of PBrowser, r=farre
Previously, the PWindowGlobal actor was managed by the PBrowser which hosted it,
however this could cause issues when the tab containing the PWindowGlobal was
being destroyed. Due to the slightly different lifecycles of the PBrowser actor
and the nsGlobalWindowInner which the PWindowGlobal was trying to match the
lifetime of, the actor would sometimes not fire 'willDestroy' events correctly.

This patch moves PWindowGlobal to be directly managed by PContent, and changes
logic which previously used `Manager()` to get `Browser{Parent,Child}` to
instead use a pointer member.

Differential Revision: https://phabricator.services.mozilla.com/D68596

--HG--
extra : moz-landing-system : lando
2020-04-06 15:06:30 +00:00
Csoregi Natalia 7f39c4edfb Backed out changeset 9e1fba94da3a (bug 1621726) for bustages on WinHeaderOnlyUtils.h. CLOSED TREE
--HG--
extra : histedit_source : 475a57cb7d987f9ce3e1cf35e46292bc9b588a24
2020-04-01 00:05:16 +03:00
Nika Layzell 33e15617d3 Bug 1621726 - Manage PWindowGlobal with PContent instead of PBrowser, r=farre
Previously, the PWindowGlobal actor was managed by the PBrowser which hosted it,
however this could cause issues when the tab containing the PWindowGlobal was
being destroyed. Due to the slightly different lifecycles of the PBrowser actor
and the nsGlobalWindowInner which the PWindowGlobal was trying to match the
lifetime of, the actor would sometimes not fire 'willDestroy' events correctly.

This patch moves PWindowGlobal to be directly managed by PContent, and changes
logic which previously used `Manager()` to get `Browser{Parent,Child}` to
instead use a pointer member.

Differential Revision: https://phabricator.services.mozilla.com/D68596

--HG--
extra : moz-landing-system : lando
2020-03-31 17:47:51 +00:00
Simon Giesecke ac33c1f119 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/ipc. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65179

--HG--
extra : moz-landing-system : lando
2020-03-06 09:11:40 +00:00
Nika Layzell b614aeff7b Bug 1615403 - Part 6: Use MaybeDiscarded for WindowGlobalInit, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D62837

--HG--
extra : moz-landing-system : lando
2020-02-20 23:30:50 +00:00
Hiroyuki Ikezoe 796e6049b6 Bug 1550800 - Call BrowserParent::UpdateDimensions() in BrowserBridgeParent::RecvUpdateDimensions. r=nika,hsivonen
So that we can get the correct client offset value and store other metrics
there and reuse them when the top browser window moves.

The client offset, browser window title bar and window decorated frame width,
is necessary to get element positions in OOP iframes in screen coordinates
for drag-and-drop etc.

This change also fixes event.screen{X,Y}. A mochitest in this commit fails
without this change with enabling fission at least on Linux. Note that in the
mochitest we have to use nsIDOMWindowUtils.synthesizeNativeMouseClick instead
of nsIDOMWindowUtils.sendMouseEvent since sendMouseEvent doesn't work in fission
world (bug 1528935).

Differential Revision: https://phabricator.services.mozilla.com/D62190

--HG--
extra : moz-landing-system : lando
2020-02-13 22:30:56 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Kris Maglione 1722817403 Bug 1582832: Part 1 - Make FrameLoader owner rather than DocShell responsible for discarding a BC. r=nika
There are all sorts of lifecycle issues which arise from making DocShell
responsible for discarding BrowsingContexts. In this particular bug, we tend
to run into them in cases where we create a BrowsingContext for a FrameLoader,
and then never create a DocShell for it, leading to it never being destroyed.
But there are myriad other issues as well.

This patch moves the responsibility for BrowsingContext lifecycle management
to the FrameLoader/FrameLoaderOwner, rather than the DocShell, which makes
things more consistent, and more closely aligns with spec-defined behavior.

Differential Revision: https://phabricator.services.mozilla.com/D59008

--HG--
extra : moz-landing-system : lando
2020-02-06 19:07:56 +00:00
Nika Layzell ef317eb299 Bug 1609187 - Remove child-initiated remote subframe logic, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D60268

--HG--
extra : moz-landing-system : lando
2020-01-22 19:29:32 +00:00
Emilio Cobos Álvarez aaecc96d81 Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-13 11:30:44 +00:00
Ciure Andrei 51c540de3d Backed out 2 changesets (bug 1588791) for causing test_bug369370.html and test_transformed_scrolling_repaints_3.html to permafail
Backed out changeset 52e661ff161d (bug 1588791)
Backed out changeset d59e691bda9e (bug 1588791)
2020-01-13 04:49:16 +02:00
Emilio Cobos Álvarez 6e69347f9f Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-12 22:22:29 +00:00
Emilio Cobos Álvarez 8bf2225b87 Bug 1606659 - Make Browser*::Show take two arguments, one from the parent process, one from the owner of the frame. r=mattwoodrow
This makes clear where the information comes from, and also that there are some
bits of information that we should pass down from the child that we don't, like
allowfullscreen and the frame name.

Differential Revision: https://phabricator.services.mozilla.com/D58535

--HG--
extra : moz-landing-system : lando
2020-01-05 20:58:21 +00:00
Emilio Cobos Álvarez b84e83a317 Bug 1600454 - Fix build with --disable-accessibility. r=MarcoZ
The change to moz.build unveiled a couple unified build issues that I also had
to fix.

Depends on D55365

Differential Revision: https://phabricator.services.mozilla.com/D55366

--HG--
extra : moz-landing-system : lando
2019-12-02 06:25:40 +00:00
Matt Woodrow b3e87fb19a Bug 1586411 - Don't crash if AttachLayerManager fails. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D53760

--HG--
extra : moz-landing-system : lando
2019-11-24 21:23:04 +00:00