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

1964 Коммитов

Автор SHA1 Сообщение Дата
Valentin Gosu bd132e112d Bug 1658097 - [fission] Send resource timing data for cross-origin frames to the correct process r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D96754
2020-11-13 13:48:00 +00:00
sefeng f1c6f1d2ea Bug 1634437 - Dispatch NativeInit as an idle runnable on Linux r=heycam
EnsureInit takes a long time to run on Linux, in addition to it's
timing, it also runs within a critical path of MSG_ConstructBrowser.
Scheduling it as an idle runnable gives it a chance to run
before MSG_ConstructBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D83230
2020-11-12 20:04:53 +00:00
Jean-Yves Avenard c938c7416c Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Emilio Cobos Álvarez d622f54db0 Bug 1668875 - Distinguish theme changes that can and cannot affect style/layout. r=tnikkel
This should make the optimization landed earlier in this bug apply for
some of the NotifyThemeChanged() calls in nsWindow.cpp which are causing
all the extra invalidations.

If we know that system colors/fonts didn't change, we can avoid doing a
bunch of reflow work and the patch from earlier in the bug can avoid
re-rasterizing images too.

Differential Revision: https://phabricator.services.mozilla.com/D94425
2020-10-27 10:24:40 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Dan Glastonbury 77bf32c70e Bug 1595994 - P9: Allow LaunchRDDProcess() to be called from MainThread without hanging. r=mattwoodrow
Depends on D54880

Differential Revision: https://phabricator.services.mozilla.com/D54882
2020-10-20 23:26:33 +00:00
Tom Tung 45a97b5b83 Bug 1654080 - Use PBackground for syncing SessionStorageCache and use LSWriteOptimizer to send data changes; r=dom-workers-and-storage-reviewers,janv,nika
This patch does:
- Use LSWriteOptimizer
- Remove SessionStorageService since it's unused.
- Move IPC from PContent to PBackground
(by SessionStorageManager{Child, Parent} and SessionStorageCache{Child, Parent}).
- Extract SessionStorageManagerBase and add PBackgroundSessionStorageManager.
- Expose a getter function to get a BackgroundParentManager for top context id
on the parent.

IPC
- Before this patch:
  - Copy from parent while loading a document.
    - Mark cache entry on the parent process as loaded by the child id.
  - Update change on checkpoint.
  - Unmark cache entry on the parent process as unloaded for the child id while
  the parent actor is destorying.
- After this patch:
  - Sync IPC load in the first SessionStorage operation.
  - Update change on checkpoint

`BackgroundSessionStorageManager`'s lifecycle on the parent process.
- Create by `SessionStorageManagerParent` and register to the `sManagers`.
- Hold by `SessionStorageManagerParent` and `sManagers`.
- Remove from the `sManagers` while the corresponding `BrowsingContext` is
destructed (on the parent process).

Depends on D89341

Differential Revision: https://phabricator.services.mozilla.com/D89342
2020-10-14 00:19:33 +00:00
Nika Layzell 6e69a9db71 Bug 1660539 - Make StructuredCloneData args optional in JSActor RawMessage, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D93122
2020-10-13 17:43:56 +00:00
Emilio Cobos Álvarez 4e68e78542 Bug 1669925 - Add a printing.trigger keyed scalar to record what triggers a particular print dialog. r=jwatt,marionette-reviewers,maja_zf
In order to avoid over/under-counting, we need to treat window.print()
specially. The new UI was using aOpenWindowInfo.isForPrintPreview for
that, but that doesn't quite work for the old UI (because it will
trigger a regular print, not a preview).

But since isForPrintPreview was only really needed to distinguish
window.print(), just rename it and set it to true when the old UI is
triggered by window.print() as well.

