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

5754 Коммитов

Автор SHA1 Сообщение Дата
Haik Aftandilian 8df5029e9d Bug 1597282 - Intermittent org.mozilla.geckoview.test.ZZAccessibilityTest.testAccessibilityFocus r=jld
Avoid crashing in IToplevelProtocol::GetMessageEventTarget() in DEBUG builds for messages that have been re-posted.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 01:21:25 +00:00
Doug Thayer 86601b48c5 Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.

Rebased across https://hg.mozilla.org/mozilla-central/rev/3f0b4e206853
by Karl Tomlinson <karlt+@karlt.net>.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 00:56:53 +00:00
Valentin Gosu 99cfec8178 Bug 1561860 - Add rust-url based nsIURI implementation r=JuniorHsu
This patch adds DefaultURI which wraps MozURL which in turn forwards calls
to rust-url.
For the moment the added network.url.useDefaultURI is set to false by default.
The plan is to make this the default implementation for unknown URI types.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 20:17:53 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Thinker Li 0815480479 Bug 1601794- Fix building errors with clang. r=gsvelto
Bug 1601794- Fix building errors with clang. r=gsvelto

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

--HG--
extra : moz-landing-system : lando
2019-12-06 04:59:26 +00:00
Thinker Li fab0758915 Bug 1601742 - Fix unified build with the forkserver. r=froydnj
Bug 1601742 - Fix unified build with the forkserver. r=froydnj

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

--HG--
extra : moz-landing-system : lando
2019-12-06 04:58:27 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Thinker Li 7cfdf6a788 Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

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

--HG--
extra : moz-landing-system : lando
2019-12-05 00:02:40 +00:00
Thinker Li c50a650261 Bug 1470591 - Part 5: ForkServer to create new processes. r=gsvelto
Class ForkServer and class ForkServiceChild are implemented.  The
chrome process can ask the fork server process to create content
processes.  The requests are sent by MiniTransceiver over a socket.
The fork server replys with the process IDs/handles of created
processes.

LaunchOptions::use_forkserver is a boolean.  With use_forkserver being
true, the chrome process sends a request to the fork server instead of
forking directly.

Depends on D46881

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

--HG--
extra : moz-landing-system : lando
2019-12-05 00:05:21 +00:00
Thinker Li 234b674542 Bug 1470591 - Part 4: MiniTransceiver to do single-tasking IPC. r=gsvelto
MiniTransceiver is a simple request-reponse transport, always waiting
for a response from the server before sending next request.  The
requests are always initiated by the client.

Depends on D46880

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

--HG--
extra : moz-landing-system : lando
2019-12-05 00:04:53 +00:00
Thinker Li 3b1f4faef8 Bug 1470591 - Part 3: AppForkBuilder to ceate a new content process. r=gsvelto
An instance of AppForkBuilder creates a new content process from
the passed args and LaunchOptions.  It bascally does the same thing as
LaunchApp() for Linux, but it divides the procedure to two parts,

 - the 1st part forking a new process, and
 - the 2nd part initializing FDs, ENV, and message loops.

Going two parts gives fork servers a chance to clean new processes
before the initialization and running WEB content.  For example, to
clean sensitive data from memory.

Depends on D46879

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

--HG--
extra : moz-landing-system : lando
2019-12-05 00:04:19 +00:00
Thinker Li 0fcab03d24 Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-05 00:03:29 +00:00
Bogdan Tara 3732e1f17c Backed out 6 changesets (bug 1470591) for test_punycodeURIs & test_nsIProcess* crashes CLOSED TREE
Backed out changeset 3ca19f8f388e (bug 1470591)
Backed out changeset f80db6e63169 (bug 1470591)
Backed out changeset cbac2d7dfe42 (bug 1470591)
Backed out changeset daad4d736ec0 (bug 1470591)
Backed out changeset ca1b804d404a (bug 1470591)
Backed out changeset a10772f780f7 (bug 1470591)
2019-12-04 00:53:14 +02:00
Thinker Li 035717ac2d Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

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

--HG--
extra : moz-landing-system : lando
2019-12-03 19:08:10 +00:00
Thinker Li bb0277d828 Bug 1470591 - Part 5: ForkServer to create new processes. r=gsvelto
Class ForkServer and class ForkServiceChild are implemented.  The
chrome process can ask the fork server process to create content
processes.  The requests are sent by MiniTransceiver over a socket.
The fork server replys with the process IDs/handles of created
processes.

LaunchOptions::use_forkserver is a boolean.  With use_forkserver being
true, the chrome process sends a request to the fork server instead of
forking directly.

