Commit Graph

3578 Commits

Author SHA1 Message Date
Kris Maglione
031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Kris Maglione
02ba563399 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : source : 0d69b4fb1ed43751cfcbc0b4f2fe3b6a49bc0494
extra : histedit_source : d0ce31513ffaae2fd7f01f6567a97b6d2d96b797%2Cfff837de7a00fa90809d2c3e755097180dfd56d8
2018-05-20 18:10:16 -07:00
Narcis Beleuzu
561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione
cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Kris Maglione
636f1839e5 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : rebase_source : 36565ef5e74360aad14062005e5bdab2939e888b
2018-05-20 18:10:16 -07:00
Jan de Mooij
80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Boris Zbarsky
1312fcd10f Bug 1476145 part 5. Stop using getInterface(nsIDOMWindowUtils) in DOM code. r=mccr8 2018-07-24 19:47:41 -04:00
Jan de Mooij
09db278bed Bug 1477705 - Stop using js::GetGlobalForObjectCrossCompartment in NPAPI code. r=bz
The object could be a CCW here and we want to make it impossible to get a CCW's global. The first call here is equivalent to checking JS_IsGlobalObject and for the second one JS::CurrentGlobalOrNull(cx) preserves behavior because we wrapped the object into the current compartment.
2018-07-24 10:00:50 +02:00
Kris Maglione
7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian
91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione
dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Brian Hackett
925f656fd2 Bug 1207696 Part 5e - Don't assume that CFBundleGetFunctionPointerForName succeeds, r=benwa.
--HG--
extra : rebase_source : 4d2cf2227c51379bb8a70724f92ef8be81b302cf
2018-07-20 23:55:02 +00:00
Haik Aftandilian
946187d684 Bug 1475722 - Mac Flash sandbox causes empty file upload dialogs on OS X 10.9, 10.10 r=Alex_Gaynor
On 10.9 and 10.10, grant global read access to the Flash sandbox.

Change Flash sandbox levels by adding a new level 1 that includes
global read access which will be the default on 10.9/10.10.
Level 2 is the new default for 10.11 and above with file read
access enabled by file dialog activity.

MozReview-Commit-ID: LvXhd6Vf7mo

--HG--
extra : rebase_source : 946f89937e5bb4506fd6bc8b2c050c86a8b29cc8
2018-07-17 17:30:44 -07:00
Andrea Marchesini
a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Kris Maglione
0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
David Parks
90d1dba800 Bug 1445444: Properly initialize plugin window drawing type on Windows r=jimm
Sets the default plugin window type to windowed on Windows.  Most of the time, plugins use async drawing so this will be overwritten but it should be properly initialized for cases where we do not switch to async.
2018-06-25 13:16:44 -07:00
Valentin Gosu
cac3417291 Bug 1412081 - Call KillClearOnShutdown(ShutdownPhase::ShutdownFinal) in PluginProcessChild on all platforms r=jimm
This call gated by ifdef OS_WIN - so on Linux it would leak objects that were supposed to be ClearOnShutdown in the plugin process

--HG--
extra : rebase_source : 24c4233ec8735e0176d584b623ad626d0a9b5c3b
2018-07-05 17:20:58 +02:00
Masayuki Nakano
55339d6e3b Bug 1473705 - Make nsPluginInstanceOwner listen to keypress event also in the system event group r=smaug
nsPluginInstanceOwner currently listens to keypress event only in the
default event group.  However, in strict keypress event dispatching mode,
keypress events are not fired in the default event group if the key combination
is not printable.  So, nsPluginInstanceOwner should listen to keypress event
also in the system event group and should handle each keypress event only once.
I.e., if printable keypress event is received in the system event group,
it should be ignored since it should've already been handled in the default
event group.

MozReview-Commit-ID: LWTPpz2W5mz

--HG--
extra : rebase_source : d7cd3d2b8312a1dd6e838c1b862eabe1e11e8a2f
2018-07-06 17:20:43 +09:00
Kris Maglione
8e4b8a954f Bug 1472523: Part 1 - Avoid string copies in preference callbacks. r=njn
Most preference callbacks use literal strings for their domain filters, which
means that there's no need to make copies of them at all. Currently, however,
every preference observer node makes a separate heap-allocated copy of its
domain string.

This patch switches the domain string storage to nsCString instances, which
dramatically reduces the amount of unnecessary copies, at the expense of
making the callback nodes slightly larger.

MozReview-Commit-ID: 8NA3t2JS2UI