Differential Revision: https://phabricator.services.mozilla.com/D92925
2020-10-09 14:59:46 +00:00
Kris Maglione a20d386028 Bug 1669175: Fix another null deref in beforeunload code. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D92468
2020-10-05 19:40:54 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Nico Grunbaum c9ad55f22d Bug 1664900 - P5 - mv peerconnection to jsapi;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D90951
2020-09-23 04:28:03 +00:00
Nico Grunbaum 54d899d308 Bug 1664900 - move /media/webrtc/signaling/src to /dom/media/webrtc;r=dminor,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D90179
2020-09-23 04:22:29 +00:00
Kris Maglione 0ae5bf64c5 Bug 1655866: Part 4 - Handle OOP beforeunload listeners in PermitUnload(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88317
2020-09-21 22:41:01 +00:00
Nika Layzell 1d58fba49c Bug 1659696 - Check PendingInitialization before targeting in window.open, r=kmag
This requires adding the flag as a synced field on the BrowsingContext, and
checking it in a few more places. Attempts to open a new window in this racy
manner will now raise an exception.

This should avoid the issue from bug 1658854 by blocking the buggy attempts to
load before the nested event loop has been exited.

Differential Revision: https://phabricator.services.mozilla.com/D87927
2020-09-16 20:47:55 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Emilio Cobos Álvarez 47916c8c70 Bug 1662987 - ClearDataService should know how to clear the stylesheet cache. r=baku
Much like it does for images.

Differential Revision: https://phabricator.services.mozilla.com/D89242
2020-09-08 19:38:43 +00:00
Luca Greco 4190f9f233 Bug 1568597 - Defer RemoteWorkerService init to ContentChild::RecvRemoteType. r=asuth,nika
I did notice this issue while investigating a test failure on
browser/components/contextualidentity/test/browser/browser_serviceworkers.js

The issue seems to be triggered when we are using a preallocated child process
for a call to RemoteWorkerManager::LaunchNewContentProcess, when that happens
we do expect that the new process is going to call RemoteWorkerManager::RegisterActor
once its RemoteWorkerService is being initialized in the new child process,
but when we are reusing a preallocated child process the RemoteWorkerService
was already initialized and RegisterActor was already called while the
remoteType for the child process was still "prealloc".

This patch fix the failure by deferring initializing RemoteWorkerService in
child processes to when we do receive a non "prealloc" remoteType in
ContentChild::RecvRemoteType.

Differential Revision: https://phabricator.services.mozilla.com/D86590
2020-08-28 17:59:15 +00:00
Henri Sivonen 812f93262d Bug 1646537 - Use BrowsingContext (and IPC) in place of GetInProcessParent usage in nsGlobalWindowOuter::FocusOuter. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87576
2020-08-26 15:53:18 +00:00
Nika Layzell 7c0ec51ea3 Bug 1658082 - Part 2: Remove duplicate information from InternalLoad IPC messages, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D87467
2020-08-26 19:20:06 +00:00
Razvan Maries b6c5d1394b Backed out 3 changesets (bug 1568597) for perma failures on sharedworker-classic.https.html. CLOSED TREE
Backed out changeset 07523f6e8341 (bug 1568597)
Backed out changeset ed846f54fe7d (bug 1568597)
Backed out changeset 0c69ed659f23 (bug 1568597)
2020-08-25 22:34:41 +03:00
Peter Van der Beken 7f6d4f154e Bug 1660869 - Forward RemoveFromSessionHistory to the parent process for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88061
2020-08-25 16:20:17 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Luca Greco 821c20ed40 Bug 1568597 - Defer RemoteWorkerService init to ContentChild::RecvRemoteType. r=asuth,nika
I did notice this issue while investigating a test failure on
browser/components/contextualidentity/test/browser/browser_serviceworkers.js

The issue seems to be triggered when we are using a preallocated child process
for a call to RemoteWorkerManager::LaunchNewContentProcess, when that happens
we do expect that the new process is going to call RemoteWorkerManager::RegisterActor
once its RemoteWorkerService is being initialized in the new child process,
but when we are reusing a preallocated child process the RemoteWorkerService
was already initialized and RegisterActor was already called while the
remoteType for the child process was still "prealloc".

This patch fix the failure by deferring initializing RemoteWorkerService in
child processes to when we do receive a non "prealloc" remoteType in
ContentChild::RecvRemoteType.

Differential Revision: https://phabricator.services.mozilla.com/D86590
2020-08-25 10:21:47 +00:00
Agi Sferro 6c2e9aa154 Bug 1660049 - Broadcast application-{background,foreground} to content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87646
2020-08-19 20:46:29 +00:00
Nika Layzell 36e9601880 Bug 1658854 - Disable overzealous assertion in ProvideWindowCommon, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D87330
2020-08-17 22:49:46 +00:00
Andrea Marchesini 27d564c279 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 19:45:52 +00:00
Bogdan Tara 694be205aa Backed out 4 changesets (bug 1658878) for blob related leaks CLOSED TREE
Backed out changeset 0288ef9ab65b (bug 1658878)
Backed out changeset a5af0e097560 (bug 1658878)
Backed out changeset 33c4b81f99a1 (bug 1658878)
Backed out changeset 16a33c7b4ff3 (bug 1658878)
2020-08-14 22:41:05 +03:00
Andrea Marchesini 91ce718928 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 16:59:44 +00:00
Olli Pettay cadcd14bc8 Bug 1656996 - Ensure cross-process session history navigations update child process side index and length, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85789
2020-08-14 13:05:25 +00:00
Mihai Alexandru Michis 33c1daa575 Backed out 4 changesets (bug 1658878) for causing failures in browser_blobURLIsolation.js
CLOSED TREE

Backed out changeset f69f80e5659f (bug 1658878)
Backed out changeset 20401a2adaa6 (bug 1658878)
Backed out changeset a8620aecc29f (bug 1658878)
Backed out changeset 3609760c1e5d (bug 1658878)
2020-08-14 19:55:25 +03:00
Andrea Marchesini 5c2811edd6 Bug 1658878 - Isolate BlobURLs per agent-cluster, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86914
2020-08-14 10:41:22 +00:00
Csoregi Natalia 36ac6c5cca Backed out 2 changesets (bug 1656997, bug 1656996) for fission failures on browser_preferences_usage.js. CLOSED TREE
Backed out changeset c3aaa4f191e6 (bug 1656997)
Backed out changeset e41977f9608f (bug 1656996)
2020-08-14 00:47:56 +03:00
Olli Pettay 9b6fb243d1 Bug 1656996 - Ensure cross-process session history navigations update child process side index and length, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85789
2020-08-13 19:17:08 +00:00
Emilio Cobos Álvarez 6c008dd4fd Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-11 16:42:46 +00:00
Razvan Maries eed7de660b Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html. CLOSED TREE
Backed out changeset 23130282a937 (bug 1639328)
Backed out changeset 8628c5cddd14 (bug 1639328)
2020-08-11 05:13:41 +03:00
Emilio Cobos Álvarez 36a4392364 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 18:39:31 +00:00
Razvan Maries b29c16e540 Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html and browser_hidden_iframe.js. CLOSED TREE
Backed out changeset be370bea0702 (bug 1639328)
Backed out changeset 954bf9f3dca5 (bug 1639328)
2020-08-10 21:02:42 +03:00
Emilio Cobos Álvarez 9d054b84e4 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 14:50:27 +00:00
Jed Davis dc948b0c6a Bug 1654957 - Enable the GfxInfo component in the GPU process on Linux. r=jgilbert
Out-of-process WebGL needs GfxInfo to exist in the composition
process (which is the GPU process if it exists and the parent process
otherwise).  This patch enables the Linux version of that component in
the GPU process; the IPC currently used to give content processes copies
of the parent's GPU info is extended to also send it to the GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D85443
2020-08-07 21:31:53 +00:00
Nika Layzell 94ef7ca811 Bug 1653729 - Part 3: Add nsIDOMProcessChild::GetSingleton helper, r=kmag
This should make it easier to get an XPCOM interface from a JSProcessActorChild
in the current process, when combined with the do_QueryActor overloads from p2.

Differential Revision: https://phabricator.services.mozilla.com/D84069
2020-08-04 21:35:09 +00:00
Nika Layzell 475bf900c6 Bug 1653729 - Part 2: Add methods for do_QueryActor from nsIDOMProcess*, r=kmag
Before this change, nsIDOMProcess{Parent,Child} could not directly be used in
do_QueryActor, as they don't directly inherit from JSActorManager.

The std::enable_if_t trickery is required in order to avoid overload issues when
passing types like ContentChild which inherit from both JSActorManager and
nsIDOMProcess{Parent,Child}.

Differential Revision: https://phabricator.services.mozilla.com/D84068
2020-08-04 21:35:25 +00:00
Nika Layzell ca8ccd9569 Bug 1653407 - Part 2: Fix issue with NoteJSContextException, r=kmag
Previously we would end up throwing an uncatchable exception if actor
construction failed with an exception, due to calling
NoteJSContextException(cx), and then exiting a AutoEntryScript, which will clear
the exception on the JSContext and report it.

Differential Revision: https://phabricator.services.mozilla.com/D84066
2020-08-04 21:38:47 +00:00
Mihai Alexandru Michis 9fa46e7850 Backed out 2 changesets (bug 1654957) for causing leaks.
CLOSED TREE

Backed out changeset 14761127f6bb (bug 1654957)
Backed out changeset 49a529a1cc20 (bug 1654957)
2020-08-04 19:31:06 +03:00
Jed Davis 24b6995b46 Bug 1654957 - Enable the GfxInfo component in the GPU process on Linux. r=jgilbert
Out-of-process WebGL needs GfxInfo to exist in the composition
process (which is the GPU process if it exists and the parent process
otherwise).  This patch enables the Linux version of that component in
the GPU process; the IPC currently used to give content processes copies
of the parent's GPU info is extended to also send it to the GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D85443
2020-07-30 22:08:15 +00:00
Andrew McCreight f6f2bd8f6e Bug 1655536, part 2 - Don't wait for memory reports from child processes that no longer exist. r=froydnj
This patch uses IPDL's return feature to ensure that the memory
reporter manager won't wait for a report from a child process
that has already exited.

This fixes a memory reporter hang that can happen if a child process
exits during a memory report, when the parent half of the actor is
being held alive. (If the parent half of the actor is not being held
alive, then mMemoryReportRequest will be naturally cleared when it
goes away.)

This was happening frequently on Windows Fission AWSY because that test
does a minimize memory right before it attempts to get a memory report,
and the preallocated content process exits when it sees a message to
minimize memory.

Differential Revision: https://phabricator.services.mozilla.com/D85499
2020-08-03 18:29:45 +00:00
Andrew McCreight 7157f25222 Bug 1655536, part 1 - Drop the return value from MemoryReportRequestClient::FinishCallback. r=froydnj
The next patch converts the memory reporting architecture to use the "returns"
feature of IPDL, and mozilla::ipc::RejectCallback does not have a return
type, so this patch removes the return value.

FinishReportingCallback::Callback() needs to remain an XPCOM method
that returns NS_OK because it is called from JS during testing.

Differential Revision: https://phabricator.services.mozilla.com/D85498
2020-08-03 18:29:02 +00:00
Chris Martin 552aa91269 Bug 1652561 - Remote Win32k calls in nsLookAndFeel::GetFontImpl() r=emilio,geckoview-reviewers,agi,froydnj
Content processes will now receive cached values for GetFontImpl() from the
parent process during initialization and whenever the theme changes.

This eliminates the use of several Win32k calls in content.

Differential Revision: https://phabricator.services.mozilla.com/D83406
2020-07-31 16:21:44 +00:00
Randell Jesup 41a19d75d7 Bug 1655994: Clean up process name setting r=nika
Differential Revision: https://phabricator.services.mozilla.com/D85293
2020-07-29 16:40:53 +00:00
Karl Tomlinson f12d2fad45 Bug 1653667 move realtime limit initialization from RecvSetProcessSandbox() to CubebUtils r=padenot
so that this happens even when the content sandbox is not enabled.

CubebUtils::InitLibrary() is called during ContentProcess::Init(), before the
event loop is run in XRE_InitChildProcess().

Differential Revision: https://phabricator.services.mozilla.com/D84941
2020-07-27 14:48:32 +00:00
Doug Thayer a538eb7804 Bug 1651941 - Avoid unnecessary empty StartupCaches r=froydnj
Prior to this patch, we were sending a boolean from InitContentChild (which
creates our StartupCache IPC actors) indicating whether we wanted to collect
new entries from a given process or not. This was so that we wouldn't accept
PutBuffer requests in these processes, since collecting them in one process
would be enough, and we don't want to waste memory. However, we actually
want the cache to be available before we can even get that IPC constructor
to the child process, so there's a window where we accept new entries
no matter what. This patch changes this by sending a boolean argument via
the command line indicating that we want to disable the Startupcache in this
process entirely. We send this when we didn't load a StartupCache off disk,
as this should be the only circumstance in which we're actually collecting
a substantial number of entries in content processes.

Differential Revision: https://phabricator.services.mozilla.com/D83400
2020-07-22 20:31:21 +00:00
Simon Giesecke e443211b53 Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83771
2020-07-22 15:12:10 +00:00
David Teller 73d1a0e5ff Bug 1597562 - about:memory now displays process types;r=mccr8,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D77541
2020-07-17 15:51:21 +00:00
Olli Pettay 41fc87999f Bug 1602115 - Make history.length Fission compatible, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D79197
2020-07-16 22:23:29 +00:00
Razvan Maries 4ccaec8564 Backed out 3 changesets (bug 1653123, bug 1602115) for perma failures on test_history_length_during_pageload.html. CLOSED TREE
Backed out changeset 6b3c0f542ef3 (bug 1653123)
Backed out changeset 951c0fd65a00 (bug 1602115)
Backed out changeset 258d0ebd9e34 (bug 1602115)
2020-07-16 23:21:18 +03:00
Olli Pettay c142af0f58 Bug 1602115 - Make history.length Fission compatible, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D79197
2020-07-16 19:01:36 +00:00
alwu 1493d7798d Bug 1621403 - part2 : implement `seekto` action. r=chunmin,emilio
Implement `Seekto` action [1]. In addtion, as `seekto` can go with additional properties, we create a new structure `MediaControlAction` to wrap `MediaControlKey` and `SeekDetails`, which can be sent with `seekto`.

[1] https://w3c.github.io/mediasession/#dom-mediasessionaction-seekto

Differential Revision: https://phabricator.services.mozilla.com/D82816
2020-07-16 00:16:33 +00:00
Randell Jesup fa153eb95d Bug 1642772: name processes in the profiler with eTLD+1 r=gerald,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D77926
2020-07-15 18:00:54 +00:00
Randell Jesup 4083132374 Bug 1642772: Add fission process renaming to eTLD+1 for Nightly (only) via a pref r=smaug,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D77924
2020-07-15 17:59:36 +00:00
Andrew McCreight 543079d871 Bug 1648590 - Set the crash report remote annotation when we set the remote type. r=kmag
This patch moves the remote type crash annotation code from RecvSetProcessSandbox() to
RecvRemoteType(), where we actually set the remote type. This matters because
RecvSetProcessSandbox() only happens once when the process is created. If the process
is a preallocated process, it will get its remote type updated later, so we need to
also update the annotation.

It seems odd that we were setting the remote type annotation in a method related to
the sandbox and not where we set the remote type. My only guess is that prior to
bug 1332522 RecvSetProcessSandbox() happened first, so maybe they wanted to make sure
the annotation was set as early as possible. At that point in time, the remote type
never changed, so it was okay to just set it wherever, as early as possible.

Anyways, after that bug, the first call to RecvRemoteType() happens earlier, so this
change is strictly better.

I also fixed a typo in ContentParent.

Differential Revision: https://phabricator.services.mozilla.com/D82625
2020-07-10 01:56:13 +00:00
Butkovits Atila 2a1d404458 Backed out changeset 4c0909f105b2 (bug 1648590) for build bustage at ContentChild.cpp. CLOSED TREE 2020-07-10 03:03:30 +03:00
Andrew McCreight 2eef496a85 Bug 1648590 - Set the crash report remote annotation when we set the remote type. r=kmag
This patch moves the remote type crash annotation code from RecvSetProcessSandbox() to
RecvRemoteType(), where we actually set the remote type. This matters because
RecvSetProcessSandbox() only happens once when the process is created. If the process
is a preallocated process, it will get its remote type updated later, so we need to
also update the annotation.

It seems odd that we were setting the remote type annotation in a method related to
the sandbox and not where we set the remote type. My only guess is that prior to
bug 1332522 RecvSetProcessSandbox() happened first, so maybe they wanted to make sure
the annotation was set as early as possible. At that point in time, the remote type
never changed, so it was okay to just set it wherever, as early as possible.

Anyways, after that bug, the first call to RecvRemoteType() happens earlier, so this
change is strictly better.

I also fixed a typo in ContentParent.

Differential Revision: https://phabricator.services.mozilla.com/D82625
2020-07-08 00:48:43 +00:00
Nika Layzell 54d298d667 Bug 1648109 - Report GetActor exceptions directly to the JSContext, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82446
2020-07-06 21:17:17 +00:00
Nika Layzell 22a65a237e Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 20:15:59 +00:00
Mihai Alexandru Michis 1ba2a3f6f6 Backed out 3 changesets (bug 1650163) for causing bustages in nsContentSecurityManager.cpp
CLOSED TREE

Backed out changeset 51d7c644a1e6 (bug 1650163)
Backed out changeset 3d2b6908447a (bug 1650163)
Backed out changeset 79141707d47b (bug 1650163)
2020-07-08 21:18:44 +03:00
Nika Layzell c850a94434 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 14:54:48 +00:00
Nika Layzell 60f3afe23e Bug 1649477 - Part 3: Handle ReceiveRawMessage generically, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82102
2020-07-08 14:22:22 +00:00
Nika Layzell 4d6fb8dcc5 Bug 1649477 - Part 2: Unify JSActor manager logic, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82101
2020-07-08 14:22:22 +00:00
Doug Thayer fcbcc674d2 Bug 1627075 - OMT and OMP StartupCache access r=froydnj
The overall goal of this patch is to make the StartupCache accessible anywhere.
There's two main pieces to that equation:

1. Allowing it to be accessed off main thread, which means modifying the
   mutex usage to ensure that all data accessed from non-main threads is
   protected.
2. Allowing it to be accessed out of the chrome process, which means passing
   a handle to a shared cache buffer down to child processes.

Number 1 is somewhat fiddly, but it's all generally straightforward work. I'll
hope that the comments and the code are sufficient to explain what's going on
there.

Number 2 has some decisions to be made:
- The first decision was to pass a handle to a frozen chunk of memory down to
  all child processes, rather than passing a handle to an actual file. There's
  two reasons for this: 1) since we want to compress the underlying file on
  disk, giving that file to child processes would mean they have to decompress
  it themselves, eating CPU time. 2) since they would have to decompress it
  themselves, they would have to allocate the memory for the decompressed
  buffers, meaning they cannot all simply share one big decompressed buffer.

  - The drawback of this decision is that we have to load and decompress the
    buffer up front, before we spawn any child processes. We attempt to
    mitigate this by keeping track of all the entries that child processes
    access, and only including those in the frozen decompressed shared buffer.

  - We base our implementation of this approach off of the shared preferences
    implementation. Hopefully I got all of the pieces to fit together
    correctly. They seem to work in local testing and on try, but I think
    they require a set of experienced eyes looking carefully at them.

