Commit Graph

3540 Commits

Author SHA1 Message Date
arthur.iakab
bbca7c7700 Merge mozilla-central to inbound 2018-04-11 01:17:20 +03:00
Nika Layzell
952f6a915a Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:

Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj

Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz

Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz

Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku

Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku

Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-04-10 17:49:48 -04:00
Kartikaya Gupta
d23526ec95 Bug 1452656 - Re-enable a now-passing crashtest. r=jrmuizel
MozReview-Commit-ID: Kr88oFk0JyA

--HG--
extra : rebase_source : 20220e4edfb8ec08ceeb878747c323bfb5267546
2018-04-09 11:11:47 -04:00
Jonathan Watt
ef1290712d Bug 1452170 follow-up - Fix Windows unified build bustage by adding missing AutoRestore.h includes. r=me on CLOSED TREE 2018-04-09 10:21:42 +01:00
David Parks
a9fd0592af Bug 1446499: Use static nsWindowsDllInterceptor in plugin's HookProtectedMode r=aklotz
HookProtectedMode requires its nsWindowsDllInterceptor to last as long as the functions need to be overridden.  This uses a static object instead of a local one.

--HG--
extra : rebase_source : 7ba3f2fc1e19f89936b7f7fa490554e9cf9b885c
2018-04-03 17:09:36 -07:00
Honza Bambas
31c173ca8a Bug 1443892 - Add -MOZ_LOG and -MOZ_LOG_FILE command line arguments. r=erahm, r=nfroyd 2018-04-03 11:32:00 -04:00
Christoph Kerschbaumer
a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Tom Schuster
2bf6212869 Bug 1255800 - Remove JS_THIS_OBJECT from dom/xpconnect. r=bz
--HG--
extra : rebase_source : dcaa891010e25e10079db853fe4eb1a7fe261e47
2018-03-07 14:35:22 +01:00
Kris Maglione
b1eb2466a3 Bug 1446686: Follow-up: Fix sync tests that load head_addons.js and fixture add-ons from add-on manager tests. r=they're-lucky-i-don't-just-disable-the-tests,test-only
MozReview-Commit-ID: C9kNoWVsxYY

--HG--
extra : rebase_source : a28be4f9e395e853ea477ba0b59293f347eedf83
extra : amend_source : 81c141c49a328f85c1f99bbbd0416064f294abb9
2018-03-25 20:12:11 -07:00
shindli
a569e1df9e Backed out 3 changesets (bug 1366256) for failing in toolkit/components/url-classifier/tests/browser/browser_flashblock_off_with_always_activate.js | Plugin should have the correct 'plugin running' state on a CLOSED TREE
Backed out changeset fb9e8967c454 (bug 1366256)
Backed out changeset 5bee2ab0b174 (bug 1366256)
Backed out changeset c08e6bfa67d0 (bug 1366256)
2018-03-20 15:20:29 +02:00
David Parks
c23c31a83b Bug 1366256: Part 3 - Broker camera CreateMutexW calls from plugin process r=jimm
The camera is blocked by the sandbox hardening in part 1.  This intercepts and remotes the call to CreateMutexW that causes the camera to fail.

--HG--
extra : rebase_source : 8431b9c5b4e2ca35590692e0c71e68900b7f75b1
2018-03-07 16:00:53 -08:00
David Parks
6037ff4619 Bug 1366256: Part 2 - Refactor EndpointHandler to make special type handling opt-in r=jimm
Previously, all FunctionBrokers used the same global set of type marshalers to handle IPC.  The marshaling behavior is endpoint-dependent so it is done with the EndpointHandler.  This patch makes the EndpointHandler used by a specific RPC function into a template parameter to the function's FunctionBroker.  It also divides up the current special type handling into two cases -- FileDlgEndpointHandler for plugin file dialog brokering, and SslEndpointHandler for SSL communication brokering.

--HG--
extra : rebase_source : 160abbc77a202b752dd41655980745e770c6b915
2018-03-13 16:38:15 -07:00
David Parks
81ae755687 Bug 1366256: Part 1 - Promote Windows plugin process sandbox to level 3 r=bobowen
Level 3 changes the plugin process access token from USER_INTERACTIVE to USER_LIMITED.

--HG--
extra : rebase_source : 0a037adf08e4f729bd9e129203f5c403cfc12f4b
2018-02-21 03:48:45 -08:00
Boris Zbarsky
1a7c5067ca Bug 1446851. Get rid of nsIDOMWheelEvent. r=qdot
We can't include WheelEventBinding.h in MouseEvents.h because that produces
this include loop:

WheelEventBinding.h -> MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> WheelEventBinding.h

MozReview-Commit-ID: 5KNwH69aJYW
2018-03-20 00:16:05 -04:00
Masayuki Nakano
1c1a60c08d Bug 1446253 - Make EventUtils.synthesizeComposition() dispatch keydown and keyup event in default r=smaug
We'll start to dispatch keydown event and keyup event even during composition.
So, for testing those events won't break our UI, we should make
EventUtils.synhtesizeComposition() and EventUtils.synthesizeCompositionChange()
dispatch keydown event and keyup event even if callers don't specify keyboard
event explicitly.

Typically, "keydown" event is marked as "processed by IME", i.e., keyCode
value is set to DOM_VK_PROCESSKEY and key is set to "Process", with our
widget which handles native IME and key input.  On the other hand, "keyup"
is NOT marked as so.

Therefore, this patch makes TextInputProcessor emulates this behavior without
any new special flags.  And for making possible to emulate special cases,
this patch adds two flags to nsITextInputProcessor.  One is
KEY_DONT_MARK_KEYDOWN_AS_PROCESSED.  The other is KEY_MARK_KEYUP_AS_PROCESSED.
Unfortunately, those flags have opposite meaning but this must be better than
making necessary to one flag for emulating usual keydown/keyup events.

Finally, this makes some tests specify better keyboard information to
synthesizeComposition() and synthesizeCompositionChange() to emulate
actual keyboard events during composition.

MozReview-Commit-ID: ItYaXILkNQE

--HG--
extra : rebase_source : e50cc77c1efbc12686d7ea334d41926c7392b30d
2018-03-16 22:35:07 +09:00
Boris Zbarsky
c5b088227c Bug 1445417 part 3. Stop using ndIDOMDragEvent in docshell and dom code. r=mystor
MozReview-Commit-ID: 21JCx8OeaR5
2018-03-16 22:25:25 -04:00
Haik Aftandilian
331dda9367 Bug 1444291 - Part 3 - Add read access to the Mac Flash sandbox, support sandbox levels r=Alex_Gaynor
Replace the boolean pref "security.sandbox.mac.flash.enabled"
with "dom.ipc.plugins.sandbox-level.flash" to support sandbox
levels and be consistent with the Windows pref name.

Adds filesystem read access to the sandbox using sandbox extensions
granted by the file dialog machinery (level 1).

Add support for level 2 which blocks read access.

Allow the sandbox to be disabled with MOZ_DISABLE_NPAPI_SANDBOX.


MozReview-Commit-ID: 4rfobEoxQpF

--HG--
extra : rebase_source : 05dc54b46063967e959bc3fced21c61e5463de48
2018-03-15 20:23:19 -07:00
Coroiu Cristina
62bb56ad86 Backed out 3 changesets (bug 1444291) for bustage at build/src/dom/plugins/ipc/PluginProcessChild.cpp
Backed out changeset 48a9c2131347 (bug 1444291)
Backed out changeset dfc31b6c9f53 (bug 1444291)
Backed out changeset 8ee3e65465ed (bug 1444291)
2018-03-16 03:07:35 +02:00
Haik Aftandilian
3aaa8d9f78 Bug 1444291 - Part 3 - Add read access to the Mac Flash sandbox, support sandbox levels r=Alex_Gaynor
Replace the boolean pref "security.sandbox.mac.flash.enabled"
with "dom.ipc.plugins.sandbox-level.flash" to support sandbox
levels and be consistent with the Windows pref name.

Adds filesystem read access to the sandbox using sandbox extensions
granted by the file dialog machinery (level 1).

Add support for level 2 which blocks read access.

Allow the sandbox to be disabled with MOZ_DISABLE_NPAPI_SANDBOX.


MozReview-Commit-ID: 4rfobEoxQpF

--HG--
extra : rebase_source : 87f2f00867c4522ae3102abbc44fd05db63c7ec7
2018-03-13 15:38:11 -07:00
David Parks
3b52a7becc Bug 1445471 - Recognize invalid HANDLEs in plugin brokering. r=jimm
When InternetOpenA, or some other brokered function that returns handles, fails, we should not return a valid HANDLE id.  We return an id of 0 instead.
2018-03-14 12:28:22 -07:00
Gijs Kruitbosch
ca508d989b Bug 1371888 - cache plugin information in pluginreg.dat to avoid sync startup load, r=florian,mossop
This changes the pluginreg.dat format to include the blocklist state.

