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

3721 Коммитов

Автор SHA1 Сообщение Дата
Brendan Dahl 856ed80bda Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug
Move the implementation of the XBL tooltip to C++ so the element can safely
be created during native anonymous content creation. The 'mouseover' and
'mouseout' event handlers were not moved as they appear to be legacy code
that is no longer needed.

A number of tests started perma-failing after this patch. Most failures
were caused by a timing change where plugins sometimes load after the
document "load" event. Many of the failures had intermittents associated
with them and the tests were not waiting for plugins to load before
starting. The test "test_weakmap_keys_preserved2.xul" had a bug where it
was possible for it to finish before all the tests were run.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 20:42:19 +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
Jonathan Kingston 71dcfa26fc Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 310e601c80a7d6c76b1ee986a7bfb98786150870
extra : intermediate-source : 43b6b33227f000090d6fb8fc20979a54c814918b
2018-08-29 15:47:29 +01:00
Brindusan Cristian 1db0587c0e Backed out 10 changesets (bug 1485305) for browser-chrome failures on docshell/test/browser/browser_loadURI.js. CLOSED TREE
Backed out changeset 50439ec01661 (bug 1485305)
Backed out changeset a05e40ef7215 (bug 1485305)
Backed out changeset c99b97b4348b (bug 1485305)
Backed out changeset 75220b2f6669 (bug 1485305)
Backed out changeset e698f2fc1c1a (bug 1485305)
Backed out changeset acce14683c13 (bug 1485305)
Backed out changeset 323773a395cc (bug 1485305)
Backed out changeset 1b74152cabc1 (bug 1485305)
Backed out changeset 4b5c9d5929fc (bug 1485305)
Backed out changeset 238d92348159 (bug 1485305)
2018-09-19 18:47:27 +03:00
Jonathan Kingston b4e3ef054c Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 546a2e9c719c4162e26ea216148ac0a3ca2ef9ac
2018-08-29 15:47:29 +01:00
Ted Mielczarek de99592416 Bug 1399870 - make DEFFILE a Path instead of a string; r=gps
All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to
get a srcdir-relative path anyway, and the other one wants an
objdir-relative path, so using Path makes everything clearer.

This makes it more straightforward to translate the paths for the WSL
build.
2018-09-18 15:50:19 -04:00
arthur.iakab d2e647e133 Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js
Backed out changeset 138b8596a9cd (bug 1485305)
Backed out changeset d9f04aeeeef7 (bug 1485305)
Backed out changeset cd063d8afe4e (bug 1485305)
Backed out changeset 2f8a5a03ccb5 (bug 1485305)
Backed out changeset 8085d1eefd7c (bug 1485305)
Backed out changeset 3aaccb374a59 (bug 1485305)
Backed out changeset 3a111e9e5c9c (bug 1485305)
Backed out changeset 61aa1cfb0b01 (bug 1485305)
Backed out changeset bca973d90acc (bug 1485305)
Backed out changeset 4eb33bf25d6f (bug 1485305)
2018-09-18 20:30:07 +03:00
Jonathan Kingston 1008c25689 Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 68ea8072f3c7967ede482e9a087a588a0008df35
2018-08-29 15:47:29 +01: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
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
Mike Hommey 117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Daniel Varga 001e1c7fce Merge mozilla-central to autoland 2018-09-08 01:11:28 +03:00
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Ehsan Akhgari 3c5c9fc06f Bug 1489362 - Part 1: Remove the XPCOM registration for AudioChannelAgent; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5226
2018-09-07 12:05:40 -04:00
Ehsan Akhgari 6bbaf2cf8c Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 16:39:35 -04:00
Kartikaya Gupta 468c824b12 Bug 1438446 - Use the nsTArray copy constructor for the non-memmovable IpdlTupleElement on Windows. r=jld 2018-10-03 16:34:05 -04:00
shindli 2a86142e74 Backed out changeset d4ae1994c20c (bug 1489147) for bustages in JSDebugger.cpp on a CLOSED TREE 2018-09-06 22:12:44 +03:00
Ehsan Akhgari bb7fcd9d69 Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
Nicholas Nethercote ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Marco Castelluccio aac81fa3f1 Bug 1486528 - Remove some unnecessary nsIMemory imports. r=njn
--HG--
extra : rebase_source : 5abdbcd1efa23cb05cb1f1dc995c3d532d240de9
2018-08-27 16:38:18 +02:00
Kris Maglione 3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Ehsan Akhgari a07f6c3866 Bug 1484848 - Remove the XPCOM component registrations for window and child window; r=mstange 2018-08-21 16:20:28 -04:00
Brian Hackett f4be588d5b Bug 1483240 - Disable plugins in recording/replaying processes, r=jimm.
--HG--
extra : rebase_source : 342a8a0b55affc43858e9cba231888af4411892e
2018-08-21 00:56:47 +00:00
Nicholas Nethercote d6f4bef529 Bug 1484605 - Tweak some lookupForAdd() uses. r=luke
These are cases where the existing code is a little dubious or sub-optimal.