- Another decision was whether to send the handles to the buffers over IPC or
  via command line. We went with the command line approach, because the startup
  cache would need to be accessed very early on in order to ensure we do not
  read from any omnijars, and we could not make that work via IPC.

  - Unfortunately this means adding another hard-coded FD, similar to
    kPrefMapFileDescriptor. It seems like at the very least we need to rope all
    of these together into one place, but I think that should be filed as a
    follow-up?

Lastly, because this patch is a bit of a monster to review - first, thank you
for looking at it, and second, the reason we're invested in this is because we
saw a >10% improvement in cold startup times on reference hardware, with a p
value less than 0.01. It's still not abundantly clear how reference hardware
numbers translate to numbers on release, and they certainly don't translate
well to Nightly numbers, but it's enough to convince me that it's worth some
effort.

Depends on D78584

Differential Revision: https://phabricator.services.mozilla.com/D77635
2020-07-08 02:46:11 +00:00
Narcis Beleuzu 8359f16846 Backed out 7 changesets (bug 1650163, bug 1649477) for bustages on JSActor.cpp . CLOSED TREE
Backed out changeset 4a21afb65254 (bug 1650163)
Backed out changeset c41753a56f5a (bug 1650163)
Backed out changeset 5fb444c35764 (bug 1650163)
Backed out changeset 830aa93d2b0c (bug 1649477)
Backed out changeset eca6e9dce450 (bug 1649477)
Backed out changeset 5b217aa88289 (bug 1649477)
Backed out changeset 8959d02b840f (bug 1649477)
2020-07-08 04:09:27 +03:00
Nika Layzell df351180c3 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-06 20:30:58 +00:00
Nika Layzell bb178eecd5 Bug 1649477 - Part 3: Handle ReceiveRawMessage generically, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82102
2020-07-06 20:27:11 +00:00
Nika Layzell b3dc16424c Bug 1649477 - Part 2: Unify JSActor manager logic, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82101
2020-07-06 20:27:08 +00:00
Nika Layzell cafcceeb34 Bug 1599579 - Part 1: Add the ability to specify a specific BrowsingContextGroup during process switch, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80254
2020-07-06 20:10:43 +00:00
Narcis Beleuzu a182c015f5 Backed out 6 changesets (bug 1627075) for bustages on startupcache/StartupCache.cpp . CLOSED TREE
Backed out changeset 21605186687e (bug 1627075)
Backed out changeset e29b15980da2 (bug 1627075)
Backed out changeset eb5265addd5e (bug 1627075)
Backed out changeset dfd71f4ecb81 (bug 1627075)
Backed out changeset 13ecd68b3c0d (bug 1627075)
Backed out changeset 333d035afe92 (bug 1627075)
2020-07-07 23:30:48 +03:00
Doug Thayer 4d6b5a1f91 Bug 1627075 - OMT and OMP StartupCache access r=froydnj
The overall goal of this patch is to make the StartupCache accessible anywhere.
There's two main pieces to that equation:

1. Allowing it to be accessed off main thread, which means modifying the
   mutex usage to ensure that all data accessed from non-main threads is
   protected.
2. Allowing it to be accessed out of the chrome process, which means passing
   a handle to a shared cache buffer down to child processes.

Number 1 is somewhat fiddly, but it's all generally straightforward work. I'll
hope that the comments and the code are sufficient to explain what's going on
there.

Number 2 has some decisions to be made:
- The first decision was to pass a handle to a frozen chunk of memory down to
  all child processes, rather than passing a handle to an actual file. There's
  two reasons for this: 1) since we want to compress the underlying file on
  disk, giving that file to child processes would mean they have to decompress
  it themselves, eating CPU time. 2) since they would have to decompress it
  themselves, they would have to allocate the memory for the decompressed
  buffers, meaning they cannot all simply share one big decompressed buffer.

  - The drawback of this decision is that we have to load and decompress the
    buffer up front, before we spawn any child processes. We attempt to
    mitigate this by keeping track of all the entries that child processes
    access, and only including those in the frozen decompressed shared buffer.

  - We base our implementation of this approach off of the shared preferences
    implementation. Hopefully I got all of the pieces to fit together
    correctly. They seem to work in local testing and on try, but I think
    they require a set of experienced eyes looking carefully at them.

- Another decision was whether to send the handles to the buffers over IPC or
  via command line. We went with the command line approach, because the startup
  cache would need to be accessed very early on in order to ensure we do not
  read from any omnijars, and we could not make that work via IPC.

  - Unfortunately this means adding another hard-coded FD, similar to
    kPrefMapFileDescriptor. It seems like at the very least we need to rope all
    of these together into one place, but I think that should be filed as a
    follow-up?

Lastly, because this patch is a bit of a monster to review - first, thank you
for looking at it, and second, the reason we're invested in this is because we
saw a >10% improvement in cold startup times on reference hardware, with a p
value less than 0.01. It's still not abundantly clear how reference hardware
numbers translate to numbers on release, and they certainly don't translate
well to Nightly numbers, but it's enough to convince me that it's worth some
effort.

Depends on D78584

