Commit Graph

4280 Commits

Author SHA1 Message Date
Wes Kocher
25d50f2c30 Merge inbound to central, a=merge 2017-04-12 14:39:09 -07:00
Ehsan Akhgari
067b18b9f3 Bug 1316683 - Part 5: Avoid going into SpiderMonkey for retrieving origin attributes; r=baku
Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here.  This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
2017-04-12 11:32:19 -04:00
Bill McCloskey
30b9639c6e Bug 1333968 - Label the DidComposite message (r=dvander)
MozReview-Commit-ID: 7cW7apxUJu0
2017-04-11 12:59:13 -07:00
Ehsan Akhgari
1d72f5911e Bug 1347461 - Part 2: Always initialize all DataStorage classes in the content process at initialization time; r=keeler 2017-04-10 22:44:36 -04:00
Ehsan Akhgari
c0b6db9d07 Bug 1347461 - Part 1: Add a C++ API for the list of DataStorage classes; r=keeler 2017-04-10 22:44:32 -04:00
Masayuki Nakano
61ce5526c6 Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r=m_kato
MozReview-Commit-ID: 2rIXTlwA6my

--HG--
extra : rebase_source : a51be3edd717092738c2b5e8ccc4f60540712bfd
2017-04-11 21:24:55 +09:00
Phil Ringnalda
c582d2c9af Backed out changeset e8efc3c5d61f (bug 1337062) for crashes in mozilla::gfx::gfxVars::ApplyUpdate(mozilla::gfx::GfxVarUpdate
CLOSED TREE
2017-04-11 18:49:21 -07:00
Gerald Squelart
b34950f944 Bug 1337062 - Transfer initial gfxVars with SendSetXPCOMProcessAttributes - r=dvander
MozReview-Commit-ID: EUnwXkDwBTZ

--HG--
extra : rebase_source : 2641d987a6f7326dc07766ba6b06c223a513e313
2017-04-11 15:36:56 +12:00
Gerald Squelart
63dbe37188 Bug 1337063 - Transfer child's initial ContentDeviceData with SendSetXPCOMProcessAttributes - r=dvander
MozReview-Commit-ID: IWCgL9aCusW

--HG--
extra : rebase_source : 31d901f99105224ac7445b487813b010fd643bb9
2017-04-12 09:37:35 +12:00
Kartikaya Gupta
96657be4f9 Bug 1350638 - Remove sync GetCompositorOptions call in TabChild::ReinitRenderingState. r=dvander
This piggybacks the sync message on the pre-existing
EnsureLayersConnected sync message pathway to the compositor.

MozReview-Commit-ID: DfYTlJrr3Gu

--HG--
extra : rebase_source : c2bd29e655db65e3016a79bf3f6068ffb1c8b7c7
2017-04-09 17:31:24 -04:00
Kartikaya Gupta
1bfa62105b Bug 1350638 - Remove sync GetCompositorOptions call in TabChild::InitRenderingState. r=dvander
The goal of this patch is to remove the call to the sync IPC
GetCompositorOptions message from TabChild::InitRenderingState. In order
to this, we have InitRenderingState take the CompositorOptions as an
argument instead, and propagate that backwards through the call sites.
Eventually we can propagate it back to a set of already-sync IPC
messages in PCompositorBridge that are used during layers id
registration (NotifyChildCreated, NotifyChildRecreated, etc.). Therefore
this patch effectively piggybacks the CompositorOptions sync IPC onto
these pre-existing sync IPC messages.

The one exception is when we propagate it back to the AdoptChild call.
If this message were sync we could just use it like the others and have
it return a CompositorOptions. However, it is async, so instead we add
another call to GetCompositorOptions here temporarily. This will be
removed in the next patch.

MozReview-Commit-ID: AtdYOuXmHu4

--HG--
extra : rebase_source : 5b80831cf84d3a4b57b2214a12ccf8a896cfa3a7
2017-04-09 17:30:27 -04:00
Sebastian Hengst
548852b3a4 merge mozilla-central to autoland. r=merge a=merge 2017-04-07 22:16:26 +02:00
Carsten "Tomcat" Book
3a762886de Merge mozilla-central to mozilla-inbound 2017-04-07 15:33:03 +02:00
Gabor Krizsanits
e2e7641412 Bug 1344174 -Add measure for memory distribution among child processes. r=chutten 2017-04-07 12:14:45 +02:00
Henry Chang
eec96acbf0 Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku
We add a new "on-off" protocol PURLClassifierLocal which calls
nsIURIClassifier.asyncClassifyLocalWithTables on construction and
calls back on destruction. Pretty much the same design as PURLClassifier.

In order to avoid code duplication, the actor implementation is templatized
and |MaybeInfo| in PURLClassifier.ipdl is moved around.

Test case is included and the custom event target is not in place for labelling.
The custom event target will be done in Bug 1353701.

MozReview-Commit-ID: IdHYgdnBV7S

--HG--
extra : rebase_source : ab1c896305b9f76cab13a92c9bd88c2d356aacb7
2017-04-07 14:15:16 +08:00
Phil Ringnalda
032b07550c Backed out changeset 4f7947062b4f (bug 1337062) for assertion failures in gfxVars.cpp
--HG--
extra : rebase_source : 307963eba4328b23edaf64e7255f5f501ace0efe
2017-04-06 20:11:19 -07:00
Gerald Squelart
9c16b0ccdc Bug 1337062 - Transfer initial gfxVars over command line - r=blassey
When a subprocess is launched, gfxVars updates (for non-default values) are
serialized and passed on the command line, up to a limit of 1023 characters,
and ensuring it should not overflow the command line size.

When the child starts, the command line parameter is given to gfxVars, so the
updates can be used during gfxVars::Initialize(), instead of doing a sync
request to the parent.

In case the updates are not sent, or in the unlikely case the child cannot
parse them, we fallback to the sync request -- The former case should be rare
enough that a slow sync request is acceptable: It should only happen if D3D
block-list is *modified* (most people would either use the default, or just
overwrite these prefs with short strings.)

MozReview-Commit-ID: 6MoJC0fe59Q

--HG--
extra : rebase_source : cdc2e451783160c579b8fc84050e8457c600523e
2017-03-28 12:16:41 +11:00
Mike Conley
2228d5aa1b Bug 1354080 - Stop doing needless work in the parent process every time the refresh driver ticks. r=kats
When we're animating, we tick the refresh driver. If that occurs in the parent process
when e10s is enabled, then we currently run TabParent::DidRefresh which does some
dimensions calculations and might send a message to the content process if the
dimensions have changed.

This was originally added to fix a B2G bug in bug 1153023. We don't need to do it
anymore, since we don't set CSS transforms on content browser windows.

MozReview-Commit-ID: JJ7AJHlSyWn

--HG--
extra : rebase_source : b45c9f02c3db8b7ecf0beb40fa7540db39473e8d
2017-04-06 18:11:34 -04:00
Sotaro Ikeda
1b3f1e93ba Bug 1353958 - Add Gpu process reset handling for QuantumRender. r=kats
MozReview-Commit-ID: 6ZkB1ezyWlK
2017-04-06 12:56:10 -04:00
Andrea Marchesini
df043c04b6 Bug 1350386 - Make nsInputStream structuredCloneable, r=mystor 2017-04-05 19:02:57 +02:00
Aaron Klotz
b836337e81 Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX

A general outline of the COM handler (a.k.a. the "smart proxy"):

COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.

Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.

IHandlerProvider consists of 5 functions:

* GetHandler returns the CLSID of the component that should be loaded into
  the COM client's process. If GetHandler returns a failure code, then no
  handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
  data. These calls are made on a background thread but need to do their work
  on the main thread. We declare the payload struct in IDL. MIDL generates two
  functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
  mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
  allows the handler to communicate directly with Gecko. IGeckoBackChannel
  currently provides two methods: one to allow the handler to request fresh
  cache information, and the other to provide Gecko with its IHandlerControl
  interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
  proxied. We may want to send a more sophisticated proxy than the one that
  is requested. The desired IID is returned by this function. In the case of
  a11y interfaces, we should always return IAccessible2_3 if we are asked for
  one of its parent interfaces. This allows us to eliminate round trips to
  resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
  imbued with the same handler code.

The main focus of this patch is as follows:

1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
   into the chrome process.

Some more information about IHandlerControl:

There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.

--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-04 15:23:55 -06:00
Geoff Brown
181892f671 Bug 1348547 - ReleaseCachedProcesses() between aboutdebugging tests; r=gabor 2017-04-04 09:45:20 -06:00
Kartikaya Gupta
6c77e5ee0c Bug 1351777 - Use a BasicLayerManager in the content process if the corresponding parent-side layer manager isn't connected to the compositor. r=dvander
There are scenarios where we have a TabParent in the UI process hooked up to
a PuppetWidget with a BasicLayerManager. Webextensions fall into this category.
In this scenario, the parent-side layer manager is not hooked up to
the compositor (that is, there is no entry in the CompositorBridge layer tree
state map for the layers id). However, the content-side still ends up creating
a ClientLayerManager or a WebRenderLayerManager, which expects the layers id to
be registered in the compositor. This results in brokenness (in the case of the
ClientLayerManager/PLayerTransaction) or crashes (in the case of WebRenderLayerManager/
PWebRenderBridge). Instead, this patch changes this scenario to have the content
process use a BasicLayerManager which seems safer.

MozReview-Commit-ID: 3f80aZrRrmD

--HG--
extra : rebase_source : 10ec78dd7daf1c1c889929f0d79e0b75675b4b05
2017-03-31 11:43:21 -04:00
Kartikaya Gupta
ec035abf34 Bug 1351777 - Remove aSuccess argument to RenderFrame constructor. r=dvander
Instead we can use the otherwise-unused function to check if initialization worked.
Technically, because of the way RenderFrame construction works, whether or not
initialization succeeds is exactly dependent on whether or not the frameloader is
non-null, so we could even just use that to check success. But this feels slightly
more readable/cleaner.

MozReview-Commit-ID: CGiIAA1h6V7

--HG--
extra : rebase_source : 2d4504f7d5fde3c394edca14fe01840c1738d197
2017-03-31 11:43:21 -04:00
Kartikaya Gupta
c44b0fcca0 Bug 1351777 - Remove unnecessary cast and more tightly scope a local var. r=dvander
MozReview-Commit-ID: JEfQOdQ2HNJ

--HG--
extra : rebase_source : 4cd5e8df775b930b9fea487cbf447b3310a2bcbb
2017-03-31 11:43:21 -04:00
Ryan VanderMeulen
05037eec1a Merge m-c to inbound. a=merge 2017-03-30 15:21:27 -04:00
Markus Stange
7c6c13efdf Bug 1348426 - Add profiler labels to RecvSync/Async/RpcMessage that include the message name. r=billm
MozReview-Commit-ID: F7MZhgV12DZ

--HG--
extra : rebase_source : c97e4914f4292ac52338a691dc44810f7dda7486
2017-03-29 17:43:21 -04:00
Ryan VanderMeulen
f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Andrea Marchesini
0132b2fc81 Bug 1340921 - Introduce PMemoryStream for having PBlob and Multi-e10s happy - part 3 - PMemoryStream and PBlob, r=mrbkap 2017-03-29 10:40:38 +02:00
Andrea Marchesini
d99a7dac26 Bug 1340921 - Introduce PMemoryStream for having PBlob and Multi-e10s happy - part 2 - PMemoryStream actor, r=mrbkap 2017-03-29 10:40:38 +02:00
Andrew McCreight
a8cef3c230 Bug 1351008 - Lazily load Manifest jsms in manifestMessages.js. r=baku
This avoids loading 7 jsms until they are actually needed, reducing
content process memory usage.

MozReview-Commit-ID: 8ukNr7PL80A

--HG--
extra : rebase_source : a926a19645ffcacadec93ecc79927d356d603114
2017-03-27 11:48:18 -07:00
Kartikaya Gupta
042789f2a8 Bug 1351384 - Stop using the CompositorOptions to check if WebRender is enabled. r=dvander
I suspect that the PuppetWidget is trying to create the layer manager after
it has been connected to a TabChild but before the TabChild has populated the
CompositorOptions. This results in the PuppetWidget effectively getting an
uninitialized value for the CompositorOptions, and so it sometimes randomly
creates a WebRenderLayerManager, later resulting in a crash.

It seems like exposing the potentially-uninitialized CompositorOptions from
TabChild like this is a bad idea, so I'm removing that API and using the more
reliable gfxVars in PuppetWidget. This is fine for WebRender purposes because
we no longer care to allow having WR compositors co-exist with non-WR
compositors.

We may eventually want to remove the CompositorOptions entirely, but for now
the rest of the usage of it seems fine.

MozReview-Commit-ID: 6ekG8j1PskK

--HG--
extra : rebase_source : 0099e847ac356ca235969bcd81f47d65f49de2eb
2017-03-28 16:40:24 -04:00
Alex Gaynor
b6ba323a65 Bug 1352055 - Remove reference to a legacy preference name for sandboxing. r=jimm
MozReview-Commit-ID: 28UfBrHWfcb

--HG--
extra : rebase_source : b149a67b6816c56b35125eb2eaf2564b77dbb23c
2017-03-30 09:50:57 -04:00
Gabor Krizsanits
0384d05aa6 Bug 1346288 - Setting e10sMultiBlockedByAddons for bootrapped add-on users. r=felipe 2017-03-30 18:44:27 +02:00
Gabor Krizsanits
a01e65bce7 Bug 1346288 - Block e10s-multi if e10sMultiBlockedByAddons is set. r=mrbkap 2017-03-30 18:44:20 +02:00
Kevin Chen
bf53d0a60d Bug 1343479 - Label the tasks for APZ module. r=bevistseng,kats
MozReview-Commit-ID: GkAl4MZorxP

--HG--
extra : rebase_source : 0134d0d69b5d8dba0fb39aa8908fbfa4d6a9d777
2017-03-23 06:16:38 +00:00
Kan-Ru Chen
8ba424eabb Bug 1194751 - Part 6. Use mozilla::widget::ScreenManager in content process. r=mconley
This is the most important part of the patch series. It removes the
PScreenManager protocol and use ScreenManager directly in the content
processes.

Initial and subsequent updates are sent via PContent::RefreshScreens.
struct ScreenDetails are kept to serialize Screen over IPC.

nsIScreenManager::ScreenForNativeWidget is removed because
nsIWidget::GetWidgetScreen can replace it. nsIScreen::GetId is removed
because it's not useful for the more general Screen class.

MozReview-Commit-ID: 5dJO3isgBuQ

--HG--
extra : rebase_source : 06aa4e4fd56e2b2af1e7483aee7c0cc7f35bdb97
2017-03-09 19:30:26 +08:00
Kan-Ru Chen
841c421ce8 Bug 1194751 - Part 1. Remove nsIScreenManager::GetNumberOfScreens. r=jimm
It's not used anywhere. Remove it will make removing PScreenManager
easier.

MozReview-Commit-ID: 5dn8kDhTZVl

--HG--
extra : rebase_source : 96b8ddb18deee94ca256bfa118b60ceacfd2d677
2017-03-09 19:16:24 +08:00
Chris Pearce
238266c96a Bug 1315850 - Add media.eme.chromium-api.enabled to ContentPrefs.cpp. r=smaug
The pref cache added in the previous commit initializes at startup.

MozReview-Commit-ID: IvfBALLdcbe

--HG--
extra : rebase_source : b3c63c76f9eda144e6ae2c8801ac8637444f6c48
2017-02-22 16:12:47 +13:00
Andrea Marchesini
7524cbfde8 Bug 1349979 - Remove OptionalID from DOMTypes.ipdlh, r=qdot 2017-03-23 19:17:44 +01:00
Carsten "Tomcat" Book
9b6d088496 merge autoland to mozilla-central a=merge
--HG--
rename : browser/components/preferences/in-content/tests/browser_advanced_siteData.js => browser/components/preferences/in-content-old/tests/browser_advanced_siteData.js
rename : dom/media/mediasink/DecodedAudioDataSink.cpp => dom/media/mediasink/AudioSink.cpp
2017-03-23 13:42:40 +01:00
Sebastian Hengst
f5e68bc3e1 Backed out changeset ef22dba0dac5 (bug 1316683) for various test failures, e.g. xpcshell netwerk/test/unit/test_bug826063.js and browser-chrome browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js. r=backout on a CLOSED TREE 2017-03-22 20:28:39 +01:00
Ehsan Akhgari
101a58b3c6 Bug 1316683 - Avoid going into SpiderMonkey for retrieving origin attributes; r=baku
Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here.  This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
2017-03-22 14:13:31 -04:00
Sebastian Hengst
20fb8455d6 Backed out changeset 7e47807067a6 (bug 1316683) for Windows bustage. r=backout 2017-03-22 15:15:27 +01:00
Ehsan Akhgari
9093d5f005 Bug 1316683 - Avoid going into SpiderMonkey for retrieving origin attributes; r=baku
Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here.  This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
2017-03-22 10:03:26 -04:00
Andrea Marchesini
507c00cb9f Bug 1343933 - Renaming Principal classes - part 4 - ContentPrincipal, r=qdot
--HG--
rename : caps/nsPrincipal.cpp => caps/ContentPrincipal.cpp
rename : caps/nsPrincipal.h => caps/ContentPrincipal.h
2017-03-22 11:39:31 +01:00
Michael Layzell
838290fd27 Bug 1337056 - Part 12: Send down permissions when calling createAboutBlankContentViewer, r=baku
MozReview-Commit-ID: LigZnHM34CC
2017-03-21 11:08:03 -04:00
Michael Layzell
bd18aec002 Bug 1337056 - Part 11: Change the permission key assertion to a fatal assert on debug builds, r=ehsan
MozReview-Commit-ID: HTxvlomRKWy
2017-03-21 11:08:03 -04:00
Michael Layzell
3ffc5e3ecd Bug 1345573 - Part 1: Key http, https, and ftp URIs on origin instead of eTLD+1, r=baku
MozReview-Commit-ID: Gihc4QFf11R
2017-03-21 11:08:03 -04:00
Michael Layzell
a2d8ee53df Bug 1337056 - Part 9: Check LOAD_HTML_OBJECT_DATA in ContentParent::TransmitPermsFor, r=ehsan
MozReview-Commit-ID: 5MBAUe5zbvU
2017-03-21 11:08:03 -04:00