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

4837 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 8c139d50a6 Bug 1418048 - Part 2: Pass callbacks by rvalue reference when possible, a=bustage
MozReview-Commit-ID: 4KsbRJ9AEdB
2017-11-20 18:12:21 -05:00
Nika Layzell 6afe674be0 Bug 1416728 - Process the CreateWindow reply message in order with other PContent IPC messages, r=bz
Previously we used the MozPromise interface for calling an async-message over
IPC with a reply. Unfortunately, MozPromise processes the reply asynchronously,
potentially allowing other IPC messages to be processed before the `->Then`
callback is processed.

In the original CreateWindow patch I tried to work around this by setting the
target of the `->Then` callback to be StableStateEventTarget. This worked,
however as it isn't safe to run scripts etc. in the stable state, we instead
tried to exit the nested event loop immediately after the runnable ran, and then
performed processing of the reply.

Unfortunately, this bug exposed a problem with that design. If we have multiple
nested event loops then we cannot guarantee that we'll exit the nested event
loop immediately after recieving the `->Then` callback, which meant that we
could still process other IPC messages before we processed the CreateWindow
reply.

The fix to this was to add a new API to allow passing callbacks directly into
IPC send methods, ensure that those callbacks are called in IPC order, and
fully process the CreateWindow reply in the callback, rather than waiting for
the nested event loop to exit.

MozReview-Commit-ID: D6zaMJRxhXd
2017-11-20 17:55:33 -05:00
Jon Coppeard a06421a289 Bug 1417123 - Remove or replace inclusion of js/GCAPI.h r=mccr8 2017-11-16 12:21:08 +00:00
Noemi Erli 550148ab69 Merge inbound to mozilla-central r=merge a=merge 2017-11-15 11:57:12 +02:00
Kevin Chen 49b2130100 Bug 1415469 - Remove mDeviceResetSequenceNumber from TDR process since we don't need it anymore; r=dvander
MozReview-Commit-ID: 3uQQwW8QOJA

--HG--
extra : rebase_source : ab6090ad51a2a4714f1739a30d854d624d187239
2017-11-08 15:26:43 +08:00
Nicholas Nethercote b15805ab71 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index

--HG--
extra : rebase_source : a46aa7078b98b4731ec96b66398c51aa6cb42d27
2017-11-13 17:16:06 +11:00
Nicholas Nethercote 39d276d2d7 Bug 1414759 - Remove dead media prefs. r=cpearce
--HG--
extra : rebase_source : 9ed24f63dc0826cd4e508a072ecc6f26cbad7088
2017-11-13 09:15:59 +11:00
Jonathan Kew a889197da2 Bug 1412090 - patch 2 - Rework the fontconfig-based platform font list implementation to pass the list of available font patterns from chrome to content, instead of letting the content process get it directly from fontconfig. r=lsalzman 2017-11-02 20:29:33 +00:00
Jonathan Kew c28cae074c Bug 1412090 - patch 1 - Wrap the font family record used to pass font info from chrome to content on macOS in a union, in preparation for using the same mechanism with a different type of font record on Linux. (No functional change here, just the added union type and some renamings from 'font family list' to 'font list' to be more generic.) r=lsalzman 2017-11-02 17:23:16 +00:00
Bill McCloskey fe841a52b6 Bug 1412195 - Track all changes to TabChild active state (r=bevis)
MozReview-Commit-ID: 7nQjquaM4sQ
2017-11-11 21:04:20 -08:00
Chris Peterson 0e8425b401 Bug 1416164 - Replace NS_ABORT with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: DRdYlOYqZpN

--HG--
extra : rebase_source : b20fb24abf0f2ce648c12a827532c0dbeefb6c63
2017-10-24 23:52:56 -07:00
Nicholas Nethercote 994d5726c4 Bug 1416613 - Improve comments about pref IPC. r=glandium
These would have saved me some time last week when I was figuring out how this
stuff works.

MozReview-Commit-ID: DUhxGDht6xT
2017-11-13 09:19:43 +11:00
Alex Gaynor af821e1fe3 Bug 1365257 - Further consolidate the configuration of the content sandbox; r=gcp
This patch moves handling of the "MOZ_DISABLE_CONTENT_SANDBOX" environment
variable into GetEffectiveContentSandboxLevel. It also introduces
IsContentSandboxEnabled and ports many users of GetEffectiveContentSandboxLevel
to use it.

MozReview-Commit-ID: 4CsOf89vlRB