Differential Revision: https://phabricator.services.mozilla.com/D77635
2020-07-07 17:03:28 +00:00
Mihai Alexandru Michis 87cb0ad6fa Backed out 6 changesets (bug 1627075) for causing bustages in StartupCache.cpp
CLOSED TREE

Backed out changeset fc144caf5d06 (bug 1627075)
Backed out changeset a345e05df151 (bug 1627075)
Backed out changeset 288a67aed661 (bug 1627075)
Backed out changeset 2cb021a493d8 (bug 1627075)
Backed out changeset 920398d1c3d3 (bug 1627075)
Backed out changeset ebdcd96a9d20 (bug 1627075)
2020-07-07 08:47:14 +03:00
Doug Thayer 5ff30b60fa Bug 1627075 - OMT and OMP StartupCache access r=froydnj
The overall goal of this patch is to make the StartupCache accessible anywhere.
There's two main pieces to that equation:

1. Allowing it to be accessed off main thread, which means modifying the
   mutex usage to ensure that all data accessed from non-main threads is
   protected.
2. Allowing it to be accessed out of the chrome process, which means passing
   a handle to a shared cache buffer down to child processes.

Number 1 is somewhat fiddly, but it's all generally straightforward work. I'll
hope that the comments and the code are sufficient to explain what's going on
there.

Number 2 has some decisions to be made:
- The first decision was to pass a handle to a frozen chunk of memory down to
  all child processes, rather than passing a handle to an actual file. There's
  two reasons for this: 1) since we want to compress the underlying file on
  disk, giving that file to child processes would mean they have to decompress
  it themselves, eating CPU time. 2) since they would have to decompress it
  themselves, they would have to allocate the memory for the decompressed
  buffers, meaning they cannot all simply share one big decompressed buffer.

  - The drawback of this decision is that we have to load and decompress the
    buffer up front, before we spawn any child processes. We attempt to
    mitigate this by keeping track of all the entries that child processes
    access, and only including those in the frozen decompressed shared buffer.

  - We base our implementation of this approach off of the shared preferences
    implementation. Hopefully I got all of the pieces to fit together
    correctly. They seem to work in local testing and on try, but I think
    they require a set of experienced eyes looking carefully at them.

- Another decision was whether to send the handles to the buffers over IPC or
  via command line. We went with the command line approach, because the startup
  cache would need to be accessed very early on in order to ensure we do not
  read from any omnijars, and we could not make that work via IPC.

  - Unfortunately this means adding another hard-coded FD, similar to
    kPrefMapFileDescriptor. It seems like at the very least we need to rope all
    of these together into one place, but I think that should be filed as a
    follow-up?

Lastly, because this patch is a bit of a monster to review - first, thank you
for looking at it, and second, the reason we're invested in this is because we
saw a >10% improvement in cold startup times on reference hardware, with a p
value less than 0.01. It's still not abundantly clear how reference hardware
numbers translate to numbers on release, and they certainly don't translate
well to Nightly numbers, but it's enough to convince me that it's worth some
effort.

Depends on D78584

Differential Revision: https://phabricator.services.mozilla.com/D77635
2020-07-07 04:35:08 +00:00
Jean-Yves Avenard 8fd158d479 Bug 1649684 - Use the current nsISerialEventTarget with the various process hosts. r=nika
In all those cases, the current nsISerialEventTarget is either the main thread or the MessageChannel's nsISerialEventTarget (since bug 1634846)

Differential Revision: https://phabricator.services.mozilla.com/D81966
2020-07-02 22:59:24 +00:00
Emilio Cobos Álvarez 56111c91d2 Bug 1649228 - Fix ContentChild::RecvNotifyAlertsObserver to notify after, not while, removing observers from the vector. r=froydnj
This probably had logic issues before bug 1642991, but not security
issues (at worst, an array out of bounds which is a release assertion
that would crash the process in a safe way).

Differential Revision: https://phabricator.services.mozilla.com/D81596
2020-06-30 09:44:28 +00:00
Noemi Erli b13f2bcb47 Backed out 7 changesets (bug 1627075) for causing @nsZipArchive crashes CLOSED TREE
Backed out changeset 9705b2759d45 (bug 1627075)
Backed out changeset 699212a443c3 (bug 1627075)
Backed out changeset 7ae4df10749c (bug 1627075)
Backed out changeset ece9a4223349 (bug 1627075)
Backed out changeset 6c4eedaa0d04 (bug 1627075)
Backed out changeset f5106898239f (bug 1627075)
Backed out changeset b6029c7c0016 (bug 1627075)
2020-07-02 14:05:53 +03:00
Doug Thayer a493fefece Bug 1627075 - OMT and OMP StartupCache access r=froydnj
The overall goal of this patch is to make the StartupCache accessible anywhere.
There's two main pieces to that equation:

1. Allowing it to be accessed off main thread, which means modifying the
   mutex usage to ensure that all data accessed from non-main threads is
   protected.
2. Allowing it to be accessed out of the chrome process, which means passing
   a handle to a shared cache buffer down to child processes.

Number 1 is somewhat fiddly, but it's all generally straightforward work. I'll
hope that the comments and the code are sufficient to explain what's going on
there.

Number 2 has some decisions to be made:
- The first decision was to pass a handle to a frozen chunk of memory down to
  all child processes, rather than passing a handle to an actual file. There's
  two reasons for this: 1) since we want to compress the underlying file on
  disk, giving that file to child processes would mean they have to decompress
  it themselves, eating CPU time. 2) since they would have to decompress it
  themselves, they would have to allocate the memory for the decompressed
  buffers, meaning they cannot all simply share one big decompressed buffer.

  - The drawback of this decision is that we have to load and decompress the
    buffer up front, before we spawn any child processes. We attempt to
    mitigate this by keeping track of all the entries that child processes
    access, and only including those in the frozen decompressed shared buffer.

  - We base our implementation of this approach off of the shared preferences
    implementation. Hopefully I got all of the pieces to fit together
    correctly. They seem to work in local testing and on try, but I think
    they require a set of experienced eyes looking carefully at them.

- Another decision was whether to send the handles to the buffers over IPC or
  via command line. We went with the command line approach, because the startup
  cache would need to be accessed very early on in order to ensure we do not
  read from any omnijars, and we could not make that work via IPC.

  - Unfortunately this means adding another hard-coded FD, similar to
    kPrefMapFileDescriptor. It seems like at the very least we need to rope all
    of these together into one place, but I think that should be filed as a
    follow-up?

Lastly, because this patch is a bit of a monster to review - first, thank you
for looking at it, and second, the reason we're invested in this is because we
saw a >10% improvement in cold startup times on reference hardware, with a p
value less than 0.01. It's still not abundantly clear how reference hardware
numbers translate to numbers on release, and they certainly don't translate
well to Nightly numbers, but it's enough to convince me that it's worth some
effort.

Depends on D78584

Differential Revision: https://phabricator.services.mozilla.com/D77635
2020-07-02 03:39:46 +00:00
Mihai Alexandru Michis bab20702a8 Backed out 6 changesets (bug 1627075) for causing failures regarding startupcache.
CLOSED TREE