Depends on D46881

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

--HG--
extra : moz-landing-system : lando
2019-12-03 19:27:32 +00:00
Thinker Li 5cc87ed778 Bug 1470591 - Part 4: MiniTransceiver to do single-tasking IPC. r=gsvelto
MiniTransceiver is a simple request-reponse transport, always waiting
for a response from the server before sending next request.  The
requests are always initiated by the client.

Depends on D46880

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

--HG--
extra : moz-landing-system : lando
2019-12-03 19:20:02 +00:00
Thinker Li 312cb84dba Bug 1470591 - Part 3: AppForkBuilder to ceate a new content process. r=gsvelto
An instance of AppForkBuilder creates a new content process from
the passed args and LaunchOptions.  It bascally does the same thing as
LaunchApp() for Linux, but it divides the procedure to two parts,

 - the 1st part forking a new process, and
 - the 2nd part initializing FDs, ENV, and message loops.

Going two parts gives fork servers a chance to clean new processes
before the initialization and running WEB content.  For example, to
clean sensitive data from memory.

Depends on D46879

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

--HG--
extra : moz-landing-system : lando
2019-12-03 19:14:47 +00:00
Thinker Li 70ef2f4abf Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-03 18:53:53 +00:00
Kershaw Chang e686a3ff31 Bug 1596409 - P5: Enable necessary XPCOM components for using nsHttpTransaction in socket process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D54165

--HG--
extra : moz-landing-system : lando
2019-12-03 13:45:19 +00:00
Kershaw Chang f3bddbd52b Bug 1596409 - P1.1: Make socket process support IPCStream r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D54289

--HG--
extra : moz-landing-system : lando
2019-12-03 13:41:58 +00:00
Daniel Varga 00e1ca5f09 Backed out 4 changesets (bug 1589493) for linting failure at builds/worker/checkouts/gecko/dom/ipc/tests/test_process_error_oom.xhtml:12:11. On a CLOSED TREE
Backed out changeset fb609feb845a (bug 1589493)
Backed out changeset 0e09d02e484a (bug 1589493)
Backed out changeset 94aa25f22d44 (bug 1589493)
Backed out changeset 04adc4c18424 (bug 1589493)
2019-11-29 19:48:41 +02:00
David Teller 398ff1cb9b Bug 1589493 - Expose CrashReporterHost::isLikelyOOM();r=gsvelto
We'll use this method to expose additional information to the front-end for recovering from OOM.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 14:42:55 +00:00
Matt Woodrow 1f6d417fda Bug 1595578 - Don't release the AutoIPCStream immediately when called from IPDLParamTraits, since we need it to outlive the message currently being serialized. r=baku,kmag
Differential Revision: https://phabricator.services.mozilla.com/D54867

--HG--
extra : moz-landing-system : lando
2019-11-28 19:50:43 +00:00
Coroiu Cristina 8aab818cb9 Backed out 4 changesets (bug 1589493) for chrome failures at dom/ipc/tests/test_process_error_oom.xu on a CLOSED TREE
Backed out changeset 9b97128e83d8 (bug 1589493)
Backed out changeset d2ed39839f83 (bug 1589493)
Backed out changeset cac468582924 (bug 1589493)
Backed out changeset 421b8d600806 (bug 1589493)
2019-11-28 18:01:54 +02:00
David Teller 55461f78a7 Bug 1589493 - Expose CrashReporterHost::isLikelyOOM();r=gsvelto
We'll use this method to expose additional information to the front-end for recovering from OOM.

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

--HG--
extra : moz-landing-system : lando
2019-11-28 14:12:23 +00:00
Haik Aftandilian 42172d9b97 Bug 1598472 - MOZ_CRASH("Origin must be available when deserialized") impedes fuzzing r=ckerschb
When fuzzing, return an error instead of crashing in PrincipalInfoToPrincipal() for some error cases.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 18:21:22 +00:00
Sylvestre Ledru 8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Jed Davis e56c8b2a50 Bug 1573270 - Enhance shared memory freezing tests and add comments. r=bobowen on a CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D42048

--HG--
extra : source : 9d28ee24c3772c25c4995d202bc23e4484854dc0
extra : histedit_source : 0d05612ebe4fcc8af252b272693ac3c7e6841fa0
2019-11-25 18:36:46 +00:00
Coroiu Cristina 535a7ca388 Backed out changeset 9d28ee24c377 (bug 1573270) for xpcshell failures at toolkit/modules/tests/xpcshell/test_firstStartup.js on a CLOSED TREE 2019-11-26 02:29:15 +02:00
Andrew McCreight d25c3b20ae Bug 1598787 - Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj
This function works on all GeckoProcessTypes, not just those for child
processes.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 22:45:31 +00:00
Coroiu Cristina 0356c7a1b5 Backed out changeset 8f52344661fe (bug 1598787) for build bustages at build/src/tools/fuzzing/faulty/Faulty.cpp on a CLOSED TREE 2019-11-26 00:22:28 +02:00
Jed Davis 7067fb846c Bug 1573270 - Enhance shared memory freezing tests and add comments. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D42048