--HG--
extra : rebase_source : 628ad9af65cec16fb8be0c8dddc608b5ee5602e2
2018-06-30 23:06:17 -07:00
Aaron Klotz
23646bdf45 Bug 1460022: Part 7 - Update plugin code to work with revised DLL interceptor interface; r=handyman 2018-06-27 11:50:50 -06:00
shindli
dd50d1646e Backed out 13 changesets (bug 1460022) for bustages in :/build/build/src/mozglue/tests/interceptor/TestDllInterceptor.cpp(113) on a CLOSED TREE
Backed out changeset b798c3689bbf (bug 1460022)
Backed out changeset c3b3b854affd (bug 1460022)
Backed out changeset ecb1b6fd3134 (bug 1460022)
Backed out changeset 91fed649dd5a (bug 1460022)
Backed out changeset be7032cddad2 (bug 1460022)
Backed out changeset d4a036b976e6 (bug 1460022)
Backed out changeset 5f3dfde41e38 (bug 1460022)
Backed out changeset a16486a6f685 (bug 1460022)
Backed out changeset 69eacc5c3ab8 (bug 1460022)
Backed out changeset 34aa7c29b31e (bug 1460022)
Backed out changeset 00b20c0a7637 (bug 1460022)
Backed out changeset b8e8aea4a01f (bug 1460022)
Backed out changeset 15822d9848d8 (bug 1460022)
2018-07-04 03:37:11 +03:00
Aaron Klotz
0f899ac198 Bug 1460022: Part 7 - Update plugin code to work with revised DLL interceptor interface; r=handyman 2018-06-27 11:50:50 -06:00
shindli
dcc88f33f9 Backed out 13 changesets (bug 1460022) for bustages in builds/worker/workspace/build/src/dom/plugins/ipc/FunctionHook.h💯24 on a CLOSED TREE
Backed out changeset 0734142a3f35 (bug 1460022)
Backed out changeset 18fbfa7ca685 (bug 1460022)
Backed out changeset 2df129bd5692 (bug 1460022)
Backed out changeset 02a7ed68933f (bug 1460022)
Backed out changeset 221137d1c2de (bug 1460022)
Backed out changeset 9cb0b7a15402 (bug 1460022)
Backed out changeset 18f8f85c0307 (bug 1460022)
Backed out changeset 867a1351efff (bug 1460022)
Backed out changeset 933e0b698f8e (bug 1460022)
Backed out changeset 09da660071e1 (bug 1460022)
Backed out changeset 8bb5142d3f53 (bug 1460022)
Backed out changeset 0ddf581bdaac (bug 1460022)
Backed out changeset 1cd5f9b4a6af (bug 1460022)
2018-07-04 02:49:24 +03:00
Aaron Klotz
cc80cb14e0 Bug 1460022: Part 7 - Update plugin code to work with revised DLL interceptor interface; r=handyman
--HG--
extra : rebase_source : 277e237e80b513b055b55ef7fb5cace7f240ea95
2018-06-27 11:50:50 -06:00
David Parks
6a029ee77d Bug 1449388 - Send NPNVaudioDeviceStateChanged to plugins when any Windows audio device changes state. r=jimm
This message allows plugins to detect when any audio devices change state, even when running inside of our plugin sandbox.
2018-06-13 13:12:54 -07:00
Olli Pettay
d14590cada Bug 1472647 - nsPluginInstanceOwner::GetURL should use GetComposedDoc, r=mrbkap 2018-07-03 18:07:22 +03:00
Masayuki Nakano
09e0a5196b Bug 1469875 - Make nsPluginInstanceOwner::RequestCommitOrCancel() call IMEStateManager::NotifyIME() rather than calling nsIWidget::NotifyIME() r=m_kato
Any content code except TextComposition shouldn't call nsIWidget::NotifyIM()
since IMEStateManager and TextComposition manage state of the composition.
Therefore, we need to make nsPluginInstanceOwner::RequestCommitOrCancel()
call IMEStateManager::NotifyIME() instead.

Additionally, this method should ignore the request if composition has
already been gone.  This patch makes check whether there is a TextComposition
instance for the widget and the composition is handled in the plugin owner
element.

MozReview-Commit-ID: 5cx5X2hGfek

