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

6019 Коммитов

Автор SHA1 Сообщение Дата
Aaron Klotz 370decf41a Bug 1637452: Part 8 - Fix JNI includes in ipc/glue; r=jld
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75371
2020-05-15 17:04:34 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Gian-Carlo Pascutto ecee111c1f Bug 1553717 - Use Randomization on all arenas in non-Content Processes. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D70240
2020-05-13 08:31:04 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich 9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Jean-Yves Avenard 929cb06b3c Bug 1637433 - P5. replace ConnectActorRunnable with lambda. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74996
2020-05-14 06:25:15 +00:00
Jean-Yves Avenard e20155a010 Bug 1637433 - P4. Remove ForceCloseBackgroundActorsRunnable. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74995
2020-05-14 02:01:14 +00:00
Jean-Yves Avenard 7f2693d361 Bug 1637433 - P3. Remove unused class. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74994
2020-05-14 02:01:12 +00:00
Jean-Yves Avenard d73d4e516d Bug 1637433 - P2. Replace ShutdownBackgroundThreadRunnable with simple task for clarity. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74993
2020-05-14 02:01:16 +00:00
Jean-Yves Avenard 1885d1e5ea Bug 1637433 - P1. Remove unused MessageLoop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74992
2020-05-14 02:01:19 +00:00
Narcis Beleuzu d0074be6df Backed out 5 changesets (bug 1637433) for build bustages. CLOSED TREE
Backed out changeset c0f62d4c134a (bug 1637433)
Backed out changeset 63e725b2ae8f (bug 1637433)
Backed out changeset b42efea62259 (bug 1637433)
Backed out changeset c58ca2f35ed9 (bug 1637433)
Backed out changeset 7059b1afe7a6 (bug 1637433)
2020-05-14 04:58:22 +03:00
Jean-Yves Avenard 09316a5aa4 Bug 1637433 - P5. replace ConnectActorRunnable with lambda. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74996
2020-05-14 00:26:34 +00:00
Jean-Yves Avenard 9ad952c7be Bug 1637433 - P4. Remove ForceCloseBackgroundActorsRunnable. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74995
2020-05-14 00:26:31 +00:00
Jean-Yves Avenard 452c248a30 Bug 1637433 - P3. Remove unused class. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74994
2020-05-14 00:26:22 +00:00
Jean-Yves Avenard 4629c7f6b2 Bug 1637433 - P2. Replace ShutdownBackgroundThreadRunnable with simple task for clarity. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74993
2020-05-14 00:47:45 +00:00
Jean-Yves Avenard af15c09ca9 Bug 1637433 - P1. Remove unused MessageLoop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74992
2020-05-14 00:45:43 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Tim Huang 1fa1133990 Bug 1633851 - Part 1: Add a 'IsThirdPartyContextToTopWindow' flag to LoadInfo. r=baku
We add a 'IsThirdPartyContextToTopWindow' flag in the LoadInfo. This
flag shows if the channel is considered as a third party related to the
top-level window.

This flag would be set when opening the channel in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D73199
2020-05-13 13:38:41 +00:00
Peter Van der Beken e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00
Jean-Yves Avenard 4e734f2a51 Bug 1592488 - P12. Run MozPromise's IPDL callbacks via direct tasks when the promise is resolved. r=nika
Fix intermittent issues due to races.

We now run the MozPromise generated by the IPDL bindings to run their callbacks via a direct task dispatch.
This avoids a full trip to the back of the event queue for each additional asynchronous step when using MozPromise.
A consequence to this change is that each IPDL actor's thread must have an AbstractThread allocated if IPDL MozPromises are used.

It prevents unexpected racy behaviours when combining MozPromise with the other Resolve/Reject IPDL async declaration which was have lead to processing the events out of order.

Differential Revision: https://phabricator.services.mozilla.com/D71593
2020-05-12 10:45:20 +00:00
Jean-Yves Avenard 2a740519c6 Bug 1592488 - P5. Ensure an AbstractThread exists with BackgroundThread. r=nika
This is necessary to ensure we can use IPC MozPromise that requires direct tasks dispatch.

