Commit Graph

5048 Commits

Author SHA1 Message Date
Ryan Hunt
f2a88fde64 Bug 1475139 part 6 - Add move assignment operator to ByteBuf. r=jrmuizel
--HG--
extra : rebase_source : 2dfd45d206b16f1539606be4bf10d89d9eb56b90
2018-10-02 08:07:12 -05:00
Ryan Hunt
752b0f6f6c Bug 1475139 part 3 - Add serialization support for nsTHashtable with nsUint64HashKey. r=froydnj
I'd like to use a nsTHashtable acting as a set in a struct that will be passed over IPDL, but
couldn't find any ParamTraits implementation for it. It'd be nice to make the implementation
generic, but I couldn't find an easy way to do it.

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

--HG--
extra : rebase_source : f22b788d99cc336867871d2c89919fc8ddec2371
2018-09-24 21:35:31 -05:00
Ryan Hunt
e8c15a9c36 Bug 1475139 part 2 - Add 'moveonly' qualifier to IPDL using statements. r=jld
I'd like to use a struct over IPDL which is move only. This patch adds a modifier to
usings statements to indicate the C++ type should always be moved, similar to refcounted.

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

--HG--
extra : rebase_source : 492309e2ec4f4cc6a6ffe639e3c6e4adfb6ecf08
2018-09-24 21:24:24 -05:00
Nathan Froyd
2975d8ecc6 Bug 1495871 - remove chromium atomics code; r=jld
The only consumer of this code was Singleton, which we previously
removed, and everything that this code accomplished can be done more
simply and more foolproof-y by standard constructs these days.
2018-10-05 13:43:46 -04:00
Nathan Froyd
68a6731334 Bug 1495871 - remove singleton headers from ipc/; r=jld
These headers are no longer used.
2018-10-05 13:43:46 -04:00
Nathan Froyd
04abc48f2b Bug 1495871 - use C++11 statics in time_win.cc; r=jld
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd
e2d2f91d22 Bug 1495871 - use C++11 statics for Faulty instance; r=decoder
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd
ab6a71a3de Bug 1495871 - use C++11 statics in ipc_channel_posix.cc; r=jld
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd
582b05b7b7 Bug 1495871 - remove ipc/'s copies of *AtomicSequenceNum classes; r=jld
Their uses are easily replaced with simpler classes.
2018-10-05 13:43:47 -04:00
sotaro
28923c3278 Bug 1496003 - Add sync ipc WebRenderBridgeChild::SendEnsureConnected() r=mattwoodrow,froydnj 2018-10-05 16:35:29 +09:00
Andrew McCreight
0437363577 Bug 1495912- Remove more trivial calls to do_QueryInterface r=smaug
MozReview-Commit-ID: 34BAwt3SAJk

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

--HG--
extra : moz-landing-system : lando
2018-10-03 19:52:01 +00:00
David Parks
1a3c571150 Bug 1493649: Fix IPDL test compilation (r=jld)
This patch allows IPDL tests to compile -- in other words, it fixes the build when the --enable-ipdl-tests flag is present.  Most of the fixes are simple API updates but we also needed to fix an issue with the constness of nsTArray<Shmem> parameters that are defined in IPDL structs.

This patch does not fix the tests themselves -- some IPDL tests will still fail when run.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 22:32:17 +00:00
Tiberius Oros
3edd9afbe3 Backed out 5 changesets (bug 1431441) for failing devtools at client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js on OSX opt a=backout
Backed out changeset 94a1d1d67191 (bug 1431441)
Backed out changeset be7ec7438701 (bug 1431441)
Backed out changeset db6b7ee04187 (bug 1431441)
Backed out changeset f61ec0f140c2 (bug 1431441)
Backed out changeset ac51f86f5cac (bug 1431441)
2018-10-03 09:39:01 +03:00
Haik Aftandilian
ef9150c083 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:29:46 +00:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Tom Ritter
cc99e4a961 Bug 1494844 Remove an unused MOZ_PLUGIN_CONTAINER define r=jld
In Bug 1114647 we added this define, and it was used in ipc/contentproc/plugin-container.cpp
However its use there was removed as part of MOZ_PLUGIN_CONTAINER

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

--HG--
extra : moz-landing-system : lando
2018-09-28 16:06:50 +00:00
Francois Marier
eb27c3267c Bug 1488974 - Disable FastBlock after the load event has fired. r=mayhemer,Ehsan
The test used to assume that the load event didn't matter and so
the expected values had to be updated to match the new behavior.

A new "slowIFrame" test was added to capture what was previously
tested by the "badIFrame".

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

