The internal content policy type of `TYPE_INTERNAL_IFRAME` gets mapped to `ExtContentPolicy::TYPE_SUBDOCUMENT`, so there is no need to use the internal type.
Differential Revision: https://phabricator.services.mozilla.com/D108640
Name of Singleton is commonly used in gecko.
Name of SharedGL is confusing. It looks like "shared context", but it is not. The GL context is actually a singleton GLContext that is used by all WebRender. Each window creates one EGLSurface for each window. EGLSurface is switched for each window rendering.
Differential Revision: https://phabricator.services.mozilla.com/D108714
When enabling the watcher support, we end up having duplicate platform messages as we
received them both from the content process and the parent process (the messages are cloned).
A couple test cases are added to ensure we handle all kind of messages properly.
Depends on D107648
Differential Revision: https://phabricator.services.mozilla.com/D103285
We're getting those messages directly from the frame targets, so we can safely
ignore them in the content process.
A test case is added in a following patch in this queue.
Differential Revision: https://phabricator.services.mozilla.com/D108632
The patch for Bug 1697453 made it so we weren't dispatching resources tied to
a target being destroyed. This revealed an issue when adding a test for webextension
popup messages, where the target is being destroyed before the browser console can
consume it (see following patches in this queue).
Since Bug 1697453 was only done to try to make `browser_toolbox_backward_forward_navigation.js`
pass when fission is enabled, and given it's still failing, let's revert this
patch for now and reassess if this is needed, and if so, if we shoul only do that
for some specific resources.
Differential Revision: https://phabricator.services.mozilla.com/D108631
We bail out early in TargetList#hasTargetWatcherSupport and ResourceWatcher#hasResourceWatcherSupport
if we're in the browser toolbox or browser console and the pref is disabled.
Depends on D107410
Differential Revision: https://phabricator.services.mozilla.com/D107648
Currently we have a special path for performing barriers during rope flattening to take account of the fact that this overwrites the cell header word of ropes temporarily, making these cells untraceable.
The problem is that a rope can already be in the barrier buffer before flattening starts and so we need to check for this when processing the buffer.
The patch reworks use of temporary GC data to set one of the cell header flags when in use. This means we can check for it when processing the barrier buffer. It removes the special case function for barriers, which makes it slightly less efficient as we will now buffer all these ropes before skipping them later on. Hopefully that is not too deterimental to performance.
Differential Revision: https://phabricator.services.mozilla.com/D108664
The SpinEventLoopUntilOrShutdown is interrupted in the main process only at stage "xpcom-shutdown", which is too late. In a content process instead we interrupt it early enough, at "content-child-will-shutdown".
This patch removes the current observer logic in nsThreadManager in favor of a current shutdown phase state machinery in AppShutdown and renames SpinEventLoopUntilOrShutdown to SpinEventLoopUntilOrQuit. It also ensures that SpinEventLoopUntilOrQuit breaks early (at "quit-application" in the main process).
For a further possible cleanup around shutdown state in child and parent process please refer to bug 1697745.
We have no automated test for this edge case, but we have diagnostic telemetry that will tell us if it helps.
Differential Revision: https://phabricator.services.mozilla.com/D107619
MozPromiseHolder stores only a single pointer and so there is no advantage to
having an allocation and additional pointer indirection.
Differential Revision: https://phabricator.services.mozilla.com/D108379
If there is no active WebDriver session the code
related to deleting a session, and resetting other
state should not be run again.
This could actually happen when the
"Marionette:Quit" command is called, which itself
destroys the session, and the follwing socket
connection drop tries to run it again.
Differential Revision: https://phabricator.services.mozilla.com/D108169
This patch creates a new module for the WebDriver session
specific implementation. It no longer requires session data
like capabilities to be directly bound to the GeckoDriver class.
Differential Revision: https://phabricator.services.mozilla.com/D107552
This patch doesn't change behavior; GetCrossDocParentFrameInProcess() is just a
wrapper for GetCrossDocParentFrame(), which is what we were calling before.
The "InProcess" version of this API (which we're migrating to in this patch) is
used to annotate GetCrossDocParentFrame() callsites that have been vetted as
being OK with the fact that this API returns null at the boundary of a
cross-origin iframe, if fission is enabled.
In this patch, the one call that I'm migrating is inside of
IsFrameDescendantOfAny(), which is a helper-function called by
TextOverflow::PruneDisplayListContents(), which is a function that we use to
traverse a display list and hide content that's been hidden via
"text-overflow:ellipsis" or "-webkit-line-clamp".
We're OK to migrate this call to the "InProcess"-flavored API, because it's
just looking back up the frame tree from the display items that we can reach in
our traversal, which are trivially all part of the same process.
Differential Revision: https://phabricator.services.mozilla.com/D108710
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.
Depends on D108344
Differential Revision: https://phabricator.services.mozilla.com/D108345
The build always uses them anyways, but configure tests don't, and some
of them fail as a consequence in some cases (example: when UBsan is
enabled, all AC_LANG_CPLUSPLUS + AC_CHECK_FUNCS tests fail). We also had
similar problems in the past, such as bug 1513605.
By adding the PIC flags to CFLAGS and CXXFLAGS, we ensure old-configure
tests use the flags as well.
While here, we also remove DSO_CFLAGS, which was always empty, and we
stop passing -fPIC to wasm compiles, because it has no effect there.
Differential Revision: https://phabricator.services.mozilla.com/D108560