If SetEGLNativeWindowSize() returns false window size put to SetEGLNativeWindowSize() doesn't match screen scale and
will lead to Wayland protocol error. Skip this frame rendering and wait for new window size provided by layout.
Depends on D187890
Differential Revision: https://phabricator.services.mozilla.com/D187891
Propagate return code from nsWindow::SetEGLNativeWindowSize() to WebRender/OGL compositors.
It allows to skip rendering in case of incompatible recent EGL buffer size.
Depends on D187889
Differential Revision: https://phabricator.services.mozilla.com/D187890
If screen scale doesn't match requested EGLWindow size, doesn't adjust requested EGLWindow size but rather fail and report it back.
We can't update EGLWindow size imediatelly as EGL surface buffers are already created and wl_egl_window_resize() is effective for next rendering cycle,
so recent rendering will use old and incompatible screen size.
Differential Revision: https://phabricator.services.mozilla.com/D187889
Pref observers registered for prefs like "foo" will also fire for pref changes
on "foo.bar", etc. If a feature registered nested prefs like these, then a
change to pref "foo.bar" would trigger the pref listener for "foo.bar" and
cause spurious unenrollments, especially when attempting to enroll in both an
experiment and rollout at the same time, and when trying to unenroll from an
experiment when also enrolled in a rollout.
Differential Revision: https://phabricator.services.mozilla.com/D187936
Now that ORB is shipping in Firefox 118+ (bug 1851143), we can let this pref
change ride the trains to release in Firefox 119.
Differential Revision: https://phabricator.services.mozilla.com/D187993
This PR adds a couple GeckoView API to setup and specific DoH TRR mode
and server URI, which enables the DNS-over-HTTPS capability on Firefox
Fenix.
Differential Revision: https://phabricator.services.mozilla.com/D121455
Directory locks which block clearing operations are currently invalidated and
Client::AbortOperations is called for corresponding quota clients. There's no
other way for directory lock owners to release directory locks other than in
Client::AbortOperations or when they are no longer needed. This is especially
problematic in tests.
Changes done in this patch:
- added DirectoryLock::OnInvalidate pure virtual method
- added DirectoryLockImpl::OnInvalidate implementation
- modified DirectoryLockImpl::Invalidate to call the callback
Differential Revision: https://phabricator.services.mozilla.com/D185569
CreateDirectoryLock currently takes three separate arguments which can be
expressed as just one argument.
Changes done in this patch:
- QuotaManager::CreateDirectoryLock changed to take just client metadata
- all call sites updated to reflect the changed signature
Differential Revision: https://phabricator.services.mozilla.com/D185568
One of the goals of bug 1749504 is to call EnsureStorageIsInitialized only from
InitOp. Calling from other places including quota clients will be disallowed
by changing the method to a private method. The private nature of the method
should be emphasized by adding the Internal suffix.
Changes done in this patch:
- IsStorageInitialized renamed to IsStorageInitializedInternal
- AssertStorageIsInitialized renamed to AssertStorageIsInitializedInternal
- EnsureStorageIsInitialized renamed to EnsureStorageIsInitializedInternal
Differential Revision: https://phabricator.services.mozilla.com/D185547
There's currently no QuotaManager method for triggering storage clearing which
could be used by the ClearOp or directly in gtests. Asynchronous storage
initialization will introduce a flag which needs to be unset after storage
clearing or storage resetting. This can't be easilly done without a
QuotaManager method for storage clearing.
Changes done in this patch:
- added QuotaManager::ClearStorage method
- renamed ClearOp to ClearStorageOp
- QuotaManagerService::Clear reworked to use an asynchronous message instead of
creating a sub actor
Differential Revision: https://phabricator.services.mozilla.com/D185546
The ResetOrClearOp currently supports both the resetting and clearing of
storage. However, there's already an operation for resetting storage called
ShutdownStorageOp which can be used separately.
Changes done in this patch:
- ResetOrClearOp renamed to ClearOp
- ClearOp converted to support only storage clearing
- QuotaManagerService::Reset reworked to use an asynchronous message instead of
creating a sub actor
- added generic helpers/callbacks for handling returned MozPromises
Differential Revision: https://phabricator.services.mozilla.com/D185545
The clearing operation used to use a sub actor, so the IsShuttingDown check was
done in Quota::AllocPQuotaRequestParent. Bug 1840772 stopped using a sub actor, but a corresponding IsShuttingDown check was not added to a new method for
handling the clearing operation.
Changes done in this patch:
- AssertIsOnOwningThread added to QuotaManager::ClearPrivateRepository
- IsShuttingDown check added to Quota::RecvClearStoragesForPrivateBrowsing
Differential Revision: https://phabricator.services.mozilla.com/D185527
QuotaManager::ShutdownStorage can't reuse existing shutdown storage operation
because that causes unexpected behavior when a storage initialization is
scheduled between two ShutdownStorage calls. The storage should be shutdown
when the second shutdown storage operation is finished.
Changes done in this patch:
- QuotaManager::ShurdownStorage changed to always create a new shutdown storage
operation
- a flag indicating that a storage shutdown is in progress has been removed
- the corresponding test has been enabled
Differential Revision: https://phabricator.services.mozilla.com/D185526
QuotaManager::ShutdownStorage currently reuses existing shutdown storage
operation which causes unexpected behavior when a storage initialization is
scheduled between two ShutdownStorage calls. The storage should be shutdown
when the second shutdown storage operation is finished (but it's not currently).
Changes done in this patch:
- a new test added for two subsequent ShutdownStorage calls
- a new disabled test added for two ShutdownStorage calls with storage
initialization scheduled in between
Differential Revision: https://phabricator.services.mozilla.com/D185525
New tests need to be added for the QuotaManager class, but TestQuotaManager.cpp
currently contains tests which are not directly related to the QuotaManager. It
would be better to keep them in separate files.
Changes done in this patch:
- OriginScope related tests moved to a new file TestOriginScope.cpp
- WARN_IF_FILE_IS_UNKNOWN tests moved to TestQuotaCommon.cpp
- A simple test for QuotaManager::ShutdownStorage added to TestQuotaManager.cpp
Differential Revision: https://phabricator.services.mozilla.com/D185524
This just reorders the code a bit to avoid looking at the replacement string when
there's no match. This applies to about 12% of calls on Speedometer 3.
Differential Revision: https://phabricator.services.mozilla.com/D187917
When a first hang is detected, the BHMgr Monitor thread needs to commit
5 more pages of stack to run profiler_suspend_and_sample_thread, which
contains big stack variables. If that occurs while we are low on memory,
failure to commit stack pages can crash the process.
In bug 1716727, we have added delays on failed allocations to try
to avoid crashing the main process under low memory condition. These
delays could trigger the background hang monitor, which could in
turn crash the process, as they occur in a low memory condition where we
will likely fail to commit.
We can pre-commit the 5 pages of stack at thread initialization to
ensure that they will already be commited when we later need them. Or at
least, we can try to see if that works.
We do that with a wrapper for the __chkstk function. We add a new test
in the NativeNt cppunit test, to ensure that our wrapper function
behaves as expected.
Differential Revision: https://phabricator.services.mozilla.com/D182582
Third-party products can start threads in our main process, which can load DLLs before the main thread has gone past SharedSection::ConvertToReadOnly. This patch therefore protects the use of the shared section within patched_NtMapViewOfSection, to guarantee that there is no race condition where the shared section could get converted while being used.
Differential Revision: https://phabricator.services.mozilla.com/D187913
It looks like we had support for Android before but since the Bug 1835065, we
lost this feature. This is because it looks like we added some
`self.config["app"] == "firefox"` checks to profiler related code and firefox
for android has different app name (like "geckoview" or "fenix").
This patch brings back the android profiling by changing those if checks to
include the android firefox adds as well.
Differential Revision: https://phabricator.services.mozilla.com/D187666