--HG--
extra : moz-landing-system : lando
2018-09-28 19:12:10 +00:00
Nathan Froyd
7ed849f7d2 Bug 1494712 - fix incorrect preprocessor define for aarch64 in atomicops.h; r=jld 2018-09-27 19:44:16 -04:00
Coroiu Cristina
fa474415f8 Backed out changeset d846803d6d6e (bug 1485762) on request by dev a=backout 2018-09-28 00:06:02 +03:00
Kris Maglione
74481e8af4 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
extra : intermediate-source : 5152af6ab3e399216ef6db8f060c257b2ffbd330
extra : histedit_source : ef06000344416e0919f536d5720fa979d2d29c66%2C4671676b613dc3e3ec762edf5d72a2ffbe6fca3f
2018-07-27 15:13:12 -07:00
Narcis Beleuzu
72f96acd7b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione
81eb50cf31 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : fcf8fa50e748c4b54c3bb1997575d9ffd4cbaae1
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
2018-07-27 15:13:12 -07:00
Noemi Erli
36cc0e5fa7 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione
a6edc4f204 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : 02c5572b92ee48c11697d90941336e10c03d49cf
2018-07-27 15:13:12 -07:00
sotaro
f79bc9e186 Bug 1492745 - Remove PWebRenderBridge::Create() r=mattwoodrow,froydnj 2018-09-26 10:19:18 +09:00
Jason Orendorff
aaf539046b Bug 1491939 - Part 3: Centralize configuration of JS realm options from prefs. r=baku
Depends on D6554

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

--HG--
extra : moz-landing-system : lando
2018-09-25 14:11:13 +00:00
Markus Stange
c37151f2e9 Bug 1493275 - Annotate idle stacks in the chromium event loop on Windows. r=froydnj
Depends on D6533

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

--HG--
extra : moz-landing-system : lando
2018-09-21 21:22:58 +00:00
shindli
87009004b2 Backed out changeset 58f0722012cd (bug 1475415) for force-cargo-library-build bustages CLOSED TREE 2018-09-24 19:37:49 +03:00
Jed Davis
8724a9004a Bug 1400042 - Remove SetAllFDsToCloseOnExec r=mccr8
As the comments indicate, it has unavoidable race conditions in a
multithreaded program, and its call sites have all been removed.

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

--HG--
extra : moz-landing-system : lando
2018-09-22 02:31:24 +00:00
Tristan Bourvon
4db0a2f5a0 Bug 1475415 - Add first version of IPDL-JS API r=mrbkap,mccr8
Add the first version of the IPDL-JS API, which allow chrome JS to load IPDL files and use them to communicate accross Content processes.
See IPDLProtocol.h for more information regarding how to use the API.

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

--HG--
rename : ipc/moz.build => ipc/ipdl_new/moz.build
extra : moz-landing-system : lando
2018-09-24 14:13:20 +00:00
Diego Pino Garcia
0f11b0a3d3 Bug 1483986 - Remove sync versions of document.cookie getter/setter; r=ehsan,froydnj 2018-09-21 23:01:32 -04:00
Jed Davis
f2f934dc7e Bug 1400051 - IPC: use process_util_linux on BSD and remove process_util_bsd. r=glandium
This change is mainly to avoid the use of SetAllFDsToCloseOnExec, which
has an unavoidable race condition that can leak file descriptors into
child processes.  The "Linux" implementation of child process creation,
now that B2G support has been removed, is essentially a generic Unix
fork+dup2+execve which works on BSD (and is already used on Solaris).
2018-09-20 19:53:31 -06:00
Jeff Walden
9725076b9b Bug 1491137 - Remove the two setUTF8(bool) CompileOptions functions now that the underlying field they alter is gone. r=jandem
--HG--
extra : rebase_source : c06e34549bd3b895d34cad93c5c3113ed4748390
2018-09-18 08:41:41 -07:00
Margareta Eliza Balazs
0a37599745 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-18 17:38:17 +03:00
Gabriele Svelto
a1f6255102 Bug 1463048 - Remove asynchronous minidump generation r=ted
This reverts the changes in bug 1360308, bug 1390143 and bug 1469603. Minidump
generation will now only happen on the main process' main thread which might
lead to hangs but is known to be fairly robust. Asynchronous generation proved
too brittle and enormously increased the complexity of this already
hard-to-read code.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 20:51:45 +00:00
Jeff Walden
9667f8bf7d Bug 1491137 - Remove JS_Compile{,UC}Script, because except for argument ordering they're exactly identical to existing JS::Compile* functions. r=jandem
--HG--
extra : rebase_source : 89ae632dbc654f1f29f8186955042d4586aeeeff
2018-09-13 16:41:00 -07:00
Jeff Walden
c1d9c9d203 Bug 1491137 - Rename JS_BufferIsCompilableUnit to JS_Utf8BufferIsCompilableUnit, consistent with how it already interprets that data, and propagate that presumption of UTF-8-ness a little bit further along into callers. r=jandem
--HG--
extra : rebase_source : e2ab50b48d4faf12a6791b0925b080818334421d
2018-09-13 13:30:38 -07:00
Bob Owen
81d8e5c8da Bug 1490234: Make permissions specific for Windows shared memory handle. r=jld 2018-09-18 11:50:18 +01:00
Jeff Walden
a3dc828570 Bug 1491137 - Rename the JS::Compile function that accepts FILE* to JS::CompileUtf8File, because every caller passes a file with UTF-8 content. r=jandem
--HG--
extra : rebase_source : 7abe623b622ba5433ff85aafa691c9a3f0e16eea
2018-09-13 01:21:52 -07:00
Dorel Luca
7a91966c10 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-15 12:46:59 +03:00
Hiroyuki Ikezoe
5f958f80c7 Bug 1486971 - Test for dynamically change of the prefers-reduced-motion setting on MacOSX. r=froydnj,mstange
The framework to simulate the setting change works as following;

 - nsIDOMWindowUtils.setPrefersReducedMotion() calls an IPC function which ends
   up calling nsChildView::SetPrefersReducedMotion() in the parent process

 - nsChildView::SetPrefersReducedMotion() sets the given value into
   nsLookAndFeel::mPrefersReducedMotionCached just like we set the value queried
   via NSWorkspace.accessibilityDisplayShouldReduceMotion in the parent process
   and send a notification which is the same notification MacOSX sends when the
   system setting changed

 - Normally the cached value is cleared before quering new values since the
   cache value is stale, but in this case the value is up-to-date one, so
   nsChildView::SetPrefersReducedMotion() tells that we don't need to clear the
   cache, and nsIDOMWindowUtils.resetPrefersReducedMotion() resets that state
   of 'we don't need to clear the cache'