--HG--
extra : rebase_source : b9130f522e860e6a582933799a9bac07b771139b
2017-06-01 10:38:22 -04:00
Jonathan Kew 7036cc5f85 Backed out changesets 75e7f32c3365, eec946b59360, 72a6f5f3512c, ea8ee40ed426 (bug 1412090) for apparently breaking all system-installed fonts on some Linux systems. r=backout 2017-11-10 16:05:33 +00:00
Jonathan Kew 0ba9f9c57b Bug 1412090 - patch 2 - Rework the fontconfig-based platform font list implementation to pass the list of available font patterns from chrome to content, instead of letting the content process get it directly from fontconfig. r=lsalzman 2017-11-02 20:29:33 +00:00
Jonathan Kew 90bf3da506 Bug 1412090 - patch 1 - Wrap the font family record used to pass font info from chrome to content on macOS in a union, in preparation for using the same mechanism with a different type of font record on Linux. (No functional change here, just the added union type and some renamings from 'font family list' to 'font list' to be more generic.) r=lsalzman 2017-11-02 17:23:16 +00:00
Nika Layzell ff8b5bd178 Bug 1414974 - Part 3: Move Get{Inner,Outer}WindowWithId onto the specific subclasses, r=smaug
These were originally exposed directly as static methods on nsGlobalWindow, but
as they are clearly associated with either the inner or outer window, it makes
more sense for them to be called as such.

MozReview-Commit-ID: LFq8EfnhDlo
2017-11-09 10:44:47 -05:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Ben Kelly b0316788f6 Bug 1415779 P1 Add the ClientManager class. r=baku 2017-11-08 21:19:59 -08:00
Nicholas Nethercote 1455a7fc09 Bug 1414150 - Remove the "memory.low_*" prefs. r=erahm,dmajor.
There's no good reason why these should't just be constants. The patch also
appends "MiB" to some of the C++ values to make their meaning clearer.

This patch fixes one outright bug, and one inconsistency.

The bug is due to a prefname mismatch:

- ContentPrefs.cpp and AvailableMemoryTracker.cpp use
  "memory.low_virtual_mem_threshold_mb".

- all.js uses "memory.low_virtual_memory_threshold_mb".

Which means that "memory.low_virtual_memory_threshold_mb" showed up in
about:config, but if you changed it nothing would happen because the callback
listened for changes to to "memory.low_virtual_mem_threshold_mb"!

Now for the inconsistency. The above means we actually use a value of 256 for
the virtual memory threshold, even though all.js says 128. But we *do* use a
value of 128 for the commit space threshold, because that's what all.js says
and that prefname is used correctly everywhere. The patch changes the commit
space threshold to 256 for consistency with the virtual memory threshold.

What a mess!

--HG--
extra : rebase_source : d3842c732efa9ab0e90eeb6a4f341aeb289589ed
2017-11-08 07:49:46 +11:00
Nicholas Nethercote 2513a08f85 Bug 1414150 - Remove the "memory.free_dirty_pages" pref. r=glandium.
This was originally added for b2g, where the pref had a different value.
Bug 1398033 enabled it everywhere.

--HG--
extra : rebase_source : c8bb03190cd00d25e6c2ec62a99ed8e911e08197
2017-11-07 19:34:18 +11:00
Andrew Osmond bda9d3294a Bug 1413011 - Allow the UI/chrome process to shutdown if the compositor thread failed to start. r=dvander
There are up to two compositor threads spawned - one in the GPU process
and one in the UI/chrome process. If the GPU process is used, then
failing to start the UI compositor thread is not fatal -- unless the GPU
process crashes too much and we fallback to the UI/chrome process. If
the GPU process compositor thread failed to start, then the GPU process
will crash and either restart, or fallback to the UI/chrome process
thread. If both fail, then Firefox crashes as expected.

Before we would not setup a content process properly unless the
UI compositor thread was active, even when using the GPU process. Now we
do, which allows the browser to be fully functional. Additionally when
shutting down, we ignore the lack of a compositor thread to permit a
graceful shutdown. In a future patch we will ideally we would not spawn
the compositor thread in a process until we actually need it, and
release assert on its failing to start.
2017-11-06 17:51:48 -05:00
sotaro bce40231ea Bug 1390741 - Use BasicCompositor if widget type does not support acceleration r=aosmond,kats 2017-11-03 16:38:34 +09:00
Ben Kelly 814922898d Bug 1413606 P2 Add IPC actor structure and boilerplate. r=baku 2017-11-01 13:19:38 -04:00
Nika Layzell c2a989268d Bug 1401379 - Part 6: Cycle collect nsWebBrowser, r=smaug
MozReview-Commit-ID: 1hteVsTlTvd
2017-11-01 11:06:33 -04:00
sotaro 3aac464b5a Bug 1408490 - Fix reinitRendering for deviceReset r=dvander 2017-11-01 11:58:10 +09:00
Martin Stransky 9fbd8cf669 Bug 1409716 - Don't use DetectDisplay() for child process, r=glandium
Don't retrieve parent display by DetectDisplay().
Utilize MOZ_GDK_DISPLAY when available, when it's missing query DISPLAY env variable for X11 only builds and standard gtk_init() for Wayland enabled builds.