There is now only the saved blocklist state in a plugin tag instance, rather than
looking it up from in there using the blocklist service, so it was renamed from
mCachedBlocklistState to mBlocklistState. We pass the 'right' state to the plugin
instance when the plugintag is constructed. If we don't have state, we mark it as
unblocked.

mCachedBlocklistStateChanged was never read so it's being removed.

Bug 1439519 adds a 'blocklist-loaded' notification that is fired once the blocklist is loaded.
The plugin host implementation will listen to this in the parent process and update the
blocklist state of all the plugins, and broadcast changes to the child process, just like when
we update the blocklist from the server. We now also avoid re-sending plugin content to the
content processes if the plugin state hasn't changed as a result of the blocklist having been
loaded.

Finally, because new plugins should still get an up-to-date blocklist state, and
telemetry should get up-to-date data about which plugins are and aren't enabled
once we have that data, we ensure that once we've loaded the blocklist async,
we schedule an idle task to parse it and consider it loaded.

All this means that plugin blocklist information could be mistaken between the points where
a new plugin is installed and we first run Firefox with the new plugin, and the point where
we load the blocklist. Given the trade-offs, that size of window (tiny) seems OK, also given
that there's already a much larger window in blocklist updates (which only happen once every 24h).

MozReview-Commit-ID: 1gsojRkUzTw

--HG--
extra : rebase_source : 4709916b4674ada54f8a495fd2d16fcef8c58d20
2018-02-20 16:53:48 +00:00
Makoto Kato
897ea8c314 Bug 1438955 - Remove ImmReleaseContext hook. r=masayuki
--HG--
extra : rebase_source : 78eeb24aa1b89c634cb9da089b43c01bdd390906
2018-03-07 11:01:30 +09:00
Nathan Froyd
062f6d980e Bug 1443236 - remove static init and shutdown nsRegion routines; r=kats
These routines are no-ops; let's get rid of them.
2018-03-05 14:06:50 -05:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Emilio Cobos Álvarez
0ad7abf15e Bug 1441009: Don't null-check OwnerDoc. r=smaug
Can't return null.

MozReview-Commit-ID: JzcNwmsCxIu
2018-02-26 00:31:42 +01:00
Chris Peterson
d24d25c9c2 Bug 1330529 - Part 5: Remove some Windows line endings from PluginProcessChild.cpp. r=jimm
MozReview-Commit-ID: DhNuxymQ97U

--HG--
extra : rebase_source : a44fbff88fa2512d59944b8ef9b27417199a8962
extra : histedit_source : 48145759bc8918864435730b102ab3ef7785eafc
2018-02-02 22:45:12 -08:00
Chris Peterson
4c4286f348 Bug 1330529 - Part 3: Protect DLL loads in wmain instead of waiting until PluginProcessChild::Init. r=jimm
Removing #define XRE_DONT_PROTECT_DLL_LOAD from plugin-container.cpp and xpcshell.cpp allows the #included nsWindowsWMain.cpp to protect DLL loads much earlier in the plugin process startup.

MozReview-Commit-ID: HbgyfvljvFs

--HG--
extra : rebase_source : dccdabb2e5bee4472d5aef9400a58cb0e397c112
extra : histedit_source : da248fc6fbdf96f30979f3a0396aefcf4bfcd5d9
2018-02-02 22:53:34 -08:00
Chris Peterson
f980f52b31 Bug 1330529 - Part 2: Remove unused SetDllDirectory workaround for Shockwave Player plugin. r=jimm
This code was added in bug 607832 to work around a Shockwave Player bug where it tries to load some DLLs from the current directory, but the current directory is not the one it expects. We no longer support the Shockwave Player plugin, so this workaround is no longer necessary and we can always call SetDllDirectory("") to remove the current directory from the DLL search path.

MozReview-Commit-ID: C4MjB1SkZE3