There are two test cases with the framework in this commit, one is just setting
the value and checking the value queried by window.matchMedia.  The other one is
receiving 'change' event and checking the value of the event target.

Note that to make this test works the patch for bug 1478212 is necessary since
the test runs in an iframe.

Depends on D5003

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

--HG--
extra : moz-landing-system : lando
2018-09-15 01:00:07 +00:00
Jed Davis
5fc0190dc0 Bug 1488994 - Stop waiting for channel construction in AsyncLaunch, and clean up launch methods r=mccr8,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5724

--HG--
extra : moz-landing-system : lando
2018-09-14 17:26:49 +00:00
Jed Davis
775ab1e410 Bug 1478145 - Merge GeckoChildProcessHost::PerformAsyncLaunchInternal back into PerformAsyncLaunch r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5723

--HG--
extra : moz-landing-system : lando
2018-09-14 17:28:38 +00:00
Aaron Klotz
ab58dd7f8b Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:56:10 +00:00
Aaron Klotz
816df62731 Bug 1489317: Part 2 - Improvements to mscom::AgileReference; r=froydnj
This patch adds the definitions of the RefPtr constructor and operator=.
It also refactors some stuff in AgileReference to make these objects easier
to use. Since it's just a bunch of C++ goop, I figured that you'd be fine to
review this. Let me know if you want to add a reviewer who is more familiar
with the COM nuances.

Depends on D5317

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:55:39 +00:00
Ted Mielczarek
d59bc31677 Bug 1399877 - globally define MOZ_DLL_PREFIX/MOZ_DLL_SUFFIX; r=gps
Several source files use DLL_PREFIX/DLL_SUFFIX defines, and they all set
them in moz.build using `DEFINES`.  This is problematic for the WSL
build because the quoting gets lost somewhere between bash and cl.exe.
We cannot simply set them globally in moz.configure because their
stringified definitions would conflict with the `set_config` of
DLL_PREFIX/DLL_SUFFIX.  Therefore, we globally define
MOZ_DLL_PREFIX/MOZ_DLL_SUFFIX and change all define-related uses of
DLL_PREFIX/DLL_SUFFIX to use their MOZ-equivalents instead.
2018-09-11 13:31:20 -04:00
Ehsan Akhgari
d3787265b1 Bug 1489252 - Part 2: Add a telemetry probe for measuring the rate at which popular analytics providers get blocked by fastblock for top-level documents; r=baku,mayhemer,chutten data-r=liuche
Differential Revision: https://phabricator.services.mozilla.com/D5296
2018-09-14 16:06:07 -04:00
Daniel Varga
1539df295b Merge mozilla-inbound to mozilla-central a=merge 2018-09-08 06:53:43 +03:00
Emilio Cobos Álvarez
c9c6290890 Bug 1489453 - EnumSet shouldn't take 32 bits if not needed. r=froydnj
This is the only reason I haven't used it before for things like
StyleSheet::State.

Change the underlying type to be the underlying enum representation by default,
but allow to override it if wanted.

Assertions should catch misuses.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:40:02 +00:00
Bogdan Tara
30c8b1bee3 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-09-07 00:59:25 +03:00