MozReview-Commit-ID: 9yebsISeNjc

--HG--
extra : rebase_source : b6841727b3b6859ac51f7c5abf2d717116d3dc4d
2017-10-25 14:53:15 +02:00
Chris Peterson 1df202b177 Bug 1412048 - Replace NS_RUNTIMEABORT("...") with MOZ_CRASH("..."). r=froydnj
And remove unreachable code after MOZ_CRASH().

MozReview-Commit-ID: 6ShBtPRKYlF

--HG--
extra : rebase_source : 0fe45a59411bda663828336e2686707b550144ae
extra : source : 8473fd7333d2abe1ea1cc176510c292a5b34df45
2017-10-24 23:30:31 -07:00
Chris H-C 75fc345254 bug 1406391 - Remove toolkit.telemetry.enabled manipulation from tests r=Dexter
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.

MozReview-Commit-ID: 9spzuUAXwwP
2017-10-30 10:47:39 -04:00
Sebastian Hengst 3792a177e6 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IZImXBBcbVQ
2017-10-28 10:25:57 +02:00
Phil Ringnalda 4bc2b1615d Backed out 4 changesets (bug 1408433, bug 1406391, bug 1408512) for crashing tests by touching the network contacting incoming.telemetry.mozilla.org on nightly builds
Backed out changeset 9bfd4b0927dc (bug 1408433)
Backed out changeset 555850d5107e (bug 1408512)
Backed out changeset 15d959b9123e (bug 1406391)
Backed out changeset e1f34ba9cecc (bug 1406391)

MozReview-Commit-ID: BVoGRsD73Hf
2017-10-27 21:08:27 -07:00
Chris H-C 8e6dd31d55 bug 1406391 - Remove toolkit.telemetry.enabled manipulation from tests r=Dexter
Minor note:
reftests should've turned off uploadEnabled in the first place.

MozReview-Commit-ID: 9spzuUAXwwP
2017-10-27 10:59:43 -04:00
Xidorn Quan b24625e376 Bug 1411532 part 1 - Add a pref for enabling stylo on chrome documents. r=bz
MozReview-Commit-ID: 7Zbh4Mf43xC

--HG--
extra : rebase_source : f9e4d0b6d1234cb8efcfbaaab2a349d2a082dd6e
2017-10-27 15:07:51 +11:00
Andrea Marchesini 992696f955 Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 9 - ContentChild, r=asuth 2017-10-25 08:45:53 +02:00
Andrea Marchesini b47c88e5a1 Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 19 - ContentChild, r=billm, r=asuth 2017-10-24 12:02:41 +02:00
Sebastian Hengst 364d36fab2 merge mozilla-inbound. r=merge a=merge
MozReview-Commit-ID: B09kHrHK42C
2017-10-23 23:50:37 +02:00
Nicholas Nethercote 3842370ed8 Bug 1405541 (attempt 2) - Split AUTO_PROFILER_LABEL_DYNAMIC into three macros. r=mstange.
It's easy to mess up the scoping so that (a) the label is pushed and then
immediately popped, and/or (b) the string doesn't live long enough. It's also
easy to do a utf16-to-utf8 conversion unnecessarily when the profiler is
inactive. This patch splits that macro into three new ones that are harder to
mess up.

- AUTO_PROFILER_LABEL_DYNAMIC_CSTR: same as current.
- AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING: for nsCStrings.
- AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING: for nsStrings.

--HG--
extra : rebase_source : 3e2bbec4737b696e1c86579ae54be4cb3186c100
2017-10-13 16:12:57 +11:00
Botond Ballo 2c1a3530e6 Bug 1340415 - Ensure main-thread and async autoscrolling do not happen at the same time. r=kats
The two happening at the same time can lead to the APZ autoscroll being
cancelled due to APZ receiving a main-thread scroll offset update.

To achieve this:

  - The content process assumes APZ is handling the autoscroll until
    told otherwise.

  - If the parent process knows APZ won't handle an autoscroll, it
    tells the content process via its response to the Autoscroll:Start
    message. This covers all cases where APZ doesn't handle the
    autoscroll, except the case where APZCTreeManager itself rejects
    the autoscroll and it lives in the compositor process rather than
    the parent process.

  - If APZCTreeManager rejects an autoscroll and it lives in the
    compositor process, it sends an 'autoscroll-rejected-by-apz' message
    to the content process.