--HG--
extra : rebase_source : 6473ca88db6bee484c3c97669dca39daf31b438e
extra : histedit_source : f4abb901979b07f0aa346508773a8e65f47451cd
2018-02-02 22:34:19 -08:00
Jason Orendorff
e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Hiroyuki Ikezoe
1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Dorel Luca
f41b03eca9 Backed out changeset 38577c007450 (bug 1424371) for Marionett test failure on testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py. CLOSED TREE 2018-02-19 22:15:23 +02:00
Milan Sreckovic
7571df7e7c Bug 1424371: Use BaseRect access methods instead of member variables in dom/ r=qdot
MozReview-Commit-ID: HXWhggOMIEK

--HG--
extra : rebase_source : 9c9eacf80d2b7f78faa82a1549170b98d12cdaa8
2018-02-19 12:56:10 -05:00
Masayuki Nakano
cf83ee7bb4 Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.

MozReview-Commit-ID: De4enbjux3T

--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
2018-02-15 04:15:39 +09:00
Haik Aftandilian
c90be35636 Bug 1436566 - [Mac] Land disabled-by-default sandboxing for the Flash NPAPI plugin process. r=Alex_Gaynor,jimm
MozReview-Commit-ID: Es0GbMLKvH5

--HG--
extra : rebase_source : 991f20ac25735508d790947991f59214fb06e54f
2018-02-12 15:46:31 -08:00
David Parks
a14e9905f0 Bug 1436253 - Fix NPAPI FunctionBroker condition variable concurrency issues. r=aklotz
The Monitor's Wait call is subject to spurious waking and needed a condition guard (I just use a boolean) to detect if it should not have been awakened.  Additionally, the ok value was being assigned after the Notify, despite it no longer being valid on this thread.
2018-02-06 21:35:44 -08:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
David Parks
1dd54ad783 Bug 1433856 - Block PluginModuleChromeParent::CleanupFromTimeout from recursing. r=jimm
CleanupFromTimeout is (transitively) recursing in calls to Close(), as that now leads to shutting down the plugin broker thread and CleanupFromTimeout was being rerun since nsThread::Shutdown runs tasks..
2018-01-29 18:15:18 -08:00
David Parks
c6dc5f3406 Bug 1433855 - Make sure plugin function broker's PostToDispatchThread is Waiting before Notifying it. r=jimm
The Monitor's condition variable could be notified before the calling thread had begun to Wait for it.  This caused the Notify to be missed, leading to hangs.  By grabbing the Monitor in PostToDispatchHelper, we know Wait has been called because, otherwise, the calling thread would still hold the Monitor.
2018-01-30 17:32:27 -08:00
Boris Zbarsky
8d91b52952 Bug 1434399 part 13. Remove C++ uses of nsIDOMXULDocument. r=mystor
MozReview-Commit-ID: KSsXLra5DQk
2018-01-31 14:49:28 -05:00
Cosmin Sabou
94617f91cf Backed out 19 changesets (bug 1434399) for build bustages on nsXULPopupManager.cpp on a CLOSED TREE
Backed out changeset 499f6dffd9cb (bug 1434399)
Backed out changeset 018290612415 (bug 1434399)
Backed out changeset f4c3179f8e59 (bug 1434399)
Backed out changeset f3ce2826b857 (bug 1434399)
Backed out changeset 6d2391af01dd (bug 1434399)
Backed out changeset dc98ed8c609a (bug 1434399)
Backed out changeset 8eaa395d6200 (bug 1434399)
Backed out changeset 19b18f4a53be (bug 1434399)
Backed out changeset 8ff378a6e96a (bug 1434399)
Backed out changeset 60fe73be1a26 (bug 1434399)
Backed out changeset faefb2751fdc (bug 1434399)
Backed out changeset 55cdf8b3a959 (bug 1434399)
Backed out changeset b578cc8efb92 (bug 1434399)
Backed out changeset 54cc4cb2fca1 (bug 1434399)
Backed out changeset f5343ef34d6c (bug 1434399)
Backed out changeset 8fb30e066cbd (bug 1434399)
Backed out changeset 21341b656b0f (bug 1434399)
Backed out changeset fab1f8b087a2 (bug 1434399)
Backed out changeset 55250a54852a (bug 1434399)
2018-01-31 22:45:26 +02:00
Boris Zbarsky
467ed0721d Bug 1434399 part 13. Remove C++ uses of nsIDOMXULDocument. r=mystor
MozReview-Commit-ID: KSsXLra5DQk
2018-01-31 14:49:28 -05:00
David Parks
271000d784 Bug 1429643: Limit Win32 NPAPI SSL brokering to 64-bit builds; r=jimm
Uses PluginQuirks to avoid brokering in 32-bit, as Flash has its own 32-bit sandbox.
2018-01-15 19:51:34 -08:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Masatoshi Kimura
d46d67a41d Bug 685236 - Stop using GetNativePath in nsPluginDirWin.cpp. r=jimm
MozReview-Commit-ID: 2eFSKhCEk48