--HG--
extra : rebase_source : 2fcb4657afc7c7d24ae88b85d08df57ae04db38c
2018-08-21 11:53:47 +10:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Ting-Yu Lin 48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
Nicholas Nethercote b9e071e2e8 Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.

Pros:

- No need for init() calls and subsequent checks.

- No memory allocated for empty tables, which are not that uncommon.

Cons:

- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
  because the existing checkOverloaded() can handle it.

Specifics:

- Construction now can take a length parameter.

- init() is removed. Explicit length-setting, when necessary, now occurs in the
  constructors.

- initialized() is removed.

- capacity() now returns zero when the entry storage is absent.

- lookupForAdd() is no longer `const`, because it can instantiate the storage,
  which requires modifications.

- lookupForAdd() can now return an invalid AddPtr in two cases:

  - old: hashing failure (due to OOM in the hasher)

  - new: OOM while instantiating entry storage

  The existing failure handling paths for the old case work for the new case.

- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
  and reserve(). The old compactIfUnderloaded() is also removed.

- Capacity computation code is now in its own functions, bestCapacity() and
  hashShift(). setTableSizeLog2() is removed.

- uint32_t is used throughout for capacities, instead of size_t, for
  consistency with other similar values.

- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
  handle !mTable.

Measurements:

- Total source code size is reduced by over 900 lines. Also, lots of existing
  lines got shorter (i.e. two checks were reduced to one).

- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
  are compensated for by the lack of init() calls.

- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
  increased from 2.84 billion to 2.89 billion but any execution time change was
  well below noise.
2018-08-10 18:00:29 +10:00
Nicholas Nethercote cbac1e147a Bug 1481998 - Change sJSObjWrappers initialization. r=luke
GCHashMap will shortly lose its initialized() function, so we need another way
to indicate whether this table has been created. This patch changes it to use a
pointer instead.

--HG--
extra : rebase_source : 05ce9f2938d1fc8373cbac77c0b3bd62633f93d8
2018-08-09 14:15:42 +10:00
Margareta Eliza Balazs f617807241 Merge inbound to mozilla-central. a=merge 2018-08-10 12:17:09 +03:00
L. David Baron 1e88f0f003 Bug 1369941: Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. r=dholbert
This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

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

--HG--
extra : moz-landing-system : lando
2018-08-09 20:10:21 +00:00
Mike Hommey 6d197a0707 Bug 1481719 - Disable profile-instr-out-of-date warnings explicitly rather than allowing all warnings where they appear. r=dmajor 2018-08-09 06:07:33 +09:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Jan de Mooij ef4718f482 Bug 1480678 part 3 - Store a global in nsJSObjWrapper and use it for realm entering. r=bz
nsJSObjWrapper::mJSObj can be a cross-compartment wrapper, so we can't use it with JSAutoRealm. Store a (same-compartment) global and use that instead.
2018-08-04 15:30:40 +02:00
Noemi Erli 23c8a3a9f3 Backed out changeset 1e9ecba54e7b (bug 1348273) for failing on widget/tests/test_bug1123480.xul 2018-08-04 12:39:40 +03:00
Gabriele Svelto 50ba13cce4 Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : b4f0d4bf83c64851028c271d3fab3ebcb6fbcd3e
2018-07-05 15:42:11 +02:00
Coroiu Cristina 1ba19a32ac Backed out changeset 86471a18672f (bug 1348273) for ESlint failure at toolkit/modules/WebNavigationChild.jsm
--HG--
extra : rebase_source : e0c94f49ddc1f1b119b72c06fccc1b4363b9d340
2018-08-03 22:48:51 +03:00
Gabriele Svelto eff24befbd Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : f0e8d229581ac5c0daa0e0454cb258746108e28d
2018-07-05 15:42:11 +02:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Jan de Mooij e0ef865217 Bug 1479363 part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in remaining dom/ directories. r=mccr8 2018-08-02 08:49:00 +02:00
Nicholas Nethercote d0da0b5842 Bug 1478879 - Remove Range/Enum use in dom/. r=mccr8
--HG--
extra : rebase_source : 422301183e7855a0a994c77ee1e4a4aed72fd9c5
2018-07-31 10:31:00 +10:00
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
Doug Thayer 330201234e Bug 1176019 - Fix browser_bug1196539.js painting check r=mconley
MozReview-Commit-ID: HgzcSIdIh1h

