We don't access HasStoragePermission across process, so we don't need to
store the permission in WindowContext.
After this patch, HasStoragePermission will only be stored in the
channel's LoadInfo, which is set when a channel is created in the parent
and it won't be updated.
Depends on D71985
Differential Revision: https://phabricator.services.mozilla.com/D72305
There are two places where we save storage permission:
1. LoadInfo hasStoragePermission attribute
2. mStorageAccessGranted in nsPIDOMWindowInner
For LoadInfo.hasStoragePermission, it is set during channel creation and
its value remains the same even when the storage permission is granted
afterward.
The updated storage permission for a window is saved in
mStorageAccessGranted, which has a different meaning for fission and
non-fission mode.
In non-fission mode, mStorageAccessGranted is saved in the top-level
window and it is an array containing all tracking subframes that
are allowed to access storage.
In fission mode, mStorageAccessGranted is set in individual tracking
windows that we have granted its storage permission. Although it works
like a boolean flag in fission, we still keep using an array to compatible
with the use case in non-fission mode.
Depends on D71984
Differential Revision: https://phabricator.services.mozilla.com/D71985
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.
In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.
Differential Revision: https://phabricator.services.mozilla.com/D72664
This turned out to be a bit more tricky than anticipated:
* We want users to see the type this crate exposes, so we need to wrap
it all.
* We don't want to deal with validating labels here, so we need to
delegate.
* We need it to be thread-safe, so that we can generate globals.
But we also don't want users to deal with locking.
* We want a nice-ish API.
This now achieves all of this with just one little trick: a sealed
trait.
That way we can easily extend it to more types, without adding much more
code.
Note: It might have been nice to use the index operator (`[]`), but
that's defined by a trait in Rust and returns a reference to existing
data.
We thus can't use it and instead provide a simple `get()` method.
Differential Revision: https://phabricator.services.mozilla.com/D72805
We currently pass nsFrameLoader to DispatchCrossProcessEvent and then try to get
BrowserParent from nsFrameLoader, but the call site actually ensures the
passed nsFrameLoader is a remote target that could get BrowserParent on it.
So we could simplify this by passing BrowserParent to DispatchCrossProcessEvent
and also could get rid of unnecessary conversion code in
EventStateManager::HandleCrossProcessEvent.
Differential Revision: https://phabricator.services.mozilla.com/D73037
Sort the arrays by descending alignment. Use the delta between offsets to
compute the array lengths instead of storing directly. Use CheckedInt to
compute the allocation size.
Differential Revision: https://phabricator.services.mozilla.com/D72962
Cleanup the allocation of trailing arrays to use CheckedInt and follow the
example of JitScript. Remove some static_asserts that made arrays harder to
change and instead rely on the existing MOZ_ASSERT in initElements.
Differential Revision: https://phabricator.services.mozilla.com/D72942
...they include script-srcelem exception.
These are as backlog assuming Mozilla has plans to implement these features in the future.
Move wpt tests for src-src-attr-elem and style-src-attr-elem to run as backlog tsts (tier2).
Differential Revision: https://phabricator.services.mozilla.com/D72801
This mechanism added a lot of machine code to Ion JIT code, making it hard to analyze
codegen. With this change we only emit this when necessary.
Also move the addressOfIonBailAfterCounter method from CompileZone to
CompileRuntime because the field is in JitRuntime.
Differential Revision: https://phabricator.services.mozilla.com/D72376
Depends on D61063
I broke this feature while working experimenting for this patch and it was not caught by any test.
Adding a test to avoid regressions.
Differential Revision: https://phabricator.services.mozilla.com/D68849
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.
In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.
Differential Revision: https://phabricator.services.mozilla.com/D72664
This will cause an error and the load event won't be fired.
The test only needs to check that a window is opened on top, any content will do, so we use about:blank instead
Depends on D72792
Differential Revision: https://phabricator.services.mozilla.com/D72982
BrowserTestUtils.closeWindow accesses the document before closing it in order to determine its type.
Ideally, we should probably modify BrowserTestUtils.domWindowOpened so that it only resolves the promise once loading has completed.
However, so far all consumer of BrowserTestUtils.domWindowOpened also wait for the load event right after.
Differential Revision: https://phabricator.services.mozilla.com/D72792
Implement org.gnome.Shell.SearchProvider2 D-Bus interface and enable it when
widget.gnome-search-provider.enabled pref is set, so this feature is disabled
by default.
Differential Revision: https://phabricator.services.mozilla.com/D69181