--HG--
extra : source : eb4f7d7b7bce49e295fc37ab000b3c542ee2a15c
extra : intermediate-source : d175a56b5aaaa54002212f6b73cbd3a49bad7619
2017-12-16 00:22:58 +09:00
David Parks
c0258f303a Bug 1382251: Part 11 - Update moz.build with new files; r=jimm
Includes the build changes made by the earlier patches in this series.  Also adds some #includes required by other files when these are added to the unified build.
2017-11-06 10:47:01 -08:00
David Parks
8b000b81a9 Bug 1382251: Part 9 - Hook functions needed for SSL communication in NPAPI process; r=jimm
Adds Win32 networking APIs to the function broker so that we can run SSL communications outside of the sandbox.
2017-11-06 10:41:21 -08:00
David Parks
cc15f3d517 Bug 1382251: Part 8 - Migrate some previously hooked functions to FunctionHook/Broker; r=jimm,froydnj
Moves GetWindowInfo, GetKeyState, SetCursorPos, GetSaveFileNameW and GetOpenFileNameW to the new FunctionHook and FunctionBroker systems.
2017-11-06 11:07:16 -08:00
David Parks
9a40a70447 Bug 1382251: Part 7 - Add mechanism for automatically brokering DLL functions; r=jimm
The FunctionBroker is a special kind of FunctionHook that brokers the hooked function on another process.  In the child process, it uses the FunctionBrokerChild to request that the FunctionBrokerParent run a function and return the response.  It handles most cases of parameter, return value and error marshaling on its own.  It also guarantees that requests are issued from the proper thread.
2017-11-06 10:34:47 -08:00
David Parks
93bbbac8e4 Bug 1382251: Part 6 - Start/stop new top-level brokering actors on their own threads; r=jld
The FunctionBroker actors allow the NPAPI process (child) to run methods on the main process (parent).  Both the parent and the child run dedicated threads for this task -- this is a top-level protocol.
2017-11-06 10:29:15 -08:00
David Parks
c28f7ffcb4 Bug 1382251: Part 5 - Add IpdlTuple for type-safely marshaling tuples; r=jld
IpdlTuple is an array of Variants that is accessed by type and that reports an error if there is a type error.  This is used for safe and easy communication of IPDL objects, validated at run time since IPC data is untrusted.
2017-11-06 10:17:15 -08:00
David Parks
8f6ea1789c Bug 1382251: Part 4 - Init/Shutdown parts of XPCOM needed in plugin process; r=erahm
We have not been initializing or shutting down XPCOM in the plugin process.  We need the nsThreadManager for this bug but, more importantly, we need to properly shut down XPCOM in order to get things like handlers connected to the ShutdownPhases (e.g. ClearOnShutdown, used to free resources at process end).

This patch includes some work to make services that are uninitialized in the plugin process to handle Shutdown calls without failing.
2017-11-06 10:10:43 -08:00
David Parks
bec525edde Bug 1382251: Part 3 - Add mechanism for automatically hooking DLL functions; r=jimm
FunctionHook uses the DLL interceptor to redirect Win32 calls to a user-supplied function.
2017-11-06 10:04:19 -08:00
Andrea Marchesini
c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Kris Maglione
aec63e140c Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9

--HG--
extra : histedit_source : df68d7595925c07d9d6e8bacc2c46e69556f479a%2C72b768b9825e20ede6603ead75f871c50dc041f7
2018-01-24 22:04:59 -08:00
Kris Maglione
30b3a49bfd Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP

--HG--
extra : rebase_source : 12b5f8c3e125111db7382eb3d7d20a99fb2c35b3
extra : absorb_source : e99fa7f6eee02e7e6cadeb898c7fcf6dac9c902a
extra : histedit_source : d0dfc31fadc2b81d341c9d0cd1efec02923c003b
2018-01-24 15:48:47 -08:00
David Parks
154fa0eb0a Bug 1430586 - Make sure the NPObjectData map still exists before use. r=jimm
The shutdown path has a way to free the sObjectMap before all plugin references to it have been executed.  It does this by scheduling a DeferNPObjectReleaseRunnable, then shutting down the plugin with PluginInstanceChild::Destroy.  This patch keeps the runnable from failing in that case.
2018-01-23 12:56:06 -08:00
Brindusan Cristian
368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Sylvestre Ledru
0039663a81 Bug 1431072 - Move a duplicate declarations (NS_NPAPIPLUGIN_CALLBACK) into a common file r=jimm
MozReview-Commit-ID: HZsNoNUOtnO