--HG--
extra : moz-landing-system : lando
2019-11-25 18:36:46 +00:00
Andrew McCreight b8c9932d5b Bug 1598787 - Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj
This function works on all GeckoProcessTypes, not just those for child
processes.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 17:24:46 +00:00
Simon Giesecke 42816d8112 Bug 1597211 - Do not cast IPC message size to signed int. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D53793

--HG--
extra : moz-landing-system : lando
2019-11-21 01:26:08 +00:00
Gabriele Svelto 9283d5f034 Bug 1598258 - Add a list of additional minidumps to the event delivered when a plug-in crashes r=froydnj
This patch adds a new field to the `plugin-crashed` event that holds the list
of additional minidumps associated with a crash report. The test
infrastructure is modified to use it which also fixes a race when processing
the .extra file. The reftest machinery has also been modified to take the new
field into account.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 07:30:23 +00:00
David Parks 4dc38ba6aa Bug 1577336: Part 7 - Move DXGI async plugin operations to compositor process r=jmathies,mattwoodrow,sotaro,mccr8
Previously, we created TextureD3D11 objects in the content process to back surfaces created for the plugin process.  Those objects were then composited by the async ImageBridge.  In order to remove Win32 kernel operations from content (including DX/GDI operations), this patch bounces the requests from content to the compositor process.  The compositor process maintains 2 textures to be used for all plugin composition -- one for the plugin process and one for display.  The plugin process can freely write to its texture and request composition when it is done, which triggers a blit to the display texture.  This mirrors pre-existing behavior.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 21:49:35 +00:00
David Parks 446170c593 Bug 1577336: Part 3 - Fetch Windows plugin async graphics capabilities from gpu or main process r=jmathies,mattwoodrow,froydnj
These operations report whether certain async plugin drawing modes are supported on the host architecture.  They use kernel graphics operations to decide this so they need to be removed from the content process for sandboxing.  We just bounce the requests to the gpu process (or main process on systems without a GPU process).

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

--HG--
extra : moz-landing-system : lando
2019-11-20 21:33:55 +00:00
Aaron Klotz abf8d763be Bug 1596562: Add ParamTraits specializations for mozilla::Vector and std::vector; r=froydnj,bwc
While the need for adding `mozilla::Vector` is self-evident, we also need
`std::vector` so that we can send some pre-existing telemetry data structures
that use it.

The new implementations are basically modified from the `nsTArray`
specializations. Note that the `mozilla::Vector` specialization does support
any type of allocator, so we still check for OOM failures in that case.

This patch also removes the specialization for `std::vector` that lives in
WebRTC in favour of the centralized implementation.

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

--HG--
extra : moz-landing-system : lando
2019-11-18 19:45:41 +00:00
Jonathan Kew 89f321af1e Bug 1487212 - When hyphenation resources are compressed in omnijar, load them into shared memory and share among all content processes. r=heycam,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52835

--HG--
extra : moz-landing-system : lando
2019-11-14 20:05:58 +00:00
Jed Davis b1dbdc9687 Bug 1582297 - Suppress IPC "pipe error" messages if the cause was probably the other process exiting. r=froydnj
There are two issues here:

1. These error messages occur even during normal channel shutdown,
because that's tracked in the mozilla::ipc::MessageChannel layer,
which the ipc/chromium code can't access.

2. If we get this kind of error when the channel wasn't intentionally
closed, it almost certainly means that the other process crashed.  In
that case, having error messages from a different process and a likely
unrelated subsystem just leads to confusion and misfiled bugs.

(Also complicating things: on Unix a closed channel often, but not
always, results in an end-of-file indication, which already isn't
logged; on Windows it's always a broken pipe error, which causes a much
larger amount of log spam.)

Bonus fix: the error that contains a fd number is clarified to avoid
having it mistaken for an error code.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 21:04:40 +00:00
Haik Aftandilian 5c7403d2a1 Bug 1589809 - [macOS] Use OS_ACTIVITY_MODE=disable for child processes r=spohl
Set the environment variable OS_ACTIVITY_MODE=disable on sandboxed Mac child processes.

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

