Commit Graph
1046 Commits
Author SHA1 Message Date
Nika Layzell a77c97abcb Bug 1729352 - Isolate standard web processes by OA, r=smaug,tabbrowser-reviewers,dom-worker-reviewers,asuth,sthompson,dao,sfoster
This changes how ProcessIsolation handles the generic "web" remote type
within private browsing windows or container tabs, such that these
processes are now allocated as `web=^userContextId=1` or similar, rather
than the generic `web` process.

This shouldn't change process isolation for most content, but will impact
how things like toplevel data URIs are loaded within private browsing
windows or container tabs.

Differential Revision: https://phabricator.services.mozilla.com/D282085
2026-05-21 19:24:02 +00:00
agoloman b2d4fa38c5 Revert "Bug 1729352, Bug 2011326, Bug 2011307 - Isolate standard web processes by OA, r=smaug,tabbrowser-reviewers,dom-worker-reviewers,asuth,sthompson,dao,sfoster" for causing bc failures @browser_aboutURLs.js.
This reverts commit ba92fe5024.

Revert "Bug 2011326 - Part 4: Switch test_sitepolicies to a data URI, r=mossop"

This reverts commit 8eab4714b1.

Revert "Bug 2011326 - Part 3: Remove the test-only canLoadURIInRemoteType function, r=firefox-desktop-core-reviewers ,tabbrowser-reviewers,mossop,sthompson"

This reverts commit 8ce4078eed.

Revert "Bug 2011326 - Part 2: Predict remote types with ProcessIsolation, r=whimboo,geckoview-reviewers,extension-reviewers,tabbrowser-reviewers,omc-reviewers,layout-reviewers,tcampbell,robwu,sthompson,emilio,mimi"

This reverts commit df59bd116e.

Revert "Bug 2011326 - Part 1: Remove test for separatePrivilegedContentProcess=false, r=firefox-desktop-core-reviewers ,tabbrowser-reviewers,mossop,sthompson"

This reverts commit 879157d4f7.

Revert "Bug 2011307 - Remove test-only support for marking chrome:// URI as needing to be loaded remotely, r=smaug,tabbrowser-reviewers,nsharpley"

This reverts commit 2d20aa53d9.
2026-05-20 23:54:13 +00:00
Nika Layzell ba92fe5024 Bug 1729352 - Isolate standard web processes by OA, r=smaug,tabbrowser-reviewers,dom-worker-reviewers,asuth,sthompson,dao,sfoster
This changes how ProcessIsolation handles the generic "web" remote type
within private browsing windows or container tabs, such that these
processes are now allocated as `web=^userContextId=1` or similar, rather
than the generic `web` process.

This shouldn't change process isolation for most content, but will impact
how things like toplevel data URIs are loaded within private browsing
windows or container tabs.

Differential Revision: https://phabricator.services.mozilla.com/D282085
2026-05-20 22:45:38 +00:00
rperta 5c61882ddb Revert "Bug 1729352 - Isolate standard web processes by OA, r=smaug,tabbrowser-reviewers,dom-worker-reviewers,asuth,sthompson,dao,sfoster" for causing reftest failures at ContentParent.cpp
This reverts commit 2e13daa551.
2026-05-07 09:32:59 +00:00
Nika Layzell 2e13daa551 Bug 1729352 - Isolate standard web processes by OA, r=smaug,tabbrowser-reviewers,dom-worker-reviewers,asuth,sthompson,dao,sfoster
This changes how ProcessIsolation handles the generic "web" remote type
within private browsing windows or container tabs, such that these
processes are now allocated as `web=^userContextId=1` or similar, rather
than the generic `web` process.

This shouldn't change process isolation for most content, but will impact
how things like toplevel data URIs are loaded within private browsing
windows or container tabs.

Differential Revision: https://phabricator.services.mozilla.com/D282085
2026-05-06 17:36:39 +00:00
Emilio Cobos Álvarez 7f3a41026c Bug 2037172 - Remove frameloader reflector reparenting. r=smaug
This is the last usage of UpdateReflectorGlobal. It was added to bug
1391110 with this commit message:

> We allow swapping frameloaders between unrelated documents, so we need
> to reparent wrappers when the owner content changes.

It seems better to not parent them to a window object and parent them to
the privileged junk scope just like BrowsingContext objects are for
example.

Differential Revision: https://phabricator.services.mozilla.com/D298608
2026-05-05 23:54:23 +00:00
Sylvestre Ledru 741bbdea29 Bug 2036402 - Apply std::move in dom/base where values can be moved instead of copied r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D298095
2026-05-04 11:17:52 +00:00
Emilio Cobos Álvarez 1bd0da8bf7 Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-02 22:04:17 +00:00
iulian moraru 480fc572da Revert "Bug 2036439, Bug 2033243 - Deal with ownerGlobal -> documentGlobal rename in extensions. r=robwu,home-newtab-reviewers,mconley" for causing newtab failures.
This reverts commit 4f62279d01.

Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug"

This reverts commit 91a4ece356.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 5a95a889e1.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 7177a68e67.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 5263254690.
2026-05-02 16:43:35 +00:00
Emilio Cobos Álvarez 7177a68e67 Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-02 15:33:23 +00:00
rperta d4cc71008d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" on developer request
This reverts commit e58e122135.

This reverts commit 84ca206f3e.

This reverts commit a7945292ed.

This reverts commit 367d83d299.
2026-05-02 06:20:30 +00:00
Emilio Cobos Álvarez a7945292ed Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-01 11:58:14 +00:00
agoloman c814da612d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" for causing multiple failures.
This reverts commit c7246654bc.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 8873ddf33c.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 8bf999e03c.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 7dea1af2e0.
2026-04-30 20:13:14 +00:00
Emilio Cobos Álvarez 8bf999e03c Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-04-30 17:47:11 +00:00
Nika Layzell cb527df820 Bug 2028579 - Part 1: Remove IProtocol::CanRecv, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,aosmond,valentin,mccr8
Looking at the existing callers, it seems like basically all of them
actually wanted `CanSend()`, and didn't want this function. This method
is misleading, as it is just a value which returns `true` until
`ActorDestroy()` has been called.

Differential Revision: https://phabricator.services.mozilla.com/D294218
2026-04-27 17:36:10 +00:00
Adam Vandolder 7a33dbf0d9 Bug 1892551 - Part 7: Remove unused parameter from ResumeRedirectedLoad. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D213340
2026-03-18 17:26:27 +00:00
Adam Vandolder 387517ad2c Bug 1892551 - Part 5: Remove now-unnecessary usage of nsISHEntry. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D210689
2026-03-18 17:26:22 +00:00
Adam Vandolder dd7184fd48 Bug 1892551 - Part 2: Remove SessionHistoryInParent conditionals. r=dom-core,farre,core-sessionstore-reviewers,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208061
2026-03-18 17:26:15 +00:00
Gijs Kruitbosch 4228213c86 Bug 2019783 - always use the privileged about process for the smart window LLM response, r=nika,ai-frontend-reviewers,omarg
Differential Revision: https://phabricator.services.mozilla.com/D287354
2026-03-17 00:24:55 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Emilio Cobos Álvarez 3234ef9347 Bug 2021694 - Make other XUL frame attributes regular bool attrs. r=firefox-desktop-core-reviewers ,devtools-reviewers,tabbrowser-reviewers,layout-reviewers,geckoview-reviewers,whimboo,hiro,nchevobbe,sthompson,mossop ,devtools-reviewers,tabbrowser-reviewers,layout-reviewers,geckoview-reviewers,whimboo,hiro,nchevobbe,sthompson,mossop
- primary / nodefaultsrc / allowscriptstoclose / forcemessagemanager
   are already used as true or not present, so no behavior change.
 - remote can be a regular XUL attr, but needs some consumers to change.

While at it remove the unused mozframetype attr, just use type for both
XUL and privileged iframes.