Backed out changeset cf23b456ba12 (bug 1627075)
Backed out changeset b07887474f51 (bug 1627075)
Backed out changeset 65c0e6790a33 (bug 1627075)
Backed out changeset 6cd31f17a931 (bug 1627075)
Backed out changeset 0f0d1bd2a8ac (bug 1627075)
Backed out changeset 763a5a7b43a0 (bug 1627075)
2020-07-01 22:16:28 +03:00
Doug Thayer 42ac8f4294 Bug 1627075 - OMT and OMP StartupCache access r=froydnj
The overall goal of this patch is to make the StartupCache accessible anywhere.
There's two main pieces to that equation:

1. Allowing it to be accessed off main thread, which means modifying the
   mutex usage to ensure that all data accessed from non-main threads is
   protected.
2. Allowing it to be accessed out of the chrome process, which means passing
   a handle to a shared cache buffer down to child processes.

Number 1 is somewhat fiddly, but it's all generally straightforward work. I'll
hope that the comments and the code are sufficient to explain what's going on
there.

Number 2 has some decisions to be made:
- The first decision was to pass a handle to a frozen chunk of memory down to
  all child processes, rather than passing a handle to an actual file. There's
  two reasons for this: 1) since we want to compress the underlying file on
  disk, giving that file to child processes would mean they have to decompress
  it themselves, eating CPU time. 2) since they would have to decompress it
  themselves, they would have to allocate the memory for the decompressed
  buffers, meaning they cannot all simply share one big decompressed buffer.

  - The drawback of this decision is that we have to load and decompress the
    buffer up front, before we spawn any child processes. We attempt to
    mitigate this by keeping track of all the entries that child processes
    access, and only including those in the frozen decompressed shared buffer.

  - We base our implementation of this approach off of the shared preferences
    implementation. Hopefully I got all of the pieces to fit together
    correctly. They seem to work in local testing and on try, but I think
    they require a set of experienced eyes looking carefully at them.

- Another decision was whether to send the handles to the buffers over IPC or
  via command line. We went with the command line approach, because the startup
  cache would need to be accessed very early on in order to ensure we do not
  read from any omnijars, and we could not make that work via IPC.

  - Unfortunately this means adding another hard-coded FD, similar to
    kPrefMapFileDescriptor. It seems like at the very least we need to rope all
    of these together into one place, but I think that should be filed as a
    follow-up?

Lastly, because this patch is a bit of a monster to review - first, thank you
for looking at it, and second, the reason we're invested in this is because we
saw a >10% improvement in cold startup times on reference hardware, with a p
value less than 0.01. It's still not abundantly clear how reference hardware
numbers translate to numbers on release, and they certainly don't translate
well to Nightly numbers, but it's enough to convince me that it's worth some
effort.

Depends on D78584

Differential Revision: https://phabricator.services.mozilla.com/D77635
2020-07-01 17:55:38 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Butkovits Atila 146ad267af Backed out 6 changesets (bug 1599579) for bc failures at test_chrome_ext_contentscript_data_uri.html.
Backed out changeset b767f26b10ed (bug 1599579)
Backed out changeset c5bc0ea42193 (bug 1599579)
Backed out changeset cfdd8d5973d4 (bug 1599579)
Backed out changeset 73f6c956fc30 (bug 1599579)
Backed out changeset 14698ab42ee4 (bug 1599579)
Backed out changeset b4bdd8759433 (bug 1599579)
2020-06-30 21:41:27 +03:00
Nika Layzell 824c8da580 Bug 1599579 - Part 1: Add the ability to specify a specific BrowsingContextGroup during process switch, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80254
2020-06-30 16:52:53 +00:00
Matt Woodrow 751fe6358b Bug 1647557 - Implement RemoteWebProgress using CanonicalBrowsingContext instead of MessageManager. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70626
2020-06-30 01:18:47 +00:00
Matt Woodrow 1a4b43cd55 Bug 1647557 - Remove mCrossProcessRedirectIdentifier, and use the load identifier instead. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D81485
2020-06-30 01:18:04 +00:00
Andrea Marchesini 4c6f89824d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 13:40:27 +00:00
Andrea Marchesini 5fc1253731 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 11:03:02 +00:00
Andrea Marchesini 8f12e90e00 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 11:03:04 +00:00
Razvan Maries f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini c71431ab1b Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 10:30:00 +00:00
Andrea Marchesini 87e1daec9f Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 10:27:20 +00:00
Andrea Marchesini d7cec00cfb Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 10:26:33 +00:00
Matt Woodrow 213fab51e4 Bug 1646892 - Allow DocumentChannel process switches into the parent process. r=jya,nika
Differential Revision: https://phabricator.services.mozilla.com/D80327
2020-06-27 04:10:23 +00:00
Nika Layzell c7f85b7fac Bug 1633379 - Part 2: Add support for in-process JSWindowActors, r=kmag,Yoric
This switches the `nsIContent{Parent,Child}` interface to be
`nsIDOMProcess{Parent,Child}`, and also implements it on
`InProcess{Parent,Child}`, along with the `ProcessActor` interface.

Differential Revision: https://phabricator.services.mozilla.com/D80582
2020-06-25 20:35:18 +00:00
Nika Layzell 9c12bdf9af Bug 1633379 - Part 1: Move PInProcess into dom/ipc, r=kmag,Yoric
This moves it near the cross-process `PContent` actor, and makes it more clear
that this actor is only intended to be used for DOM things.

Differential Revision: https://phabricator.services.mozilla.com/D80581
2020-06-25 17:50:51 +00:00
Matt Woodrow 8fa4e5c092 Bug 1626362 - Make mOriginalUriString available in DocumentLoadListener and docshell. r=nika,necko-reviewers,valentin
This also fixes a bug where we were setting mOriginalUriString in docshell before InternalLoad (which clears it), instead of after.

Differential Revision: https://phabricator.services.mozilla.com/D80110
2020-06-25 04:33:14 +00:00
Cosmin Sabou 4d79f57fed Backed out 2 changesets (bug 1633379) for windows build bustages on ContentChild.obj. CLOSED TREE
Backed out changeset a26037f3225b (bug 1633379)
Backed out changeset efef0b59bcd8 (bug 1633379)
2020-06-25 20:47:03 +03:00
Nika Layzell 0fefabd35b Bug 1633379 - Part 2: Add support for in-process JSWindowActors, r=kmag,Yoric
This switches the `nsIContent{Parent,Child}` interface to be
`nsIDOMProcess{Parent,Child}`, and also implements it on
`InProcess{Parent,Child}`, along with the `ProcessActor` interface.

Differential Revision: https://phabricator.services.mozilla.com/D80582
2020-06-25 16:28:11 +00:00
Nika Layzell 508260e158 Bug 1633379 - Part 1: Move PInProcess into dom/ipc, r=kmag,Yoric
This moves it near the cross-process `PContent` actor, and makes it more clear
that this actor is only intended to be used for DOM things.