--HG--
extra : moz-landing-system : lando
2019-11-09 00:27:48 +00:00
Bobby Holley 105c2ab943 Bug 1562761 - Add support for dispatching java runnables to Gecko event targets. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D52197

--HG--
extra : moz-landing-system : lando
2019-11-08 18:08:03 +00:00
Brindusan Cristian 98904c4e42 Backed out changeset efc82f89a7c7 (bug 1562761) for linting failure on XPCOMEventTarget.java. CLOSED TREE 2019-11-08 19:36:27 +02:00
Bobby Holley 58c5923eff Bug 1562761 - Add support for dispatching java runnables to Gecko event targets. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D52197

--HG--
extra : moz-landing-system : lando
2019-11-08 14:32:59 +00:00
Barret Rennie 59bbcf47d9 Bug 1581240 - Return a Promise from windowUtils.setCompositionRecording() r=nika
`windowUtils.setCompositionRecording()` now returns a promise that is resolved
when the composition recorder is enabled (if given `true`) or when frames are
written to disk (if given `false`). To accomplish this, the
`WebRenderCompositionRecorder` now returns a `MozPromise` when writing frames
to disk begins that is resolved when that process finishes.

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

--HG--
extra : moz-landing-system : lando
2019-11-07 22:34:25 +00:00
Daniel Varga 8afb8d99f1 Backed out 4 changesets (bug 1581240) for build bustage with error: implicit instantiation of undefined template 'nsTString<char>. On a CLOSED TREE
Backed out changeset b73b86efe266 (bug 1581240)
Backed out changeset 17dd226e21ae (bug 1581240)
Backed out changeset e2fd47ff8a89 (bug 1581240)
Backed out changeset c0589670c762 (bug 1581240)
2019-11-07 01:31:57 +02:00
Barret Rennie 8323f194e5 Bug 1581240 - Return a Promise from windowUtils.setCompositionRecording() r=nika
`windowUtils.setCompositionRecording()` now returns a promise that is resolved
when the composition recorder is enabled (if given `true`) or when frames are
written to disk (if given `false`). To accomplish this, the
`WebRenderCompositionRecorder` now returns a `MozPromise` when writing frames
to disk begins that is resolved when that process finishes.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 20:48:43 +00:00
Peter Van der Beken 51c0772fe6 Bug 1570253 - Convert session history sync IPC messages that don't return anything to async. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D44442

--HG--
extra : rebase_source : c1700389bff0e86f120298f838e37244309dab3e
extra : amend_source : b05519f5b6ab4ce5207318e55bc28a1582e2b905
extra : source : 3da2f0f2d95bf2452caf7afc06a5c4887e477068
extra : histedit_source : 483074226bac0ae0387677e24958c5225207e01b
2019-08-27 17:05:11 +02:00
Anny Gakhokidze c43df3d447 Bug 1545474 - Part 1: Consolidate sync IPC calls inside of nsDocShell::UpdateURLAndHistory, r=peterv, r=nika for adding sync IPC messages
Inside of nsDocShell::UpdateURLAndHistory, there are 4 sync IPC calls to
nsSHistory plus 1 static call, which contains at least one nsSHEntry::GetParent
sync IPC call. All of these calls can be moved inside of a new method
EvictContentViewersOrReplaceEntry on nsSHEntry, resulting in just 1 sync IPC
call.

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

--HG--
extra : rebase_source : ad09a9061cd6fe8eb6796b2809ea191aceb3ac73
extra : source : 2cd5cd24763ff320719aedb2142a79822efd6de4
extra : histedit_source : fdc4f80cfd8807e46c2dc02e6ab82f2bd3acc391
2019-04-18 15:18:00 -04:00
Anny Gakhokidze 686417088e Bug 1541515 - Consolidate IPC calls to nsISHEntry inside of nsDocShell::GetChildSHEntry, r=peterv, r=nika for adding sync IPC messages
Currently, nsDocShell::GetChildSHEntry calls 3 sync IPC calls on nsISHEntry,
and the method GetChildSHEntry only has one caller. By moving GetChildSHEntry
method to parent process for nsISHEntry, resulting in a new method
nsISHEntry::GetChildSHEntry, 3 sync IPC calls can be reduced to 1.

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

--HG--
extra : rebase_source : 1e76a1b07d827b35bae7ed6acca25aa8732c9ed0
extra : source : 34d91f82faa36dd8d8ed721de365122d831f7b25
extra : histedit_source : 86592bc747d506c546ec660e57087e78b9719cf7
2019-04-15 14:27:44 -04:00