Differential Revision: https://phabricator.services.mozilla.com/D286522
2026-03-10 23:08:29 +00:00
Sandor Molnar 9d9ea68356 Revert "Bug 2021694 - Make other XUL frame attributes regular bool attrs. r=firefox-desktop-core-reviewers ,devtools-reviewers,tabbrowser-reviewers,layout-reviewers,geckoview-reviewers,whimboo,hiro,nchevobbe,sthompson,mossop" for causing bc failures @ browser_child_resource.js
This reverts commit da15cdf74a.
2026-03-10 20:57:25 +00:00
Emilio Cobos Álvarez da15cdf74a Bug 2021694 - Make other XUL frame attributes regular bool attrs. r=firefox-desktop-core-reviewers ,devtools-reviewers,tabbrowser-reviewers,layout-reviewers,geckoview-reviewers,whimboo,hiro,nchevobbe,sthompson,mossop
- primary / nodefaultsrc / allowscriptstoclose / forcemessagemanager
   are already used as true or not present, so no behavior change.
 - remote can be a regular XUL attr, but needs some consumers to change.

While at it remove the unused mozframetype attr, just use type for both
XUL and privileged iframes.

Differential Revision: https://phabricator.services.mozilla.com/D286522
2026-03-10 18:30:39 +00:00
serge-sans-paille b093ca6e20 Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-05 00:58:38 +00:00
Andreea Silaghi df905fef77 Revert "Bug 2020587 - Replace copy assignment by move assignment in xpcom/ r=xpcom-reviewers,jstutte" for causing failures at TestFileSystemHelpers This reverts commit d3c7b9c4d1.
This reverts commit 38c02da27e.
2026-03-04 08:20:03 +00:00
serge-sans-paille 38c02da27e Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-04 07:00:30 +00:00
Vincent Hilla 72c06b4611 Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio
Differential Revision: https://phabricator.services.mozilla.com/D278262
2026-02-27 08:30:22 +00:00
Cristina Horotan d708afb786 Revert "Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio" for causing bc failures on CanonicalBrowsingContext.cpp
This reverts commit 432e3f0c0a.

Revert "Bug 2008334 - Refactor: Introduce BrowsingContext::ActivenessChanged. r=edgar,dom-core,devtools-reviewers,ochameau"

This reverts commit 1036655edd.

Revert "Bug 2008334 - Add BrowsingContext::GetOpenedDocumentPiPWindow utility. r=edgar,dom-core"

This reverts commit 13f93ceeb1.
2026-02-25 20:50:24 +00:00
Vincent Hilla 432e3f0c0a Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio
Differential Revision: https://phabricator.services.mozilla.com/D278262
2026-02-25 17:14:06 +00:00
Serban Stanca 9c58a6658c Revert "Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio" for causing mochitests failures in CanonicalBrowsingContext.cpp.
This reverts commit 76865b559b.

This reverts commit 6f66289aec.

This reverts commit 5feb858ba4.
2026-02-25 12:26:26 +00:00
Vincent Hilla 76865b559b Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio
Differential Revision: https://phabricator.services.mozilla.com/D278262
2026-02-25 10:48:36 +00:00
Vincent Hilla 5db3c2f413 Bug 2016614 - Destroy nsFrameLoader if failed to create docshell. r=nika,dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D283887
2026-02-24 18:25:19 +00:00
Nika Layzell c7233601c6 Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-12 02:43:41 +00:00
Cristina Horotan 3e788840d2 Revert "Bug 2013389 - Part 12: Restore eager serialization of InputStream, r=asuth" for causing Hazard failure on StructuredCloneHolder.cpp
This reverts commit 72c32e25bf.

Revert "Bug 2013389 - Part 11: Make attachment arrays more consistent in StructuredCloneHolder, r=asuth"

This reverts commit c0912428c7.

Revert "Bug 2013389 - Part 10: Fix version tracking in nsStructuredCloneContainer, r=asuth,extension-reviewers,spidermonkey-reviewers,sfink,robwu"

This reverts commit f2e9691831.

Revert "Bug 2013389 - Part 9: Remove the now-unused ReadFromBuffer method, r=asuth"