Differential Revision: https://phabricator.services.mozilla.com/D80581
2020-06-25 15:49:15 +00:00
Csoregi Natalia e67ceab432 Backed out 9 changesets (bug 1626362) for failures on a-download-click-404.html. CLOSED TREE
Backed out changeset d29ac651a4fd (bug 1626362)
Backed out changeset 5ba5cf98a95d (bug 1626362)
Backed out changeset 69b5b01da9c1 (bug 1626362)
Backed out changeset 1d31061f4421 (bug 1626362)
Backed out changeset a627870e35fb (bug 1626362)
Backed out changeset 5f3ee46032b6 (bug 1626362)
Backed out changeset 5b170666991e (bug 1626362)
Backed out changeset 4d31c2ede058 (bug 1626362)
Backed out changeset 66a9ba0f87cb (bug 1626362)
2020-06-25 02:45:52 +03:00
Matt Woodrow e9d06799ca Bug 1626362 - Make mOriginalUriString available in DocumentLoadListener and docshell. r=nika,necko-reviewers,valentin
This also fixes a bug where we were setting mOriginalUriString in docshell before InternalLoad (which clears it), instead of after.

Differential Revision: https://phabricator.services.mozilla.com/D80110
2020-06-24 22:03:39 +00:00
Chris Martin c5f74d8b96 Bug 1400317 - Win32k Lockdown: Remote SPI_GETFLATMENU r=jmathies
SPI_GETFLATMENU uses the newly-added WinContentSystemParameters and adds
the ability to update theme-related variables when they change.

Differential Revision: https://phabricator.services.mozilla.com/D80071
2020-06-24 15:29:58 +00:00
Chris H-C c1a1045511 Bug 1635255 - Don't compile FOG IPC layer and tests if not MOZ_GLEAN r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D80722
2020-06-24 16:16:48 +00:00
Chris H-C b661a96155 Bug 1635255 - Flesh out FOG IPC one additional layer r=janerik
Introducing FOGIPC, the central clearinghouse for the C++ layer between
PContent and FOG's Rust impl.

Gotta add tests.

Differential Revision: https://phabricator.services.mozilla.com/D79742
2020-06-24 16:16:07 +00:00
Chris H-C f177f29a3f Bug 1635255 - Add FOG IPC to PContent r=janerik
Temporarily on PContent instead of managed by PBackground, there's one
parentbound message for occasionally uplifting Glean data from child processes
and one childbound message for forcing the immediate flush of Glean data in the
async return.

Can't write gtests for this as ContentChild and ContentParent include things
that aren't present in gtest.

Differential Revision: https://phabricator.services.mozilla.com/D78077
2020-06-24 16:15:50 +00:00
Mihai Alexandru Michis fe89d1f20e Backed out 11 changesets (bug 1635255) for causing bustages in FOGIPC.cpp
CLOSED TREE

Backed out changeset d3e93edb1c76 (bug 1635255)
Backed out changeset 27df18486bff (bug 1635255)
Backed out changeset 4675772344eb (bug 1635255)
Backed out changeset 4d0c4beb910e (bug 1635255)
Backed out changeset 9b79c8208144 (bug 1635255)
Backed out changeset cb54f7a3177d (bug 1635255)
Backed out changeset d0591dc8d5a1 (bug 1635255)
Backed out changeset 5fc5e1070d4d (bug 1635255)
Backed out changeset bfcfda9cb19d (bug 1635255)
Backed out changeset 49447f10ad6e (bug 1635255)
Backed out changeset 0862a33399cf (bug 1635255)
2020-06-24 17:21:10 +03:00
Chris H-C e5c7e3f262 Bug 1635255 - Don't compile FOG IPC layer and tests if not MOZ_GLEAN r=janerik
Depends on D80516

Differential Revision: https://phabricator.services.mozilla.com/D80722
2020-06-24 07:54:16 +00:00
Chris H-C b876426809 Bug 1635255 - Flesh out FOG IPC one additional layer r=janerik
Introducing FOGIPC, the central clearinghouse for the C++ layer between
PContent and FOG's Rust impl.

Gotta add tests.

Differential Revision: https://phabricator.services.mozilla.com/D79742
2020-06-23 21:20:12 +00:00
Chris H-C f2d85a24e8 Bug 1635255 - Add FOG IPC to PContent r=janerik
Temporarily on PContent instead of managed by PBackground, there's one
parentbound message for occasionally uplifting Glean data from child processes
and one childbound message for forcing the immediate flush of Glean data in the
async return.

Can't write gtests for this as ContentChild and ContentParent include things
that aren't present in gtest.

Differential Revision: https://phabricator.services.mozilla.com/D78077
2020-06-23 20:43:16 +00:00
Andreas Farre 78dfb0a991 Bug 1590762 - Part 3: Keep track of current loads in BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75110
2020-06-23 13:01:37 +00:00
Kashav Madan 960bd54cfd Bug 1646563 - Remove BrowserId from nsFrameLoaderOwner, r=nika
We can just use BrowsingContext::BrowserId directly, so it's unnecessary to have
the field on nsFrameLoaderOwner as well.

This also makes it so that we only ever generate browser IDs in
BrowsingContext::CreatedDetached.

Differential Revision: https://phabricator.services.mozilla.com/D80121
2020-06-22 21:46:03 +00:00
Narcis Beleuzu 46e3b1ce2c Backed out 5 changesets (bug 1599579) for twinopen failures. CLOSED TREE
Backed out changeset 053229a30ef1 (bug 1599579)
Backed out changeset c2828aec4caf (bug 1599579)
Backed out changeset 085558fe56dc (bug 1599579)
Backed out changeset a4e7334f8ce6 (bug 1599579)
Backed out changeset 9ebd2eb155da (bug 1599579)
2020-06-23 02:23:48 +03:00
Nika Layzell 59e9c1cfcc Bug 1599579 - Part 1: Add the ability to specify a specific BrowsingContextGroup during process switch, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80254
2020-06-22 20:43:14 +00:00
Nicholas Nethercote a8f5f49b8a Bug 1645982 - Rename some service getters in `Services.py` to better match the types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79791
2020-06-16 23:32:21 +00:00
Kashav Madan 1a71fed80e Bug 1580766 - Add a unique ID for the BrowsingContext tree inside a browser element. r=kmag
This adds a `browserId` property to all browsing contexts. This ID is the same
for the entire tree of contexts inside a frame element. Each new top-level
context created for a given frame also inherits this ID. This allows identifying
the frame element for a given browsing context.

Originally authored by :mossop in D56245.

Differential Revision: https://phabricator.services.mozilla.com/D77911
2020-06-16 18:12:46 +00:00
Razvan Maries 73dfe9d277 Backed out changeset 585e0230b2d5 (bug 1580766) as requested. CLOSED TREE 2020-06-16 21:01:26 +03:00
Dave Townsend 7a5ade2788 Bug 1580766 - Add a unique ID for the BrowsingContext tree inside a browser element. r=kmag
This adds a `browserId` property to all browsing contexts. This ID is the same
for the entire tree of contexts inside a frame element. Each new top-level
context created for a given frame also inherits this ID. This allows identifying
the frame element for a given browsing context.

Originally authored by :mossop in D56245.