--HG--
extra : rebase_source : 3ff55f877a47ffa74b82af827f1500432b8c272b
2018-06-29 17:32:09 +09:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
e813956be3 Bug 1470930: Fix a typo in OSX-only code. r=me CLOSED TREE
MozReview-Commit-ID: BMRQgc1KFsC
2018-06-26 18:59:18 +02:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Gabriele Svelto
352bb646aa Bug 1469603 - Use a recursive lock in crash reporter callbacks that might be called synchronously; r=erahm 2018-06-21 09:56:26 +02:00
Doug Thayer
10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
shindli
9910034e6c Backed out changeset f966dedaa07c (bug 1469603) for B bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/plugins/PluginModuleParent.h:324: on a CLOSED TREE 2018-06-21 10:34:44 +03:00
Gabriele Svelto
522f71d7ca Bug 1469603 - Use a recursive lock in crash reporter callbacks that might be called synchronously r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D1724
2018-06-20 20:49:35 +00:00
Chris Peterson
634a84b050 Bug 1467452 - Back out f5f49315fec2 to restore getJavaEnv/getJavaPeer NPAPIs to fix Flash crash. r=jimm
Flash still calls these NPAPIs to initialize some ancient LiveConnect code.

--HG--
extra : rebase_source : 74a6a89e52595aa871d508bf13485b2ba7d404e8
2018-06-20 12:42:39 -07:00
Andi-Bogdan Postelnicu
16e7cff712 Bug 1453795 - Dom/Plugins - Initialize member fields in classes/ structures. r=jmathies 2018-06-14 08:38:21 +03:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Karl Tomlinson
9e0c1c7c2b bug 1442776 make CycleCollectedJSContext accessible from JSContext private r=peterv
Inheriting PerThreadAtomCache on CycleCollectedJSContext permits use of
static_cast, avoiding one level of indirection compared to adding a
CycleCollectedJSContext* to PerThreadAtomCache.

PerThreadAtomCache is over 18kB, and so WorkerJSContext and WorkletJSContext
are moved from the stack to the heap.

MozReview-Commit-ID: 6jdJeZcviK4

--HG--
extra : rebase_source : 3c2accb71faf3f017a44c405ae0484e57aaf039c
2018-05-10 17:04:12 +12:00
David Parks
87ea513dd2 Bug 1462979 - Broker HttpEndRequestA for plugin process. r=jimm
Some file uploads fail (terminate early) without this function.  Its omission from the original system was unintentional.
2018-05-29 12:27:23 -07:00
David Parks
518c9a0dc2 Bug 1462979 - Fix printf formatting in FunctionHook logging. r=jimm
Use %ls instead of %S, which is now checked by an assertion.
2018-05-29 10:49:24 -07:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
David Parks
24e1111be1 Bug 1459335 - Distinguish between unregistered and failed DLL function interceptions. r=aklotz
Each failed attempt to intercept functions in a DLL wastes valuable memory so we remember failures in order to avoid repeating them.
2018-05-23 16:36:45 -07:00
Makoto Kato
a10c2a1a82 Bug 1464061 - Return error immediately when plugin frame is destroyed. r=masayuki
--HG--
extra : amend_source : 16eac65e39fbebffabb71cc38cc39d46edb8315e
2018-05-25 10:20:00 -04:00
Andrea Marchesini
7dcc1b6880 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
Narcis Beleuzu
3fae2ab3f2 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-22 14:24:39 +03:00
Narcis Beleuzu
7bfb685bb2 Merge inbound to mozilla-central. a=merge 2018-05-22 12:49:47 +03:00
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
David Parks
1bfa456486 Bug 1366256 - Part 4: Add plugin DLL to plugin sandbox exceptions list. r=bobowen
This permits opening the DLL from the plugin sandbox under the USER_LIMITED sandbox setting (plugin sandbox level 3).

--HG--
extra : rebase_source : cf3719f7b418b3fcbb5244d06203836fd32e3900
extra : histedit_source : 9bacced088b9965cee10c871f3934980e0361dcc
2018-05-03 16:40:19 -07:00
Doug Thayer
02388061cd Bug 1176019 - Fix browser_tabswitchbetweenplugins.js r=mconley
After digging into this, I'm still not entirely sure why the timing
has changed such that the checks don't work immediately. I have a
strong suspicion though that it's simply because our tab switch is
now instant, resulting in the necessary messages just being a
little bit behind. Hopefully this is an acceptable bandaid.

MozReview-Commit-ID: H1wKW1UQBxp

--HG--
extra : rebase_source : 993c3e97852894ddd64561d039fbf0e71d607066
2018-05-08 15:26:15 -07:00