--HG--
extra : rebase_source : 21ccd11ee98faa43f3bc95f4f78ea56ab319eca6
2018-01-17 14:32:56 +01:00
Sylvestre Ledru
a4b8b15778 Bug 1431030 - Ignore the automatic formatting of the NS_NPAPIPLUGIN_CALLBACK definitions r=jimm
MozReview-Commit-ID: 2oTHhb2VBWX

--HG--
extra : rebase_source : c49f8b2bdbd459c459d257c27a6fbf8588bcd130
2018-01-17 11:02:35 +01:00
Dorel Luca
5436902556 Backed out changeset 2fdccaab2e7c (bug 1431030) for build bustages on a CLOSED TREE
--HG--
extra : amend_source : 4b243382b2a63958021222c739db5e1ae2739b88
2018-01-18 12:35:53 +02:00
Sylvestre Ledru
ecb3dafe1e Bug 1431030 - Ignore the automatic formatting of the NS_NPAPIPLUGIN_CALLBACK definitions r=jimm
MozReview-Commit-ID: 2oTHhb2VBWX

--HG--
extra : rebase_source : 79819bd1e4fd7d8b94f5ccf056749e3ac6f63925
2018-01-17 11:02:35 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Kris Maglione
a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
Jon Coppeard
c7d4570648 Bug 1428515 - Check for dying JSObjects when accessing plugin wrapper table r=bz
The sNPObjWrappers table can contain entries for dead JSObjects that have not yet been finalised.  We need to take care not to trigger mJSObj's read barrier for such entries since that will attempt to expose the object to JS and cause this assertion.

The patch does this by calling unbarrieredGetPtr() which avoids the barrier.

Note converting a TenuredHeap to bool and testing equality against a pointer don't trigger the barrier.
2018-01-12 10:36:23 +00:00
Sylvestre Ledru
424664ff30 Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman
MozReview-Commit-ID: 3v8D600g8St

--HG--
extra : rebase_source : 34ea6f9868c1b322076c24daa75dc33e27b6704e
2018-01-10 08:52:04 +01:00
Sylvestre Ledru
4b189b7baf Bug 1278282 - Update of the tests to reflect the removal of the gtk2 r=lsalzman
MozReview-Commit-ID: Htgc44dCEjX

--HG--
extra : rebase_source : 55ce6a6a72c36cbfdbeef08fe58d11f2053dc35f
2018-01-10 08:55:38 +01:00
Sylvestre Ledru
f8b1d9ab46 Bug 1278282 - update of the moz.build files to remove gtk2 references r=lsalzman
MozReview-Commit-ID: FO1wEHzOkuN

--HG--
extra : rebase_source : ac7e61cf47d013de882048740c889735a0a7cad8
2018-01-10 10:04:59 +01:00
Olli Pettay
3d4ddd17a3 backout Bug 1414204 because of regressions, r=backout
--HG--
extra : rebase_source : 2086705dc590ba844900ea9f28e514128bdcf60c
2018-01-03 18:42:13 +02:00
Kartikaya Gupta
764fec3892 Bug 1426200 - Disable crashtests failing on windows QR builds. r=jrmuizel
MozReview-Commit-ID: AFZFoq1P3dI

--HG--
extra : rebase_source : dbd2cf616e856bbbd3827eb6ce39e41842159b57
2017-12-21 14:13:32 -05:00
Florian Quèze
032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Brindusan Cristian
68f2d0d8de Merge mozilla-central to autoland r=merge a=merge on a CLOSED TREE 2017-12-20 23:46:31 +02:00
Andrew McCreight
b01441d8e5 Bug 1426284 - Remove TransportDIB files. r=jld
PluginMessageUtils.h was bootlegging base/shared_memory.h via transport_dib.h

MozReview-Commit-ID: CPGxu2lpdj0