Differential Revision: https://phabricator.services.mozilla.com/D77911
2020-06-16 17:25:16 +00:00
Nika Layzell 6a7bf3be7b Bug 1644246 - Send Activate/Deactivate messages over PBrowser instead of PContent, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D79384
2020-06-12 19:41:27 +00:00
Chris Martin 16126fa7a5 Bug 1400317 - Add new async calls/singleton for remoting system parameters r=jmathies
There are a number of system parameters that return simple floats and bools
and are just different forms of system parameter query.

This introduces a new singleton and IPDL calls to send these values from parent
to content processes and cache them in content.

I started with these 2 variables because their values don't go stale. In a
later changeset, I will add more logic to invalidate cached values that go
stale, such as for the SPI_GETFLATMENU metric.

Differential Revision: https://phabricator.services.mozilla.com/D76639
2020-06-14 14:23:03 +00:00
Dorel Luca d79704f94c Backed out changeset 09ce524559da (bug 1597562) for failures in awsy/test_base_memory_usage.py. CLOSED TREE 2020-06-11 14:21:51 +03:00
David Teller 7b9251bafc Bug 1597562 - about:memory now displays process types;r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D77541
2020-06-10 17:01:08 +00:00
Alexis Beingessner 68cabeb994 Bug 1642344 - convert dom.noopener.newprocess.enabled to a StaticPref. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D77851
2020-06-09 14:45:54 +00:00
alwu 934302cd0d Bug 1640998 - part9 : use `MediaControlKey` to replace `MediaControlKeysEvent` r=chunmin,agi,geckoview-reviewers
This patch will
- remove `MediaControlKeysEvent` and use `MediaControlKey` to replace it
- rename names for all `MediaControlKey` related methods, functions, classes and descriptions

The advantage of doing so are
- remove the duplicated type so that we only need to maintain `MediaControlKey`

Differential Revision: https://phabricator.services.mozilla.com/D78140
2020-06-09 02:59:57 +00:00
Dorel Luca 3e35e21538 Backed out 2 changesets (bug 1580766) for XPCshell failures in unit/test_browsing_context_structured_clone.js. CLOSED TREE
Backed out changeset 6b9926a5ab88 (bug 1580766)
Backed out changeset 3722901b6309 (bug 1580766)
2020-06-09 03:39:22 +03:00
Dave Townsend 9c61384069 Bug 1580766: Add a unique ID for the BrowsingContext tree inside a browser element. r=kmag
Adds a `browserId` property to all browsing contexts which the same for the
entire tree of contexts inside a frame element. If a new top-level context is
created for the frame then it is assigned the same value.

This allows identifying the frame element for a given browsing context.

Currently this is only done for XUL frame elements (browser/iframe). Not sure
if we want this for others.

Differential Revision: https://phabricator.services.mozilla.com/D56245
2020-06-08 21:58:33 +00:00
Simon Giesecke 13502cf27c Bug 1642991 - Use RemoveElementsBy where easily possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78055
2020-06-08 09:01:48 +00:00
Emilio Cobos Álvarez f4aae6309b Bug 1643493 - Remove dead ParentShowInfo::fullscreenAllowed. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D78392
2020-06-05 00:40:59 +00:00
Sebastian Streich 91a18c1346 Bug 1521542 - Disable Process Switching for Sandboxed Contexts r=ckerschb,nika
Differential Revision: https://phabricator.services.mozilla.com/D76704
2020-06-04 10:46:48 +00:00
Emilio Cobos Álvarez 0b099d0b0e Bug 1641605 - Install SIGXCPU handler even if sandbox is disabled. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D78019
2020-06-03 12:18:56 +00:00
Andrea Marchesini 69818a4d17 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-03 06:12:06 +00:00
Csoregi Natalia 2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini 6f2eed62c8 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-02 08:30:24 +00:00
Razvan Maries c5a8f831d4 Backed out changeset 30c061da89d8 (bug 1580766) for perma failures on BrowsingContext.cpp. CLOSED TREE 2020-06-01 21:50:12 +03:00
Dave Townsend 38ef8fecd1 Bug 1580766: Add a unique ID for the BrowsingContext tree inside a browser element. r=kmag
Adds a `browserId` property to all browsing contexts which the same for the
entire tree of contexts inside a frame element. If a new top-level context is
created for the frame then it is assigned the same value.

This allows identifying the frame element for a given browsing context.

Currently this is only done for XUL frame elements (browser/iframe). Not sure
if we want this for others.

Differential Revision: https://phabricator.services.mozilla.com/D56245
2020-06-01 16:52:31 +00:00
Noemi Erli f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini a997c1d626 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-01 11:59:46 +00:00
Randell Jesup 78facb122a Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-30 14:38:30 +00:00
Mihai Alexandru Michis 75bd009f17 Backed out changeset 4311c3df8803 (bug 1597562) for causing failures in aboutmemory.
CLOSED TREE
2020-05-30 14:11:35 +03:00
David Teller b02425c053 Bug 1597562 - about:memory now displays process types;r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D77541
2020-05-30 10:25:02 +00:00
Narcis Beleuzu 4e6564f9f0 Backed out 7 changesets (bug 1602757, bug 1640801, bug 1612063, bug 1569928) for wpt failures on operator-dictionary-spacing-002/003/006.html CLOSED TREE
Backed out changeset 11277f03c48c (bug 1640801)
Backed out changeset 6d2a92d25b8f (bug 1569928)
Backed out changeset 383fd9b931ae (bug 1602757)
Backed out changeset 58ec60831af6 (bug 1602757)
Backed out changeset 4b9c579de3b2 (bug 1602757)
Backed out changeset a34288a6f60c (bug 1612063)
Backed out changeset 5134aaa3278e (bug 1602757)
2020-05-29 05:38:02 +03:00
Randell Jesup a6b0fd37c6 Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-28 21:37:03 +00:00
Narcis Beleuzu 0d860681b7 Backed out 6 changesets (bug 1602757, bug 1612063, bug 1569928) for wpt failure on operator-dictionary-spacing-001.html . CLOSED TREE
Backed out changeset 0f9c7960f36e (bug 1569928)
Backed out changeset 9456c9f960c9 (bug 1602757)
Backed out changeset 8dc7e11dbb9c (bug 1602757)
Backed out changeset 8bacf5ad656e (bug 1602757)
Backed out changeset b15fc1090ac7 (bug 1612063)
Backed out changeset bd19c329c6b7 (bug 1602757)
2020-05-28 21:29:25 +03:00
Randell Jesup 4899b7707e Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-28 14:33:24 +00:00
Csoregi Natalia a90f898b91 Backed out changeset 14084268455c (bug 1639165) for multiple console related failures. CLOSED TREE 2020-05-28 17:08:41 +03:00
nchevobbe 64b135f38b Bug 1639165 - Don't log message from ContentChild when multiprocess browser toolbox is enabled. r=baku.
Differential Revision: https://phabricator.services.mozilla.com/D76792
2020-05-28 10:01:14 +00:00
Andrew McCreight d2270d57b7 Bug 1641091, part 1 - Remove the unused ContentChild::GetEventTargetFor. r=froydnj
This all is leftovers from Quantum DOM.

Differential Revision: https://phabricator.services.mozilla.com/D76982
2020-05-27 13:58:35 +00:00