MozReview-Commit-ID: L62v4COai6W

--HG--
extra : rebase_source : bc4c6417e77461634263defb88e67ed5036c454e
2017-10-18 18:18:13 -04:00
Alessio Placitelli 7fe30d6a40 Bug 1406392 - Whitelist the "overridePreRelease" testing pref in ContentPrefs.cpp. r=chutten
This is needed since the pref will be sent with the first IPC message as soon
as the content process starts. Without this, it crashes on debug builds.

MozReview-Commit-ID: 3mGwEkaJF7n

--HG--
extra : rebase_source : 42f8d29bf9b74a42b08156ad07f262323b42c72b
2017-10-18 10:51:04 +02:00
Gabriele Svelto 84b68b502d Bug 1393800 - Have mochitests expecting crashes wait for the crashes to be recorded before clean up; r=mconley
This patch includes a bunch of somewhat related fixes, these are:

- Ensuring that when a mochitest calls SimpleTest.expectChildProcessCrash()
  the harness will wait for the crashes to be recorded before deleting the
  dump files. This involves a message round-trip between the content and
  parent process so to minimize its performance impact on all the non-crashing
  tests it is done only when required.
- As an additional optimization, the SimpleTest harness will not send a
  message to the content process anymore whenever it receives an
  ipc:content-shutdown event, instead it does it only for abnormal shutdowns.
- Manually fixing remaining mochitests causing crashes to wait for crashes to
  be recorded before finishing and deleting the dump files.
- Modifying BrowserTestUtils.crashBrowser() so that it optionally does not
  delete the dump files, this is useful for tests that submit their dumps and
  thus delete them on their own.


MozReview-Commit-ID: 4SLJ8BjJ18n

--HG--
extra : source : b5452a41bb962c6929292c5c538e19ac28d84fe7
2017-08-25 12:47:09 +02:00
Stone Shih 98ed53bd59 Bug 1407700 Part2: Handle the case to re-entry event loop for mousemove coalescing. r=smaug.
MozReview-Commit-ID: DcHVokf6boL
2017-10-12 09:05:40 +08:00
Stone Shih 69ed33396c Bug 1407700 Part1: Revise CoalescedInputData interfaces. r=smaug.
MozReview-Commit-ID: 75AsFBM4qr
2017-10-12 11:22:36 +08:00
Tom Ritter 36dde53d4f Bug 1404035 Address unused result warnings in dom/ipc/ r=smaug
In come cases, we can fail the IPC message, but in one we can't really do anything.

MozReview-Commit-ID: 4vdKIRUOJNN

--HG--
extra : rebase_source : b32559b4d88017612c35346f83cb11cb5b522252
2017-09-28 12:46:37 -05:00
Kris Maglione 60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Sebastian Hengst 373bdd8602 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9adaYBJ4tlo
2017-10-13 23:37:41 +02:00
sotaro 55375630e7 Bug 1391262 - Create TabChild::CreateRemoteLayerManager() r=dvander 2017-10-13 23:32:52 +09:00
sotaro e037507a09 Bug 1391262 - Do not use remote LayerManager when its initialization fails r=dvander 2017-10-13 23:32:36 +09:00
Chung-Sheng Fu 6eb3e9c2c9 Bug 967895 - Ask for placeholder data when image extraction is not allowed (Tor 6253). r=jrmuizel
MozReview-Commit-ID: AJ5F6M5S83U

--HG--
extra : rebase_source : 894b16575ebbccc26c5b639d7526cb473501d9d2
2017-08-22 14:23:41 +08:00
Jed Davis a9b7865141 Bug 1316153 - Remove base::ChildPrivileges from IPC. r=billm,bobowen
ChildPrivileges is a leftover from the B2G process model; it's now
mostly unused, except for the Windows sandbox using it to carry whether
a content process has file:/// access.

In general, when sandboxing needs to interact with process launch, the
inputs are some subset of: the GeckoProcessType, the subtype if content,
various prefs and even GPU configuration; and the resulting launch
adjustments are platform-specific.  And on some platforms (e.g., OS X)
it's all done after launch.  So a simple enum used cross-platform isn't
a good fit.

MozReview-Commit-ID: K31OHOpJzla

--HG--
extra : rebase_source : 3928b44eb86cd076bcac7897536590555237b76b
2017-09-08 16:16:50 -06:00
Luca Greco 305df319dc Bug 1390445 - Fix select popup positioning for oop extensions options_ui pages. r=billm,kats,kmag
MozReview-Commit-ID: Izt10SuUK0i

--HG--
extra : rebase_source : d6e302d4fd8b78100d98cbe52c4234bd49de1dfd
2017-09-20 20:03:58 +02:00