--HG--
extra : rebase_source : f564e9b3bf94aed234906ff6364b64f3dbe8f9d2
2018-05-08 09:49:24 -07:00
Jim Mathies 5bb082d6a1 Bug 1460007 - Only call PluginInstanceChild's HookSetWindowLongPtr once. r=aklotz 2018-05-16 13:29:43 -05:00
Jim Mathies ba6f25a6f4 Bug 1460006 - Only call PluginInstanceChild's InitPopupMenuHook once. r=aklotz 2018-05-16 13:23:43 -05:00
Makoto Kato fb3fb140eb Bug 1456294 - Hook ImmAssociateContextEx. r=masayuki 2018-05-17 14:47:55 +09:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
David Parks 64235097b2 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 : 9b1be5c95fda29ce7fe70287b7bb3e66d9562ebe
extra : histedit_source : 5b4d3c17eebb905c1f694489acb7b564ee98c875
2018-03-07 16:00:53 -08:00
David Parks ae240a1586 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 : 37e34564bd9dbb0ad8594d4803e7478ca0824b72
extra : histedit_source : 0b54e7b297495a93564090f2671ce76b5e926085
2018-03-13 16:38:15 -07:00
David Parks e75bd24c78 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 : 0a19d18fe903c16979cdc88ad73ed878e2c2d570
extra : histedit_source : 9e4ee6dd168de801e4cba90a32141e1a154c81f1
2018-02-21 03:48:45 -08:00
Chris Peterson d64b13a882 Bug 1461243 - Part 6: Stub out obsolete NPAPI APIs _getJavaEnv and _getJavaPeer. r=jimm
MozReview-Commit-ID: JkroiRAqzqg

--HG--
extra : rebase_source : 52cc13aec25d9dd5bc958347fc69b480c9b1d553
extra : intermediate-source : 53f9104261ba0b492d066fbdc3c106bfc216ede9
extra : source : 2ac3387ef82e725ea5200cb814ee466fedcda8bf
extra : histedit_source : 931f721ab33b38efe68cb91e7ab0410818813c31
2018-02-20 01:47:57 -08:00
Chris Peterson e5986134d4 Bug 1461243 - Part 3: Remove unused Java `codebase` check from nptest plugin. r=jimm
MozReview-Commit-ID: 7BHECmnqbsz

--HG--
extra : rebase_source : dfd25a3968d64e9fa52cd27b27db5eca7cffb74c
extra : intermediate-source : 81f870f0e92fb1be29c6579c1b02b56db2e0f409
extra : source : a9f1daca4e61261dc437dabd984a36cea79a327c
2018-02-19 15:05:32 -08:00
Chris Peterson 8bbbeee495 Bug 1461243 - Part 1: Remove unused member variable mHaveJavaC2PJSObjectQuirk. r=jimm
MozReview-Commit-ID: 4WihVmQaclk

--HG--
extra : rebase_source : 44cdc24585cfd847833bd217ed39c39206f896ed
extra : intermediate-source : d1c028cb1f42741d2bfb42435f79ddfb0022ba11
extra : source : 15e8c2a618839f34cc269a105832d5d7763a4b30
2017-04-29 01:27:21 -07:00
Nika Layzell 2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
Bogdan Tara babf96cf0c Backed out 3 changesets (bug 1176019) for frequently failing /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Maybe.h a=backout
Backed out changeset 2dd8b719d645 (bug 1176019)
Backed out changeset 9c6b0eb062ca (bug 1176019)
Backed out changeset 2d0dfc54128e (bug 1176019)
2018-05-11 17:07:19 +03:00
Doug Thayer f567be9b73 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 : 8ec2277d63add09576518076734ab1f81df3ede3
2018-05-08 15:26:15 -07:00
Doug Thayer 1f5c3f7c7a Bug 1176019 - Fix browser_bug1196539.js painting check r=mconley
MozReview-Commit-ID: HgzcSIdIh1h

--HG--
extra : rebase_source : 00bfebafe1b31a4e6dca6f1c1cab1a7d4510f062
2018-05-08 09:49:24 -07:00
Dorel Luca e2b88544d0 Backed out 3 changesets (bug 1176019) for Browser-chrome failures on dom/plugins/test/mochitest/browser_tabswitchbetweenplugins.js. CLOSED TREE
Backed out changeset 31b295f557db (bug 1176019)
Backed out changeset 6c591b484a11 (bug 1176019)
Backed out changeset 3e7dbe6b5122 (bug 1176019)
2018-05-11 02:03:20 +03:00
Doug Thayer 5b97c0aaba 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 : 28ca0c294b08c78174985e493039396edd20d16b
2018-05-08 15:26:15 -07:00
Doug Thayer 43e6e7eca2 Bug 1176019 - Fix browser_bug1196539.js painting check r=mconley
MozReview-Commit-ID: HgzcSIdIh1h