--HG--
extra : rebase_source : 796c747a4a125dddc2a0685f1e0d0152ac3ef74f
2017-12-19 12:40:41 -08:00
Petr Sumbera
3055fec73b Bug 1423174 - Rename CS to avoid macro conflict on Solaris. r=jgilbert
--HG--
extra : rebase_source : 22d7a56e7e18376f2bf0899a5cb358c6260d9835
2017-12-05 04:10:29 -08:00
Stone Shih
ff844cca1d Bug 1414204 Part4: Check headless mode before calling GDK_ROOT_WINDOW. f=bdahl. r=jimm. 2017-12-06 16:54:44 +08:00
Andreas Farre
2e47990680 Bug 1410096 - Make unified build work. r=smaug 2017-12-15 21:17:32 +01:00
Stephen A Pohl
5b3cbf1d2f Bug 1419004: Fix crash when setting plugin process names on macOS 10.13.2. r=mstange 2017-12-12 17:03:33 -06:00
Stephen A Pohl
957e2ba425 Backout e66e48637c65 (bug 1419004) for compile error. r=me 2017-12-12 16:57:35 -06:00
Stephen A Pohl
e92fbe9b5c Bug 1419004: Fix crash when setting plugin process names on macOS 10.13.2. r=mstange 2017-12-12 16:38:19 -06:00
Sylvestre Ledru
5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Julian Hector
4dfbc18a1c Bug 1401107 - Use ContiguousEnumSerializer for ParamTraits in npapi; r=jimm 2017-12-04 10:12:50 -05:00
Mark Banner
099e4fa549 Bug 1421458 - Add more initial configuration setup and prepare .eslintignore for enabling ESLint on more xpcshell-test directories. r=mossop
MozReview-Commit-ID: 4nbTuNNnAdZ

--HG--
extra : rebase_source : 7131f0ddad79d28615a5799c657972bd84a69180
2017-11-28 22:57:08 +00:00
Bob Owen
af20a22dd8 Bug 1420922: Remove orphaned TARGET_SANDBOX_EXPORTS defines. r=dmajor 2017-11-27 16:07:15 +00:00
Gabriele Svelto
0750d2d41a Bug 1402519 - Remove MOZ_CRASHREPORTER directives from dom; r=peterv
MozReview-Commit-ID: 4G2C9y6csvc

--HG--
extra : rebase_source : f0259c59c263b677a3a44751219dcb54378d72bc
2017-10-10 12:43:09 +02:00
Kartikaya Gupta
22471e0b18 Bug 1419868 - Fix some inconsistent naming r=mystor
The property in question is the offset from the content process to the
chrome process, but it gets called various things for historical
reasons. Let's be consistent and just call it the chrome offset
everywhere.

Also, in some places this was needlessly getting turned into a
nsIntPoint via ToUnknownPoint(), only to be turned back into a
LayoutDeviceIntPoint at all the use sites. So this patch also updates
some function signatures to avoid the needless conversion.

No functional changes.

MozReview-Commit-ID: AuhEUfa64Uj

--HG--
extra : rebase_source : 20e1895fefd944f98307a8437f977252ee2c3185
2017-11-22 14:21:37 -05:00
Jan de Mooij
7f30bf48a7 Bug 1417844 part 2 - Remove JSVersion from CompileOptions, CompartmentBehaviors, scripts. r=evilpie 2017-11-17 12:12:39 +01:00
Boris Zbarsky
87c6b14c1a Bug 1415677 part 6. Remove nsIDOMHTMLCollection. r=qdot
MozReview-Commit-ID: E8P9o0bv63L
2017-11-13 10:41:33 -05:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -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
David Parks
888261f789 Bug 1411631 - Use ContiguousEnumSerializerInclusive for GetOpenFileName IPC. r=jimm
Use the new helper for serializing enums in IPDL.
2017-11-01 01:59:31 -07:00
Marco Castelluccio
59f513cbed Bug 1413845 - Remove PluginPRLibrary as it is unused. r=jimm
--HG--
extra : rebase_source : 0eae0844e68ec1f1227c327903369d3ededa4058
2017-11-02 11:03:24 +01:00
sotaro
1d2a51a40b Bug 1408490 - Re-enable dom/plugins/test/mochitest/test_bug1092842.html r=jmaher 2017-11-02 21:31:48 +09:00
Joel Maher
b1044d6d3d Bug 1408490 - Disable dom/plugins/test/mochitest/test_bug1092842.html on windows debug for frequent failures. r=me, a=testonly 2017-10-31 08:46:57 -04: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