This reverts commit 6eb034458e.

Revert "Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu"

This reverts commit 4dd6f1d6ea.

Revert "Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth"

This reverts commit 65d16af619.

Revert "Bug 2013389 - Part 6: Remove weak listener support from MessageManager, r=smaug"

This reverts commit 66f4b308a0.

Revert "Bug 2013389 - Part 5: Broadcasting MessageManagers cannot support transferrables, r=asuth"

This reverts commit e95e1a5a6c.

Revert "Bug 2013389 - Part 4: Avoid depending on mErrorMessage when deserializing StructuredCloneHolder, r=asuth,dom-worker-reviewers"

This reverts commit ae78c69357.

Revert "Bug 2013389 - Part 3: Remove aGlobal argument from StructuredCloneHolder::Read, r=asuth,dom-worker-reviewers"

This reverts commit 066bd37bfd.

Revert "Bug 2013389 - Part 2: Stop tracking mGlobal within StructuredCloneHolder::Read, r=asuth"

This reverts commit 6b4f3a43c0.

Revert "Bug 2013389 - Part 1: Add an Adopt API to StructuredCloneHolder, r=asuth"

This reverts commit 8624db71c2.
2026-02-10 20:11:41 +00:00
Nika Layzell 4dd6f1d6ea Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-09 21:23:37 +00:00
Cristina Horotan c262421c6d Revert "Bug 2013389 - Part 11: Make attachment arrays more consistent in StructuredCloneHolder, r=asuth" for causing build bustages at MessageManagerFuzzer.cpp
This reverts commit 5c5cf7465b.

Revert "Bug 2013389 - Part 10: Fix version tracking in nsStructuredCloneContainer, r=asuth,extension-reviewers,spidermonkey-reviewers,sfink,robwu"

This reverts commit c87a327d86.

Revert "Bug 2013389 - Part 9: Remove the now-unused ReadFromBuffer method, r=asuth"

This reverts commit 5adf49e5d8.

Revert "Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu"

This reverts commit f6d12563fe.

Revert "Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth"

This reverts commit 44c1325d76.

Revert "Bug 2013389 - Part 6: Remove weak listener support from MessageManager, r=smaug"

This reverts commit 1d1b495c91.

Revert "Bug 2013389 - Part 5: Broadcasting MessageManagers cannot support transferrables, r=asuth"

This reverts commit e2eb75ff8f.

Revert "Bug 2013389 - Part 4: Avoid depending on mErrorMessage when deserializing StructuredCloneHolder, r=asuth,dom-worker-reviewers"

This reverts commit d9a234ad7b.

Revert "Bug 2013389 - Part 3: Remove aGlobal argument from StructuredCloneHolder::Read, r=asuth,dom-worker-reviewers"

This reverts commit 48279cea50.

Revert "Bug 2013389 - Part 2: Stop tracking mGlobal within StructuredCloneHolder::Read, r=asuth"

This reverts commit 27162e5046.

Revert "Bug 2013389 - Part 1: Add an Adopt API to StructuredCloneHolder, r=asuth"

This reverts commit e3a9f32716.
2026-02-05 22:11:47 +00:00
Nika Layzell f6d12563fe Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-05 21:25:52 +00:00
Vincent Hilla 54fe7c7be5 Bug 2009931 - Cleanup after BrowserChild::Init crash. r=nika,hsivonen
This commit removes the unsuccessful deferring of notifications around
BrowserChild::Init and  and narrows when we ignore a failure in
nsDocShell::Initialize.

Differential Revision: https://phabricator.services.mozilla.com/D279293
2026-01-29 14:38:19 +00:00
Vincent Hilla 5108833279 Bug 2007774 - Check if frame loader was destroyed after docshell creation. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D280309
2026-01-26 08:48:33 +00:00
Atila Butkovits 4b85427200 Revert "Bug 2003759 - Add crash annotations for docshell initialization failure reasons. r=hsivonen,gsvelto" for causing bustages at nsWebBrowser.cpp.
This reverts commit 857dc0c7fe.
2025-12-16 14:00:50 +00:00
Vincent Hilla 857dc0c7fe Bug 2003759 - Add crash annotations for docshell initialization failure reasons. r=hsivonen,gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D276521
2025-12-16 11:25:51 +00:00
Emilio Cobos Álvarez 1d93d8f2ae Bug 337801 - Rename nsView to PresShellWidgetListener, and remove the view/ dir. r=jwatt
Since that's what it does now. Also clean-up a little bit while at it.