--HG--
extra : rebase_source : 00bfebafe1b31a4e6dca6f1c1cab1a7d4510f062
2018-05-08 09:49:24 -07:00
Kyle Machulis f843e12625 Bug 1436241 - Check redirect status code before forwarding to NPAPI r=jimm,pauljt
NPAPI may handle a 307 redirect across different origins, while they
should only happen on same origin requests. Have the browser check
this before forwarding to NPAPI.

MozReview-Commit-ID: 5vxMooygI4g

--HG--
extra : rebase_source : 36ab35b389c1746bbfd3482ff68b81bac34e4de1
2018-04-30 12:49:15 -07:00
David Major 8b303e72a0 Bug 1449308: Clean up instancedata when the nptest plugin shuts down. r=jimm 2018-04-30 12:24:50 -04:00
Eugen Sawin b03149e8d0 Bug 1439013 - [1.2] Add isUserTriggered argument to nsILinkHandler and expose it as an internal load flag. r=smaug 2018-04-27 20:49:54 +02:00
Boris Zbarsky 25aa42d9a4 Bug 1455674 part 16. Remove most use of nsIDOMElement in dom. r=qdot 2018-04-26 23:37:34 -04:00
Boris Zbarsky dd4506eee2 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
shindli af700315a1 Backed out 2 changesets (bug 1457155, bug 1457156) for B failures in builds/worker/workspace/build/src/dom/html/HTMLObjectElement.cpp on a CLOSED TREE
Backed out changeset 8b2a6b54336c (bug 1457155)
Backed out changeset 4e267d999797 (bug 1457156)
2018-04-27 01:34:37 +03:00
Boris Zbarsky 25cec96459 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
Boris Zbarsky 8a0b50bea8 Bug 1456588 part 1. Change nsIFocusManager::SetFocus to take Element. r=enndeakin 2018-04-26 10:37:46 -04:00
Kris Maglione be628a4524 Bug 1456677: Make the blocklist service a JSM, with an XPCOM service stub. r=Gijs
Aside from making things easier for JS callers, this also makes it harder to
accidentally trigger an early load of the service, which can be expensive
during startup.

This also makes a slight change to nsPluginHost to initially preserve the
previous blocklist state when a plugin is updated, to avoid the risk of the
possible additioanl asynchrony unblocking a plugin that should stay blocked.

MozReview-Commit-ID: 4EvIGJ1Ke0Z

--HG--
rename : toolkit/mozapps/extensions/nsBlocklistService.js => toolkit/mozapps/extensions/Blocklist.jsm
extra : rebase_source : e7047615ea3a728478695c76a0c521b0281f363b
extra : amend_source : b74115abacacd17ae3e8433a534a5bbb541905b0
2018-04-24 17:46:44 -07:00
Kris Maglione 04176fe891 Bug 1456324: Part 2 - Mark infallible nsIPluginTag getters as infallible. r=Gijs
MozReview-Commit-ID: B7fkZVeDfJZ

--HG--
extra : rebase_source : 5ad69df704574acc589e1094fcfee0ad25286a77
extra : histedit_source : d8b2ecea2586a43c7839a43053f29bf872d02d2e
2018-04-24 15:04:11 -07:00
Kris Maglione efab220d5f Bug 1456324: Part 1 - Update tests to use nsIFakePluginTag rather than JS mocks. r=Gijs
This will allow us to make nsIPluginTag a builtin class.

This patch also factors out some common logic from AOM plugin tests.

MozReview-Commit-ID: FbXlSE8sjyK

--HG--
extra : rebase_source : 6403a62bcd6d5a1481c0b4d74c41339f659280ca
2018-04-25 12:31:25 -07:00
David Parks dc1f619d39 Bug 1450708 - Ref-count the plugin FunctionBroker mutex. r=bobowen
Instead of contending with the idiosyncracies of the platform implementations of condition variables, which have been leading to strange crashes, we hold this mutex as a ref-counted object and avoid complex object lifetime reasoning.
2018-04-23 13:48:06 -07:00
Gijs Kruitbosch c4a85a5a4d Bug 1456171 - make getPluginBlocklistState API asynchronous, r=kmag
MozReview-Commit-ID: KcDWtkdkNKs

--HG--
extra : rebase_source : 3c96317565b0efecc796ba4429324aa6c2945a69
2018-04-23 17:11:34 +01:00
Aaron Klotz 5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
Boris Zbarsky 4643230674 Bug 1455055 part 6. Clean up HandleEvent implementations in dom. r=masayuki
MozReview-Commit-ID: Ht7HQEhVS8E
2018-04-20 00:49:30 -04:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Kris Maglione 219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Tom Bannister 988d18881f Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
MozReview-Commit-ID: 1Ema7TUNr5v

--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
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