Differential Revision: https://phabricator.services.mozilla.com/D74592
2020-05-12 10:43:07 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Andrew McCreight f9c07914d4 Bug 1636990 - Inline NS_NewBackstagePass. r=kmag
Also, make an NS_ERROR in ~mozJSComponentLoader() into an assertion.

Differential Revision: https://phabricator.services.mozilla.com/D74691
2020-05-11 22:46:24 +00:00
Ricky Stewart d7c0c9fd6b Bug 1635755 - Part 2: Use deterministic hashing over types in `ipdl` file generation r=nika
The hashes of certain strings is used indirectly in generating IDL C++ files. Before, we were using the `hash()` function to generate these hashes, which in Python 3 is non-deterministic over subsequent `python3` processes, causing bugs like bug 1635755. Instead, use a specific, deterministic hash to avoid spurious diff failures.

The `md5` hash function isn't completely cryptographically secure but the security of the hashes isn't important for us in this case since we're just using them as a per-string identifier. We could use a more robust hash function but there may be performance implications from doing so.

Differential Revision: https://phabricator.services.mozilla.com/D74446
2020-05-08 20:31:46 +00:00
Chris Fronk af8a02cc9d Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D72560
2020-05-08 16:24:31 +00:00
Razvan Maries f38ed46452 Backed out changeset 2cedf945f040 (bug 1347710) as per Chris's request. CLOSED TREE 2020-05-07 21:56:51 +03:00
Ricky Stewart 933b3522b8 Bug 1633156 - Don't emit cached table files from ply r=glandium
`ply`, [by design](https://github.com/dabeaz/ply/issues/79), does not produce reproducible table files; hence bug 1633156. (Note that this was *always* true, but only became a problem once we switched to Python 3, which has more unpredictable dict iteration order than Python 2.7, at least prior to [3.7](https://docs.python.org/3/whatsnew/3.7.html#summary-release-highlights).)

In any other circumstance I would consider submitting a patch to `ply` to fix this, but as of the [in-progress version 4.0 of the library](https://github.com/dabeaz/ply/blob/master/CHANGES), it doesn't even emit this cached data any more, and indeed the [latest version of the code](1fac9fed64/ply) doesn't even call `open()` at all except to do logging or to read the text data to be parsed from `stdin`. So if we were going to pin our future on `ply` and upgrade to later versions of the library in the future, we would have to live in a world where `ply` doesn't generate cached table files for us anyway.

Emitting the cached table files so later build steps can consume them is an "optimization", but it's not clear exactly how much actual value that optimization provides overall. Quoth the `CHANGES` file from that repository:

```
PLY no longer writes cached table files.  Honestly, the use of
the cached files made more sense when I was developing PLY on
my 200Mhz PC in 2001. It's not as much as an issue now. For small
to medium sized grammars, PLY should be almost instantaneous.
```

In practice, I have found this to be true; namely, `./mach build pre-export export` takes just about as long on my machine after this patch as it did before, and in a try push I performed, there's no noticeable performance regression from applying this patch. In local testing I also found that generating the LALR tables in calls to `yacc()` takes about 0.01s on my machine generally, and we generate these tables a couple dozen times total over the course of the `export` tier now. This isn't *nothing*, but in my opinion it's also not nearly long enough where it would be a concern given how long `export` already takes.

That `CHANGES` file also stresses that if caching this data is important, we have the option of doing so via `pickle`. If and when we decide that re-enabling this optimization is valuable for us, we should take control of this process and perform the generation in such a way that we can guarantee reproducibility.

Differential Revision: https://phabricator.services.mozilla.com/D73484
2020-05-07 00:39:28 +00:00
Kershaw Chang 2531104710 Bug 1623380 - Send ODA directly to content process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67609
2020-05-07 14:39:21 +00:00
Dorel Luca ed73e1d6d4 Backed out changeset 2b9fc84a789b (bug 1623380) for Mochitest failures in dist/include/mozilla/RefPtr.h. CLOSED TREE 2020-05-07 15:17:30 +03:00
Kershaw Chang 467f6725fc Bug 1623380 - Send ODA directly to content process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67609
2020-05-07 11:12:46 +00:00
Simon Giesecke 61ad805d68 Bug 1626570 - Use CopyableTArray in ipdlc as member type for now. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73685
2020-05-07 08:11:08 +00:00
Chris Martin 07a0652222 Bug 1347710 - Enable Windows GPU sandbox for supported hardware r=gcp
Currently, there is an outstanding issue where enabling the GPU sandbox breaks
scrolling using the the mouse wheel on laptops with Intel GPUs.

This will enable the GPU sandbox on Nightly for non-Intel GPUs to prevent any
sandbox regressions while we try and figure out what the scrolling issue is.

See Bug 1630860 for more info

Differential Revision: https://phabricator.services.mozilla.com/D73923
2020-05-06 14:03:09 +00:00
Simon Giesecke 9d5e7505f9 Bug 1623278 - Make Factory derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D69398
2020-05-06 12:20:14 +00:00
Simon Giesecke 21bb7652c9 Bug 1626570 - Improve handling of copying arrays in ipc/. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73679
2020-05-06 11:51:48 +00:00
Bob Owen c86a9b6e30 Bug 1632583: Only register taskbar button creation message in the parent process. r=aklotz
This also removes XRE_Win32kCallsAllowed and replaces its other use.

Differential Revision: https://phabricator.services.mozilla.com/D73909
2020-05-05 16:11:44 +00:00
Ricky Stewart 3749c34fb4 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-05 20:32:12 +00:00
Simon Giesecke ae6bdc7e8b Bug 1626570 - Add CopyableAutoTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73300
2020-05-05 10:56:14 +00:00
Bogdan Tara f137fa0613 Backed out 6 changesets (bug 1632916, bug 1599658, bug 1633037, bug 1633039, bug 1633016, bug 1632920) for SA bustages CLOSED TREE
Backed out changeset 332ce0963b4e (bug 1633039)
Backed out changeset a9904cbc40d9 (bug 1633037)
Backed out changeset d06b0ec349f8 (bug 1599658)
Backed out changeset 8fd300cad80f (bug 1633016)
Backed out changeset f8820941c703 (bug 1632916)
Backed out changeset ac9c2c8746ed (bug 1632920)
2020-05-02 01:49:29 +03:00
Ricky Stewart d990224458 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-01 16:31:21 +00:00
David Parks cbf4e1a5cc Bug 1621762: Part 7 - Add IpdlQueue actor traits to WebGLParent/WebGLChild r=jgilbert,jld
Adds IpdlQueue capability to PWebGL actors.  The WebGLChild, used in content processes, implements SyncProducerActor and AsyncConsumerActor because it sends (sync and async) messages and receives responses to them that it reads as async messages.  The WebGLParent, used in the compositor process, is a SyncConsumerActor and AsyncProducerActor for dual reasons.

Differential Revision: https://phabricator.services.mozilla.com/D68264
2020-04-30 22:24:44 +00:00
David Parks b18b3bfd97 Bug 1621762: Part 5 - Change PWebGL alloc+constructor to Initialize message r=jgilbert,jld
We need to separate WebGL actor construction and initialization since IpdlQueue initialization needs the actor to already exist.

Differential Revision: https://phabricator.services.mozilla.com/D68262
2020-04-30 22:23:48 +00:00
Toshihito Kikuchi e83bcb5130 Bug 1630281 - Cache the executable's IAT for ntdll.dll before COM initialization. r=mhowell
When the browser process starts a sandbox process, we copy the executable's IAT
for ntdll.dll into the new process to prevent DLL injection via IAT tampering as
the launcher process does.  However, if IAT has been modified by a module injected
via `SetWindowHookEx`, the browser process cannot copy IAT because a modified IAT
is invalid in a different process, failing to start any sandbox processes.

The proposed fix is to cache IAT before COM initialization which may load
modules via `SetWindowHookEx` for the first time in the process.

Differential Revision: https://phabricator.services.mozilla.com/D73303
2020-04-30 18:26:18 +00:00
Simon Giesecke 652b5d3980 Bug 1626570 - Add ParamTraits for CopyableTArray. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72690
2020-04-30 09:36:04 +00:00
Daniel Varga 452acadb3b Backed out 7 changesets (bug 1621762) for causing build bustages at builds/worker/workspace/obj-build/dist/include/mozilla/dom/ProducerConsumerQueue.h
CLOSED TREE

Backed out changeset 03903e8f368e (bug 1621762)
Backed out changeset 21ef72486643 (bug 1621762)
Backed out changeset 70d103786c83 (bug 1621762)
Backed out changeset a3e1332998c3 (bug 1621762)
Backed out changeset 010f653b87d2 (bug 1621762)
Backed out changeset 0496adcb4582 (bug 1621762)
Backed out changeset 8d85420fd2e6 (bug 1621762)
2020-04-30 06:06:33 +03:00
David Parks 053f3b98ca Bug 1621762: Part 7 - Add IpdlQueue actor traits to WebGLParent/WebGLChild r=jgilbert,jld
Adds IpdlQueue capability to PWebGL actors.  The WebGLChild, used in content processes, implements SyncProducerActor and AsyncConsumerActor because it sends (sync and async) messages and receives responses to them that it reads as async messages.  The WebGLParent, used in the compositor process, is a SyncConsumerActor and AsyncProducerActor for dual reasons.

Differential Revision: https://phabricator.services.mozilla.com/D68264
2020-04-30 01:56:55 +00:00
David Parks c917376c04 Bug 1621762: Part 5 - Change PWebGL alloc+constructor to Initialize message r=jgilbert,jld
We need to separate WebGL actor construction and initialization since IpdlQueue initialization needs the actor to already exist.

Differential Revision: https://phabricator.services.mozilla.com/D68262
2020-04-30 01:30:08 +00:00
Gerald Squelart 22a7a23613 Bug 1530419 - Move PROFILER_AUTO_THREAD_SLEEP into WinUtils::WaitForMessage from callers - r=mstange
Both `nsAppShell::ProcessNextNativeEvent()` and `MessagePumpForUI::WaitForWork()` have a `PROFILER_AUTO_THREAD_SLEEP` surrounding the `mozilla::widget::WinUtils::WaitForMessage()` call.
However inside `WaitForMessage()` the call to `PeekMessageW()` may trigger a sequence of events (because the system delivers pending messages) that end in the initialization of a new thread, which invokes `ReentrantMonitor::Wait()` where there is a `PROFILER_AUTO_THREAD_SLEEP`.

To avoid this recursion, this patch moves `PROFILER_AUTO_THREAD_SLEEP` from both callers into `WaitForMessage()` to only enclose the actual potentially-sleeping operation `::MsgWaitForMultipleObjectsEx()`.

Differential Revision: https://phabricator.services.mozilla.com/D72850
2020-04-28 16:22:13 +00:00
Kershaw Chang 4db371a46e Bug 1512478 - Use sync IPC to get client auth data from parent process r=keeler,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D36911
2020-04-28 20:12:43 +00:00
James Teh c697d1edde Bug 1633650: mscom::Interceptor: Don't call HandlerProvider::GetPayloadSize for external process callers. r=aklotz
When an Interceptor is marshaled for an external (non-chrome) process caller, we do not provide a handler and thus don't call HandlerProvider::WriteHandlerPayload.
However, GetMarshalSizeMax previously called HandlerProvider::GetPayloadSize even for external process callers.
For a11y's handlerProvider, we must build the payload to get the size.
This is wasteful in this case, since we're just going to throw it away.

Differential Revision: https://phabricator.services.mozilla.com/D72796
2020-04-28 16:21:58 +00:00