Differential Revision: https://phabricator.services.mozilla.com/D274410
2025-11-28 15:07:09 +00:00
Emilio Cobos Álvarez ba0e228d4f Bug 2000639 - Remove nsViewManager. r=jwatt
After the previous patches, nsViewManager is basically a backpointer to
its pres shell.

Remove it and just make PresShell manage the root view directly. After
this is done, we can decide what to do about nsView (which is itself
little more than a widget listener that forwards to pres shell right
now).

This technically starts listening to mParentWidget slightly later (on
pres shell creation), but I think that's ok.

Differential Revision: https://phabricator.services.mozilla.com/D272890
2025-11-28 10:48:18 +00:00
Vincent Hilla 7ae181d459 Bug 2002128 - Clear nsFrameLoader::mDocShell if create fails due to no window. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D274105
2025-11-26 15:34:46 +00:00
Vincent Hilla 967fc6d445 Bug 543435 - Ensure the initial about:blank SH entry is replaced. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D237598
2025-11-24 05:34:26 +00:00
Henri SivonenandVincent Hilla 39a8a4171b Bug 543435 - Make initial about:blank not get overwritten by an async about:blank load. r=sessionstore-reviewers,sfoster,timhuang,credential-management-reviewers,issammani,webidl,extension-reviewers,tabbrowser-reviewers,migration-reviewers,home-newtab-reviewers,hsivonen,cookie-reviewers,fxview-reviewers,firefox-desktop-core-reviewers ,dao,valentin,mossop,smaug,geckoview-reviewers,Jamie,mtigley,thecount,media-playback-reviewers,padenot,dom-worker-reviewers,jesup,jdescottes,asuth,robwu,karlt,profiler-reviewers,kpatenio,devtools-reviewers,tcampbell,nchevobbe
Co-authored-by: Vincent Hilla <[email protected]>
Signed-off-by: Vincent Hilla <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D155376
2025-11-24 05:34:22 +00:00
Emilio Cobos Álvarez 18be90ee9f Bug 1994942 - Don't use views for subdocs. r=tnikkel,jwatt
This allows to clean up even more view code, since views now are just a
link between layout and widget at the root and little else (so the whole
view children and so on can go), but that will be done in separate
patches since these patches are not risk-free.

Notable changes:

 * PresShell::WillPaint() now recurses into subdocuments. That was done
   previously via CallWillPaintOnObservers().
 * Embedder frame is tracked directly by nsSubDocumentFrame an
   PresShell. It might be possible to simplify this further,
   if bug 1997773 sticks.

Differential Revision: https://phabricator.services.mozilla.com/D232057
2025-11-11 07:33:01 +00:00
Emilio Cobos Álvarez 866e3560b2 Bug 1997773 - Hide frameloader before nulling out embedder element from nsFrameLoader::Destroy(). r=smaug
Yeah, I know... non-trivial one-liner.

I found some weirdness while looking at bug 1994942. Issue is that I
tried to remove the nsView dependency by looking at the embedder
element (right now layout goes from child to parent frame via the view
tree).

This mostly works, except when the presshell is destroyed after the
frameloader. This patch prevents that from happening and makes the
timing a bit more predictable between subframes / reframes and process
switches, even though I ultimately found a workaround for that bug.

Differential Revision: https://phabricator.services.mozilla.com/D270957
2025-11-04 10:32:06 +00:00
Emilio Cobos Álvarez 5b32901920 Bug 1997767 - Clean up some nsFrameLoader code. r=dom-core,smaug
Shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D270954
2025-11-03 13:42:41 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00