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

6001 Коммитов

Автор SHA1 Сообщение Дата
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
James Teh 2dcfeebd6f Bug 1627084 part 2: mscom: Provide access to the HandlerProvider from the Interceptor. r=aklotz
Because MainThreadHandoff sits between the Interceptor and the HandlerProvider, the caller must:

1. Get the event sink (the IInterceptorSink) from the Interceptor using IInterceptor::GetEventSink.
2. QI to the new IMainThreadHandoff interface. (An IInterceptorSink might not necessarily be a MainThreadHandoff.)
3. Get the HandlerProvider from the MainThreadHandoff using IMainThreadHandoff::GetHandlerProvider.

Differential Revision: https://phabricator.services.mozilla.com/D69484
2020-04-24 20:25:21 +00:00
James Teh 7a5fb3252a Bug 1627084 part 1: Don't compile ipc/mscom/MainThreadHandoff.cpp in unified mode. r=aklotz
We need to define INITGUID here in a subsequent patch, which is incompatible with unified mode.

Differential Revision: https://phabricator.services.mozilla.com/D70292
2020-04-24 20:22:06 +00:00
Stephen A Pohl 4be18f0f0e Bug 1578917: Force macOS Aqua appearance on for content processes, crash reporter and updater. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D70783
2020-04-24 18:37:57 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
shravanrn@gmail.com e0273c024b Bug 1626174 - Enable use of wasm sandboxed libOgg in the OggDemuxer in linux, mac, try servers r=padenot,erahm,dmajor,firefox-build-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D70652
2020-04-22 11:16:10 +00:00
Makoto Kato f052a12a9d Bug 1626389 - Part 2. Remove unnecessary GetShowPasswordSetting sync IPC. r=mccr8
GeckoView no longer uses this sync IPC, so we should remove this.

Differential Revision: https://phabricator.services.mozilla.com/D71708
2020-04-21 17:31:00 +00:00
Brindusan Cristian c4fd863aaa Backed out 2 changesets (bug 1626174, bug 1625876) for build bustages at LibrarySandboxPreload.cpp and OggDemuxer.cpp. CLOSED TREE
Backed out changeset 40fea0f3ab6c (bug 1626174)
Backed out changeset a3117fce845d (bug 1625876)
2020-04-21 19:29:02 +03:00
shravanrn@gmail.com f0399f4146 Bug 1626174 - Enable use of wasm sandboxed libOgg in the OggDemuxer in linux, mac, try servers r=padenot,erahm,dmajor,firefox-build-system-reviewers
Depends on D68764

Differential Revision: https://phabricator.services.mozilla.com/D70652
2020-04-21 15:30:37 +00:00
Gijs Kruitbosch c58b8f6ff2 Bug 1631358 - remove CPOW support in the message manager, r=mccr8
This commit:

- removes sendRpcMessage, which was unused;
- removes the CPOW argument to sendAsyncMessage, broadcastAsyncMessage, and
  sendSyncMessage;
- removes the aIsSync argument used internally to distinguish sendRpcMessage
  and sendSyncMessage;
- removes CPOW tests;
- updates the few remaining callsites that use more than 2 arguments in
  sendAsyncMessage for the removal of the cpows argument.

Differential Revision: https://phabricator.services.mozilla.com/D71514
2020-04-21 14:07:57 +00:00
Dorel Luca 873f29449b Merge autoland to mozilla-central. a=merge 2020-04-17 19:23:30 +03:00
Daniel Varga 53533d14b8 Backed out changeset a6904ec3d1e0 (bug 1347710) for causing Bug 1630860 a=backout 2020-04-17 13:01:21 +03:00
Chris Peterson 40840febd0 Bug 1629315 - Replace MOZ_MUST_USE with [[nodiscard]] in ipc. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D70628
2020-04-16 22:14:21 +00:00
Marco Bonardo fb0662edda Bug 1628906 - First search in a tab from location bar could trigger an "Invalid URL" error page. r=Gijs,nika,mattwoodrow
Before 1496578, URIFixup::keywordToURI used to do a synchronous IPC call to be
able to access search engines from the content process. Consumers of URIFixup
didn't care. Bug 1496578 moved the IPC messaging to the callers, in particular
nsDocShell, but assumed nsDocShellLoadState wasn't loading from content.
It looks like in some cases it does, so this adds another sync IPC call for
GetFixupURIInfo.
The total numer of sync IPCs should not change from before Bug 1496578, URIFIxup
was just doing it internally, while now it happens at the call point.
Note the long term plan would be for these docshell objects callers to just
handle URIs, while the UI code should do fixup.
Bug 1375244 tracks the removal of these sync IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D70607

--HG--
extra : moz-landing-system : lando
2020-04-15 22:39:38 +00:00
Christoph Kerschbaumer 7e43ad336f Bug 1621987: Implement Sec-Fetch-User. r=baku,edgar,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D69392

--HG--
extra : moz-landing-system : lando
2020-04-16 08:04:26 +00:00
Chris Martin 6590a743a5 Bug 1347710 - Enable sandbox protections for the Windows GPU process r=bobowen
It seems that all the warnings caused by the GPU sandbox have been fixed, and
the transparent window issue was resolved in D61370.

Hopefully there are no further complications and this can stay landed.

Differential Revision: https://phabricator.services.mozilla.com/D18876

--HG--
extra : moz-landing-system : lando
2020-04-15 20:08:29 +00:00
Andrea Marchesini 96780fe4bb Bug 1629763 - ContentPrincipal::GetBaseDomain returns a void-string for resource: URIs, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D70804

--HG--
extra : moz-landing-system : lando
2020-04-14 16:26:06 +00:00
Cameron McCormack 29c6b3234c Bug 1629351 - Fix typo in name of IsPincipalInfoPrivate. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D70642

--HG--
extra : moz-landing-system : lando
2020-04-12 13:19:57 +00:00
Matt Woodrow efcf5979e5 Bug 1627859 - Don't flush IPC policies when we serialize. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D69908

--HG--
extra : moz-landing-system : lando
2020-04-10 22:14:38 +00:00