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

18422 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 1cbfafaeb7 Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack b7b0540cce Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack 0b89d2391b Bug 1483121 - Generate static atom hash in StaticAtoms.py. r=njn,emilio
Summary: Depends On D3286

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1483121

Differential Revision: https://phabricator.services.mozilla.com/D3295
2018-08-15 15:52:42 +10:00
Cameron McCormack ec18757d45 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack e816227f97 Bug 1482782 - Part 6: Remove support for multiple static atom sources. r=njn,emilio
Summary: Depends On D3284

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3285
2018-08-15 15:46:42 +10:00
Cameron McCormack d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack cc6c806369 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Cameron McCormack caeb752d2f Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r=njn
Summary: Depends On D3281

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3282
2018-08-15 15:46:00 +10:00
Cameron McCormack ae87156cab Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Cameron McCormack ee27868fc6 Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
Reviewers: njn!, hsivonen!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3280
2018-08-15 15:46:00 +10:00
Henri Sivonen 8e541f1e0a Bug 1473337 - Omit ASCII-case length calculation for short strings when performing an encoding conversion that expands non-ASCII. r=Nika
MozReview-Commit-ID: 88k27XnFym9

--HG--
extra : rebase_source : d633eee2a8f64df22663607125ca99a42c59ec6d
2018-07-05 09:27:29 +03: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
Nicholas Nethercote 10d6977432 Bug 1477627 - Convert CCGraph::mPtrToNodeMap to a mozilla::HashSet. r=mccr8
Because mozilla::HashSet is much faster than PLDHashTable, and mPtrToNodeMap is
hot.

--HG--
extra : rebase_source : bd861a1cd07ae27f4d18ce5c01ca40c5bb73c035
2018-08-14 09:25:51 +10:00
Nicholas Nethercote ce73ba39cf Bug 1482011 - Make Bench_Cpp_MozHashSet more idiomatic. r=froydnj
I discovered there are some shortcut methods for some common operations.

--HG--
extra : rebase_source : b22ca592af24857e093308d4b6351621062b8cea
2018-08-14 08:52:38 +10: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
Chris Peterson 02588f7a04 Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika
This gcc 4.9 workaround (from bug 1377351) is no longer needed because Firefox currently requires gcc 6.1 or later (as of bug 1444274).

MozReview-Commit-ID: 9R14BDzWEoj

--HG--
extra : rebase_source : a56ec3ee321cdc76e704fe33c2c4a5b85b558889
extra : source : e0c26ec11d499058e51bc2c3d06b2e1840e77f13
2018-07-22 00:02:34 -07:00
Henri Sivonen 3a52652295 Bug 1349528 - Use encoding_rs for normalizing USVString. r=smaug
MozReview-Commit-ID: 9uG6j8UdfKR

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

--HG--
extra : moz-landing-system : lando
2018-08-16 10:15:07 +00: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
Jan Varga d38e92d73f Bug 1399789 - nsSubstringSplitter/nsCSubstringSplitter is not defined anymore; r=erahm 2018-08-09 14:18:22 +02:00
Daniel Varga 31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Csoregi Natalia 0ed25650ef Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-08 13:02:49 +03:00
Alex Gaynor 8f9e8a51b2 Bug 1446509 - added final versions of macro for declaring AddRef and Decref; r=froydnj
Also make use of them in a few places.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 18:25:49 +00:00
Kris Maglione 725e4b5cf8 Bug 1479945: Part 5 - Remove the 'allowbootstrap' directive flag. r=froydnj
For all intents and purposes, this is now the same as the 'ischrome' flag.

MozReview-Commit-ID: 4z4SDs5M8zU

--HG--
extra : source : 2a5aa9de1fd9760a9245ecae815a6e02bb9eef42
2018-07-31 16:44:52 -07:00
Kris Maglione f03c0288bf Bug 1479945: Part 4 - Remove unused isContract directive flag. r=froydnj
MozReview-Commit-ID: DLCiNb39gA8

--HG--
extra : source : 163276881d35942172fd18d8f2cd270fbab1de71
2018-07-31 16:38:49 -07:00
Kris Maglione 0ea583c3dd Bug 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj
This is unused now that binary component support has been removed.

MozReview-Commit-ID: KHTsF4sSoZX

--HG--
extra : source : 20a1a11b4d0ba7010b36b952bb212f3c36e6aac3
2018-07-31 16:38:27 -07:00
Kris Maglione 1eef446312 Bug 1479945: Part 2 - Remove support for componentonly directive flag. r=froydnj
This serves no purpose now that legacy theme support has been removed.

MozReview-Commit-ID: BpLcQYfZtAZ

--HG--
extra : source : ca43bd11f43161f03d3e0dd6bd9b28d446bbe7e1
2018-07-31 16:33:08 -07:00
Kris Maglione 821801d125 Bug 1479945: Part 1 - Remove nominal support for binary-component directive. r=froydnj
MozReview-Commit-ID: LKF3A7EEY4J

--HG--
extra : source : 71700b368132dd0735d4b792d6dbc6e1365790d4
2018-07-31 16:31:31 -07:00
Cosmin Sabou 901f34bef4 Backed out 12 changesets (bug 1479309, bug 1479312, bug 1479313, bug 1479310, bug 1479235, bug 1479945, bug 1479241, bug 1479318) for causing a big performance regression on OS X. a=backout
Backed out changeset 915862a355e9 (bug 1479318)
Backed out changeset f150e62dcbbd (bug 1479241)
Backed out changeset a68daa762119 (bug 1479312)
Backed out changeset 2a5aa9de1fd9 (bug 1479945)
Backed out changeset 163276881d35 (bug 1479945)
Backed out changeset 20a1a11b4d0b (bug 1479945)
Backed out changeset ca43bd11f431 (bug 1479945)
Backed out changeset 71700b368132 (bug 1479945)
Backed out changeset f5d647fae973 (bug 1479313)
Backed out changeset 3583823171de (bug 1479310)
Backed out changeset 2d46e1fe3121 (bug 1479309)
Backed out changeset 8f9c9580f687 (bug 1479235)

--HG--
rename : browser/components/uitour/ContentUITour.jsm => browser/components/uitour/content-UITour.js
rename : dom/ipc/ManifestMessages.jsm => dom/ipc/manifestMessages.js
rename : toolkit/components/normandy/content/ShieldFrameListener.jsm => toolkit/components/normandy/content/shield-content-frame.js
rename : toolkit/components/normandy/shield-content-process.js => toolkit/components/normandy/content/shield-content-process.js
2018-08-07 17:30:52 +03:00
Andrew Osmond 51d273388c Bug 1416328 - Part 2. Expose decoding attribute for img elements. r=bz,tnikkel
This adds support for HTMLImageElement's decoding attribute, as
described by:

https://github.com/whatwg/html/pull/3221
https://whatpr.org/html/3221/images.html#decoding-images

It also exposes the same attribute on SVGImageElement, just as Blink has
chosen to do so.
2018-08-08 07:56:01 -04:00
agashlin@mozilla.com a03dfcbd42 bug 1397297, make SnowWhite freeing more incremental, r=smaug
--HG--
extra : rebase_source : 0772adabddb6cee33d83184d32c981d3920ea6e6
2018-08-08 09:14:58 +03:00
Dylan Roeh 63ca464a8c Bug 1441059 - Make nsILoadURIDelegate async to preserve the order of GeckoSession.loadUri() calls. r=snorp,bz
This alters nsILoadURIDelegate.loadURI() to return a Promise rather than spinning the event loop to synchronously return a boolean, and alters nsDocShell::InternalLoad to allow for those changes by re-calling itself if necessary based on the resolution of the promise.
2018-08-07 13:42:07 -05: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
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
Dorel Luca 33b000ddd1 Merge mozilla-central to mozilla-inbound 2018-08-04 01:31:40 +03:00
Dorel Luca 5c509fd70a Backed out changeset 8c763e66ba84 (bug 1397297) for frequent mochitest failures. a=backout 2018-08-04 01:27:15 +03:00
Boris Zbarsky f771d7e529 Bug 1477923. Make WebIDL callbacks store a global in addition to the object that's used as a callback. r=mccr8
We want to be able to enter the Realm we were in when the callback was created
before calling it, but if the callback stores a cross-compartment wrapper we
don't really have a good way to find that Realm.  So we store it explicitly by
storing a global when the callback is created.

The changes to the constructor signatures to use JSObject* instead of
JS::Handle<JSObject*> are so we can avoid having to root the global for these
calls.  These changes make two of the constructors ambiguous when nullptr is
being passed for the first arg; this patch adds casts to disambiguate.
2018-08-03 17:11:39 -04: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
Nika Layzell f1902ff595 Bug 1480624 - Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
Summary:
This macro simplifies code which allows performing an operation on or
extracting information from a particular nsXPTType's native representation.

It is also used in part 2 to implement xpc::DestructValue.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1480624

Differential Revision: https://phabricator.services.mozilla.com/D2689
2018-08-03 15:55:13 -04: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
Bogdan Tara 4759ec60f7 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-03 13:28:32 +03:00
Nicholas Nethercote 097b276f5c Bug 1480660 - Remove ConstExprHash{UntilZero,String}(). r=froydnj
They were workarounds for bugs in GCC 4.9, which is no longer supported.

--HG--
extra : rebase_source : b793b4643e1e44199afdb8e8b35f930e02664be8
2018-08-03 14:47:41 +10:00
Tom Ritter c9e4e2854a Bug 1480177 Lowercase includes to fix MinGW Build Errors r=froydnj
MozReview-Commit-ID: LvFS90CRAFe

--HG--
extra : rebase_source : bfbcc59d061128e5440378448523bbaf939d5a45
2018-07-30 22:43:24 -05:00
Brian Hackett 51e310f29a Bug 1479547 Part 1 - Remove instrumentation related to non-deterministic GCs, r=mccr8.
--HG--
extra : rebase_source : 6dfc65ab83e770da6e1f64003379156c3b863050
2018-07-31 19:34:50 +00: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
Brian Hackett 3c13dd9f31 Bug 1479641 - Don't record counting allocator amount, r=froydnj.
--HG--
extra : rebase_source : 23de9644662c1f9ed36429074837e54bb7cac868
2018-07-31 19:22:54 +00: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
Noemi Erli 58e27f3dd9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-02 12:04:24 +03:00
Noemi Erli 8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
Nika Layzell 3869445efd Bug 1474739 - Part 3: Linting fixes on a CLOSED TREE, a=bustage 2018-08-01 18:23:21 -04:00
Nika Layzell 540b4e5eb7 Bug 1474739 - Part 2: Remove all code for XPT shims, r=bzbarsky
Summary: Depends On D2624

Reviewers: bzbarsky!

Tags: #secure-revision

Bug #: 1474739

Differential Revision: https://phabricator.services.mozilla.com/D2625
2018-08-01 18:07:44 -04:00
Nika Layzell b465c677b3 Bug 1479484 - Part 5: Remove old perfecthash.py, r=froydnj
Summary: Depends On D2618

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

Differential Revision: https://phabricator.services.mozilla.com/D2619
2018-08-01 17:54:43 -04:00
Nika Layzell 082166e008 Bug 1479484 - Part 4: Move xptcodegen over to new perfecthash.py, r=froydnj
Summary:
This patch ports xptcodegen.py over to the new perfecthash.py system, removing
some special-case code generators, and taking advantage of the easier-to-use
interface.

In addition, the code was changed to take advantage of the endianness
information from Part 2, allowing us to avoid having to perform endianness swaps
at runtime when hashing nsIDs.

Depends On D2616

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

Differential Revision: https://phabricator.services.mozilla.com/D2618
2018-08-01 17:54:42 -04:00
Nika Layzell d36f0538d8 Bug 1479484 - Part 3: Add perfecthash.py with codegen to xpcom/ds/tools, r=froydnj
Summary:
This is a streamlined version of perfecthash.py from xpcom/reflect/xptinfo.
There are a few major changes here:

Instead of providing '(key, value)' pairs to the constructor, callers provide a
list of 'entries'. An optional 'key' parameter allows overriding the function
used to get an entry's key. The default behaviour is as before, destructuring a
(key, value) tuple.

Keys can now be anything which supports the 'memoryview' protocol with 1-byte
elements, rather than being forced to be a 'bytearray'. This allows passing in
types such as bytestrings.

A new 'cxx_codegen' method is now exposed which generates a series of
fully-contained C++ declarations to perform entry lookups. It is possible to
override many parts of this codegen to make it the best fit for your component.

PerfectHash remembers the 'key' function, meaning lookup methods automatically
verify a valid key was passed in, and return 'None' otherwise.

Depends On D2615

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

Differential Revision: https://phabricator.services.mozilla.com/D2616
2018-08-01 17:54:42 -04:00
Nika Layzell 7a9f60fafb Bug 1479484 - Part 1: Add make_dafsa.py to the virtualenv's python path, r=froydnj
Summary:
The plan is to also expose perfecthash.py from this module on the python path.
This also allows us to stop using explicit module loading to load make_dafsa.py.

make_dafsa.py was moved into tools/ to avoid any extra python files from
accidentally ending up on the python path.

Reviewers: froydnj!

Tags: #secure-revision

Bug #: 1479484

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


--HG--
rename : xpcom/ds/make_dafsa.py => xpcom/ds/tools/make_dafsa.py
2018-08-01 17:54:41 -04:00
Tooru Fujisawa 6d85c982d8 Bug 1317481 - Optimize away Generator/Promise handling for await in the topmost JS frame with already resolved/rejected Promise. r=anba,smaug 2018-08-02 16:11:57 +09:00
Kris Maglione ad3026deb1 Bug 1479945: Part 5 - Remove the 'allowbootstrap' directive flag. r=froydnj
For all intents and purposes, this is now the same as the 'ischrome' flag.

MozReview-Commit-ID: 4z4SDs5M8zU

--HG--
extra : rebase_source : 7f6bd7e7ea9457920338439cfbe0ce2c191b4075
2018-07-31 16:44:52 -07:00
Kris Maglione 036cc0da8d Bug 1479945: Part 4 - Remove unused isContract directive flag. r=froydnj
MozReview-Commit-ID: DLCiNb39gA8

--HG--
extra : rebase_source : f0295229bf775ec0ae0536e3c95262c026727376
2018-07-31 16:38:49 -07:00
Kris Maglione 4a88c05507 Bug 1479945: Part 3 - Remove the unused 'apponly' directive flag. r=froydnj
This is unused now that binary component support has been removed.

MozReview-Commit-ID: KHTsF4sSoZX

--HG--
extra : rebase_source : 97a12aadbb4b726785b3bc565ac34854e6c04d8e
2018-07-31 16:38:27 -07:00
Kris Maglione ea97c5634e Bug 1479945: Part 2 - Remove support for componentonly directive flag. r=froydnj
This serves no purpose now that legacy theme support has been removed.

MozReview-Commit-ID: BpLcQYfZtAZ

--HG--
extra : rebase_source : fe8e19517d12084631e3756a4a803fd6d3c4fc39
2018-07-31 16:33:08 -07:00
Kris Maglione 20edd8bca2 Bug 1479945: Part 1 - Remove nominal support for binary-component directive. r=froydnj
MozReview-Commit-ID: LKF3A7EEY4J

--HG--
extra : rebase_source : 66b5313e499e48e78acda94e275e600df6d8a38a
2018-07-31 16:31:31 -07:00
Nicholas Nethercote f32766d3de Bug 1478879 - Remove Range/Enum use in Bench.cpp. r=froydnj
--HG--
extra : rebase_source : 0fabb074eef422e55ad79b68076d766674476ddc
2018-07-31 10:31:00 +10:00
dvarga 09eac64963 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 01:19:44 +03:00
Francois Marier 9f161ab08f Bug 1461515 - Split tracking annotations from tracking protection. r=dimi
This makes it possible to use different lists for tracking protection
and for the features that rely on tracking annotations.

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

--HG--
extra : moz-landing-system : lando
2018-08-01 20:45:41 +00:00
agashlin@mozilla.com a95f425a9e bug 1397297, make SnowWhite freeing more incremental, r=smaug
--HG--
extra : rebase_source : b5082f8753039358177bf99116966b0e51959169
2018-08-01 12:20:03 +03:00
Jan de Mooij 73ec31509e Bug 1474272 part 2 - Use more precise types in Promise code and add some assertions. r=bz 2018-08-01 11:25:49 +02:00
Nicholas Nethercote 997e790c3f Bug 1477626 - Use mozilla::HashTable instead of js::HashTable in Bench.cpp. r=froydnj
MozReview-Commit-ID: 4P5L9Kdkiuu

--HG--
extra : rebase_source : 3311757797cbc7c699c39b5ee583910c1924cfb1
2018-07-26 20:16:00 +10:00
Nicholas Nethercote 234016c13e Bug 1477626 - Document some differences between mozilla::HashTable and PLDHashTable. r=Waldo
MozReview-Commit-ID: DB0KUy99DDM

--HG--
extra : rebase_source : 4d14c47c48cb821f6c69654c1c5d90c48f217e48
2018-07-26 20:15:55 +10:00
Nika Layzell 7fa88ded1b Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-31 17:53:03 -04:00
Nika Layzell cb71d3b003 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-31 17:53:03 -04:00
Nika Layzell f900f5239d Bug 1474369 - Part 6: Use RefPtr for Array<T> of interface and WebIDL types, r=mccr8
Summary:
This means that using these types involves many fewer footguns, while not
requiring any changes to the actual XPConnect implementation!

Depends on D2111

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2334
2018-07-31 17:53:03 -04:00
Nika Layzell 5b6ca0e475 Bug 1475409 - Part 3: Make the different categories of types in xptinfo more explicit, r=mccr8
Summary:
This should make it more clear which types have which behaviours, and should
make it easier to add new types without forgetting to handle a special case
somewhere.

Depends On D2114

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2115
2018-07-31 17:53:02 -04:00
Nika Layzell 985488cb0f Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-31 17:53:02 -04:00
Nika Layzell 2cb67382dc Bug 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8
Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2113
2018-07-31 17:53:02 -04:00
Nika Layzell d4c9b9edf4 Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-31 17:53:01 -04:00
Nika Layzell 4d1911e395 Bug 1474369 - Part 3: Add generic type parsing support to xpidl, r=mccr8
Summary:
This patch allows parsing generic types, such as Sequence<T>, in XPIDL. It does
this by introducing a new type, TypeId, which contains both the name string and
an optional list of generic parameters.

Various places which use the xpidl.py library had to be updated to construct one
of these TypeId objects, as TypeId and `str` are not compatible types.

Depends On D2106

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2109
2018-07-31 17:53:00 -04:00
Nika Layzell 5ee2c61291 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-31 17:53:00 -04:00
Nika Layzell 24cf25ae22 Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-31 17:52:59 -04:00
Nika Layzell da14f0e1df Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-31 17:52:59 -04:00
Nika Layzell 345a0af828 Bug 1471726 - Part 1: Correct codegen for XPIDL arrays of JSVals, r=mccr8 2018-07-31 17:52:58 -04:00
Eugen Sawin 80290a1133 Bug 1451476 - [1.2] Add GeckoView page load error API. r=snorp,droeh,smaug 2018-07-31 20:43:33 +02:00
Nicholas Nethercote 0f205a7ce0 Bug 1477626 - Move ScrambleHashCode() from js/src/Utility.h to mfbt/HashFunctions.h. r=Waldo
And use it in PLDHashTable.cpp.

MozReview-Commit-ID: BqwEkE0p5AG

--HG--
extra : rebase_source : bd9118e24b82add6ad1fdcb067a5f25b25e90201
2018-07-26 18:52:47 +10:00
Nicholas Nethercote 25a1140207 Bug 1477626 - Introduce mozilla::HashNumber and use it in various places. r=Waldo
Currently we have three ways of representing hash values.

- uint32_t: used in HashFunctions.h.

- PLDHashNumber: defined in PLDHashTable.{h,cpp}.

- js::HashNumber: defined in js/public/Utility.h.

Functions that create hash values with functions from HashFunctions.h use a mix
of these three types. It's a bit of a mess.

This patch introduces mozilla::HashNumber, and redefines PLDHashNumber and
js::HashNumber as synonyms. It also changes HashFunctions.h to use
mozilla::HashNumber throughout instead of uint32_t.

This leaves plenty of places that still use uint32_t that should use
mozilla::HashNumber or one of its synonyms, but I didn't want to tackle that
now.

The patch also:

- Does similar things for the constants defining the number of bits in each
  hash number type.

- Moves js::HashNumber from Utility.h to HashTable.h, which is a better spot
  for it. (This required changing the signature of ScrambleHashCode(); that's
  ok, it'll get moved by the next patch anyway.)

MozReview-Commit-ID: EdoWlCm7OUC

--HG--
extra : rebase_source : 5b92c0c3560eb56850cd8832f8ee514d25e3c16f
2018-07-26 18:52:46 +10:00
qiaopengcheng ffa75bd086 Bug 1478560 - Fix the compiling error of the struct nsXPTCVariant. r=glandium 2018-07-31 09:39:31 +09:00
Cosmin Sabou bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Andrea Marchesini f7b001ece2 Bug 1479407 - nsMultiplexInputStream::AppendElement should be fallible, r=froydnj 2018-07-30 23:15:36 +02:00
Nathan Froyd 017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Brian Hackett 4bd59c423f Bug 1479339 - Disable the cycle collector when recording/replaying, r=mccr8.
--HG--
extra : rebase_source : e317c64bdf8083a19bed25379ee937e348ace294
2018-07-30 15:48:17 +00:00
Cosmin Sabou e748fd8968 Backed out 15 changesets (bug 1475409, bug 1461450, bug 1474369, bug 1471726) for causing rooting hazards and browser chrome failures. CLOSED TREE
Backed out changeset 7ce27aa3ce68 (bug 1474369)
Backed out changeset a8a4e2414daa (bug 1474369)
Backed out changeset 13c9626970e2 (bug 1474369)
Backed out changeset 9817819b7765 (bug 1475409)
Backed out changeset 39fcebfe6529 (bug 1475409)
Backed out changeset c19ca740d3d1 (bug 1475409)
Backed out changeset b26c90518fca (bug 1474369)
Backed out changeset cbdde0474521 (bug 1474369)
Backed out changeset ccea3049fe0f (bug 1474369)
Backed out changeset e9f6d2544a82 (bug 1474369)
Backed out changeset 99c4d07d4b88 (bug 1474369)
Backed out changeset c721ada8a6d6 (bug 1461450)
Backed out changeset 961379be0f5e (bug 1461450)
Backed out changeset cf2448b2635f (bug 1471726)
Backed out changeset 408961783c95 (bug 1471726)
2018-07-30 20:31:24 +03:00
Andreea Pavel d960e5a77a Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-07-30 19:40:38 +03:00
Andreea Pavel be1d7773cc Merge mozilla-inbound to mozilla-central. a=merge 2018-07-30 19:35:30 +03:00
Tarek Ziadé a3fdf4760e Bug 1477943 - Add a unique id per PerformanceCounter instance - r=baku,froydnj
This new id is added in the PerformanceInfo data and helps consumers distinguish
counters.

MozReview-Commit-ID: 7kEmqJcVggM

--HG--
extra : rebase_source : 40cca4c937f846db93ec1315036ad1bac04bc762
2018-07-27 11:44:22 +02:00
Boris Zbarsky 27c2e2863d Bug 1347999. Annotate xpidl methods/attributes that can be implemented in script as JS_HAZ_CAN_RUN_SCRIPT. r=froydnj 2018-07-30 11:51:44 -04:00
Nika Layzell 72ed07e711 Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-30 11:31:41 -04:00
Nika Layzell 28fd912fa1 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-30 11:31:29 -04:00
Nika Layzell 4bde66e24f Bug 1474369 - Part 6: Use RefPtr for Array<T> of interface and WebIDL types, r=mccr8
Summary:
This means that using these types involves many fewer footguns, while not
requiring any changes to the actual XPConnect implementation!

Depends on D2111

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2334
2018-07-30 11:28:22 -04:00
Nika Layzell f6490fc64d Bug 1475409 - Part 3: Make the different categories of types in xptinfo more explicit, r=mccr8
Summary:
This should make it more clear which types have which behaviours, and should
make it easier to add new types without forgetting to handle a special case
somewhere.

Depends On D2114

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2115
2018-07-30 11:28:19 -04:00
Nika Layzell e1f1115f9a Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-30 11:28:17 -04:00
Nika Layzell 366cd88a89 Bug 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8
Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2113
2018-07-30 11:28:14 -04:00
Nika Layzell 0f6863aece Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-30 11:28:08 -04:00
Nika Layzell 5e6f9e81ab Bug 1474369 - Part 3: Add generic type parsing support to xpidl, r=mccr8
Summary:
This patch allows parsing generic types, such as Sequence<T>, in XPIDL. It does
this by introducing a new type, TypeId, which contains both the name string and
an optional list of generic parameters.

Various places which use the xpidl.py library had to be updated to construct one
of these TypeId objects, as TypeId and `str` are not compatible types.

Depends On D2106

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2109
2018-07-30 11:28:06 -04:00
Nika Layzell 6391732616 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-30 11:28:00 -04:00
Nika Layzell 9c66afc10b Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-30 11:27:58 -04:00
Nika Layzell a3c819960c Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-30 11:27:55 -04:00
Nika Layzell 3bb3fd9a2a Bug 1471726 - Part 1: Correct codegen for XPIDL arrays of JSVals, r=mccr8 2018-07-30 11:27:49 -04:00
Kris Maglione 0615a1e1f4 Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me
--HG--
extra : rebase_source : 0c76deb232df4941a2f1a98a6e3930c24f2258de
extra : intermediate-source : ad1674e9152da31151ab9f9f099f83ca4ff2d832
extra : source : cb7f7cc326875b2fd28d4a63101b07360a6606fd
2018-07-26 16:36:16 -07:00
Kris Maglione 94acb9ea0e Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : rebase_source : aa7ce229cd37763a3af2061b38d41b675118773f
extra : intermediate-source : 236b366fdf3731ef95e0ba75b8f24f03181343ee
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
2018-07-18 22:31:30 -07:00
Kris Maglione 4146a617cf Bug 1476405: Part 1 - Allow enumerating non-native nsThread threads. r=erahm
MozReview-Commit-ID: 1JKxWeejqzi

--HG--
extra : rebase_source : 7c52c14f290082f3e342e226b2a81d7dcdbe2e90
extra : intermediate-source : c767b1b618fbdc8bc894719f5ed7ecdcc9fc5165
extra : source : 06b8093ddc6a341b8be4ef2c4dca2188ada74296
2018-07-20 13:48:50 -07:00
Cosmin Sabou 778ca4f84f Backed out 8 changesets (bug 1476405) for causing frequent failures in bug 1479022. a=backout
Backed out changeset ad1674e9152d (bug 1476405)
Backed out changeset e0a021b27d2c (bug 1476405)
Backed out changeset 771288dbf852 (bug 1476405)
Backed out changeset aeebad4f2dc3 (bug 1476405)
Backed out changeset 4831cbfd03de (bug 1476405)
Backed out changeset 0b0c243a1827 (bug 1476405)
Backed out changeset 236b366fdf37 (bug 1476405)
Backed out changeset c767b1b618fb (bug 1476405)
2018-07-28 01:25:25 +03:00
Kris Maglione 25b5f10ae3 Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me
--HG--
extra : source : cb7f7cc326875b2fd28d4a63101b07360a6606fd
extra : histedit_source : db0deda75879e4626a1c095d8e2845bbcaa753b4%2Cb7f6d26232e23f97ab171519a943768a50575977
2018-07-26 16:36:16 -07:00
Kris Maglione ed4f3e5b05 Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
extra : histedit_source : 4c5ef4a166af4c54244003fa5f66dc13da9024f6%2Ca0400aab477c90f08683773186b7a64e88b64b7e
2018-07-18 22:31:30 -07:00
Kris Maglione 3ccf4e7420 Bug 1476405: Part 1 - Allow enumerating non-native nsThread threads. r=erahm
MozReview-Commit-ID: 1JKxWeejqzi

--HG--
extra : source : 06b8093ddc6a341b8be4ef2c4dca2188ada74296
2018-07-20 13:48:50 -07:00
Coroiu Cristina 6d037d0cba Backed out 9 changesets (bug 1476405) for causing leaks
Backed out changeset 4113d6fb3c1c (bug 1476405)
Backed out changeset cb7f7cc32687 (bug 1476405)
Backed out changeset 6d18a8bd5ee3 (bug 1476405)
Backed out changeset b2a99f50e642 (bug 1476405)
Backed out changeset b5b9d295545d (bug 1476405)
Backed out changeset f092a32a3639 (bug 1476405)
Backed out changeset 6c154f4d9dd9 (bug 1476405)
Backed out changeset d0ebb3aa8e0f (bug 1476405)
Backed out changeset 06b8093ddc6a (bug 1476405)
2018-07-27 08:56:36 +03:00
Boris Zbarsky 1aa33b0003 Bug 1478721. Remove nsIIdleObserver. r=mccr8 2018-07-27 00:37:44 -04:00
Kris Maglione d8f0b63dba Bug 1476405: Follow-up: Remove added assertion. r=bustage 2018-07-26 21:18:42 -07:00
Kris Maglione 0d90f33cca Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me
--HG--
extra : rebase_source : d96849b7905bc2eed2c003fa3592306602069cd5
extra : absorb_source : c4f2c792524ab6d65a34b5da3d75640fb3860af7
extra : histedit_source : 192a53c339600872a00b4bfc6f673b7aaf192431%2C06866d9cdc1ba2c2d807ed99fd4b62e202881f77
2018-07-26 16:36:16 -07:00
Kris Maglione c2cc4cf6e5 Bug 1476405: Part 1 - Allow enumerating non-native nsThread threads. r=erahm
MozReview-Commit-ID: 1JKxWeejqzi

--HG--
extra : rebase_source : a9ff7e4153cb3e1a7bb4003a5511e1c603865d86
2018-07-20 13:48:50 -07:00
Nika Layzell 7934975bff Bug 1478820 - Remove trailing 'o' in comment, r=me
Accidentally failed to commit this comment-only change.
2018-07-26 18:35:49 -04:00
Nika Layzell 8e44305af9 Bug 1478820 - Stop manually synchronizing VTYPE_ and nsXPTTypeTag, r=erahm
Reviewers: erahm!

Tags: #secure-revision

Bug #: 1478820

Differential Revision: https://phabricator.services.mozilla.com/D2449
2018-07-26 18:15:27 -04:00
Emilio Cobos Álvarez 3aaf4c171a Bug 1466614: Remove -moz-windows-theme. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2492

MozReview-Commit-ID: 70vOmLH7C27
2018-07-30 11:38:46 +02:00
Nathan Froyd cd8b60fc05 Bug 1478337 - avoid useless work in nsTArray::RemoveElement; r=erahm
When removing an element that exists in the array, there's no need to
perform extra bounds checks for actually removing the element; the
presence of the element guarantees that we have a valid index and a
valid range to remove.  So split RemoveElementsAt into a safe interface
and an unsafe interface, and let RemoveElement call the latter as an
internal optimization.  The same logic applies to RemoveElementSorted.

We call RemoveElement depressingly often, so this is a nice little win.
2018-07-26 09:37:48 -04:00
Tooru Fujisawa 1b2c111e0a Bug 1434305 - Part 3: Support LazyScript in WeakMap. r=jimb,sfink 2018-07-26 12:36:16 +09:00
Brindusan Cristian d7e724835f Backed out 15 changesets (bug 1475409, bug 1461450, bug 1474369, bug 1471726) for build bustages on xptcstubs_gcc_x86_unix.cpp:55:1. CLOSED TREE
Backed out changeset 79dbf5b9d8db (bug 1474369)
Backed out changeset 7e2e13953e19 (bug 1474369)
Backed out changeset 9d0b9a4c4651 (bug 1474369)
Backed out changeset 9f14f7b8bc3d (bug 1475409)
Backed out changeset bddd838d1910 (bug 1475409)
Backed out changeset 850f21ca1f45 (bug 1475409)
Backed out changeset 320802ab02e3 (bug 1474369)
Backed out changeset db67bf0e7f91 (bug 1474369)
Backed out changeset f355d9be9912 (bug 1474369)
Backed out changeset e1b6a5f74642 (bug 1474369)
Backed out changeset 459635cdfc08 (bug 1474369)
Backed out changeset 44414b1cd32e (bug 1461450)
Backed out changeset a5d04cf5d67f (bug 1461450)
Backed out changeset 40885fbf99c6 (bug 1471726)
Backed out changeset da79e75b9cb3 (bug 1471726)
2018-07-25 22:57:09 +03:00
Nika Layzell 0866987b30 Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-25 15:38:04 -04:00
Nika Layzell 2e51038216 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-25 15:38:02 -04:00
Nika Layzell 758bebfa14 Bug 1474369 - Part 6: Use RefPtr for Array<T> of interface and WebIDL types, r=mccr8
Summary:
This means that using these types involves many fewer footguns, while not
requiring any changes to the actual XPConnect implementation!

Depends on D2111

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2334
2018-07-25 15:38:00 -04:00
Nika Layzell 4e4ab925ca Bug 1475409 - Part 3: Make the different categories of types in xptinfo more explicit, r=mccr8
Summary:
This should make it more clear which types have which behaviours, and should
make it easier to add new types without forgetting to handle a special case
somewhere.

Depends On D2114

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2115
2018-07-25 15:37:58 -04:00
Nika Layzell b24e4f4b40 Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-25 15:37:56 -04:00
Nika Layzell 0df716e08d Bug 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8
Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2113
2018-07-25 15:37:54 -04:00
Nika Layzell b47aabdb25 Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-25 15:37:50 -04:00
Nika Layzell eed3048b35 Bug 1474369 - Part 3: Add generic type parsing support to xpidl, r=mccr8
Summary:
This patch allows parsing generic types, such as Sequence<T>, in XPIDL. It does
this by introducing a new type, TypeId, which contains both the name string and
an optional list of generic parameters.

Various places which use the xpidl.py library had to be updated to construct one
of these TypeId objects, as TypeId and `str` are not compatible types.

Depends On D2106

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2109
2018-07-25 15:37:48 -04:00
Nika Layzell 9426bbf9e9 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-25 15:37:44 -04:00
Nika Layzell 12ddb5adc1 Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-25 15:37:42 -04:00
Nika Layzell 4658f7e519 Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-25 15:37:40 -04:00
Nika Layzell 853c9b6e9d Bug 1471726 - Part 1: Correct codegen for XPIDL arrays of JSVals, r=mccr8 2018-07-25 15:37:36 -04:00
Cosmin Sabou 76b0913227 Merge autoland to mozilla-central. a=merge 2018-07-25 21:20:49 +03:00
Shane Caraveo 7962eacafd Bug 1344771 - Implement attribution on OSX using quarantine data, r=mossop,spohl
MozReview-Commit-ID: NgjE1HZS7M

--HG--
rename : browser/modules/AttributionCode.jsm => browser/components/attribution/AttributionCode.jsm
rename : browser/modules/test/unit/test_AttributionCode.js => browser/components/attribution/test/xpcshell/test_AttributionCode.js
extra : rebase_source : 197f427e0d2fcbdbe85d5ebe65067dcc9eee6407
2018-07-23 11:01:26 -03:00
Nicholas Nethercote 85db906378 Bug 1477632 - Always inline PLDHashTable::SearchTable(). r=froydnj
This speeds up BenchCollections.PLDHash as follows:

>     succ_lookups      fail_lookups     insert_remove           iterate
>          42.8 ms           51.6 ms           21.0 ms           34.9 ms
>          41.8 ms           51.9 ms           20.0 ms           34.6 ms
>          41.6 ms           51.3 ms           19.3 ms           34.5 ms
>          41.6 ms           51.3 ms           19.8 ms           35.0 ms
>          41.7 ms           50.8 ms           20.5 ms           35.2 ms

After:

>     succ_lookups      fail_lookups     insert_remove           iterate
>          37.7 ms           33.1 ms           19.7 ms           35.0 ms
>          37.0 ms           32.5 ms           19.1 ms           35.4 ms
>          37.6 ms           33.6 ms           19.2 ms           36.2 ms
>          36.7 ms           33.3 ms           19.1 ms           35.3 ms
>          37.1 ms           33.1 ms           19.1 ms           35.0 ms

Successful lookups are about 1.13x faster, failing lookups are about 1.54x
faster, and insertions/removals are about 1.05x faster.

On Linux64, this increases the size of libxul (as measured by `size`) by a mere
16 bytes.

--HG--
extra : rebase_source : 4bfdee68ba40a0cdd5396964d1647a70fb10736a
2018-07-24 11:09:35 +10:00
Boris Zbarsky 1914ffc8ec Bug 1450167. Stop using atom-or-string for event names in the listener manager. r=smaug
Now that we support atoms off the the main thread, we can just use atoms.
2018-07-24 18:15:19 -04:00
Aaron Klotz afe18923e0 Bug 1477402: Wrap WaitForInputIdle with checks for ERROR_NOT_GUI_PROCESS failures; r=agashlin
widget/windows/WinUtils.h is getting unwieldy and contains a combination of
both header-only and non-header-only code. I thought I'd take the opportunity
with this patch to create a new file for self-contained, header-only utility
functions, with the hope that we can eventually migrate some stuff out of
WinUtils into WinHeaderOnlyUtils in the future.

--HG--
extra : rebase_source : 6c874f78fc7113d1f7011fcd57ad9d024edb6761
2018-07-20 15:54:08 -06:00
Nathan Froyd 695cb9d23b Bug 1477081 - remove TARGET_CPU use from moz.build files; r=ted.mielczarek
TARGET_CPU is not canonicalized, whereas CPU_ARCH is, so we should be
using CPU_ARCH to get consistent values everywhere.
2018-07-24 16:08:55 -04:00
Nathan Froyd 309ddc0be2 Bug 1477048 - part 2 - remove non-ipc/chromium moz.build uses of OS_TEST; r=gps
The deletions in xptcall are when we don't even have support for the CPU
in moz.configure, so I assume that people haven't been compiling on
those architectures for quite some time.
2018-07-24 16:08:56 -04:00
Nathan Froyd 5158597854 Bug 1477048 - part 1 - remove `'86' in CONFIG['OS_TEST']` stanzas from moz.build files; r=gps
The current code is somewhat non-obvious to a first-time reader, and
OS_TEST is a bizarre thing anyway, since it's actually the name of the
CPU we're running on.  We'd do well to minimize the use of OS_TEST.

Note that the complete nuking of the xptcall/md/unix/moz.build lines are
because we don't support OS X/x86 anymore.
2018-07-24 16:08:56 -04:00
Brian Hackett 562987ce84 Bug 1465466 Part 3 - When recording/replaying, composite in the main thread's event loop instead of waiting for vsyncs, r=nical.
--HG--
extra : rebase_source : 0dbdcb4698e349ceb53e0621d5fa453bb1f17357
2018-07-23 21:47:28 +00:00
Gurzau Raul bdfd20ef30 Merge inbound to mozilla-central. a=merge 2018-07-24 18:48:01 +03:00
Gurzau Raul 46679701af Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-24 12:54:45 +03:00
Gurzau Raul f2e1e857f1 Merge inbound to mozilla-central. a=merge 2018-07-24 12:49:23 +03:00
Hiroyuki Ikezoe ea2e577fa3 Bug 1365045 - Introduce keywords for prefers-reduced-motion. r=heycam
https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion

MozReview-Commit-ID: RQUo1DBR0W
2018-07-24 16:50:47 +09:00
Kris Maglione 1814a2510f Bug 1477512: Follow-up: Un-inline ThreadEventQueue::SizeOfExcludingThis. r=me
--HG--
extra : amend_source : 0e611892cc6d9133ffc7ccc41cd14a7348d7c5b3
2018-07-23 23:17:12 -07:00
Nicholas Nethercote e6f8df84ad Bug 1477622 - Add microbenchmarks measuring hash table performance. r=froydnj
--HG--
extra : rebase_source : 2d76bfcb862b3b690ea8db2b5b007dde2a90f914
2018-07-24 10:38:43 +10:00
Kris Maglione 3869956f6e Bug 1477579: Follow-up: Also skip stack allocation assertion on Android. r=me DONTBUILD 2018-07-23 19:25:00 -07: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
Kris Maglione 83b3ac8f23 Bug 1477579: Part 2 - Use nsID* rather than nsID for mFactories hash keys. r=froydnj
Our factory registrations already require that we store nsID pointers, which
we generally handle by using pointers to static data, or arena allocating a
copy of a dynamic ID.

Since we already have viable pointers to these IDs, there's no reason to store
an entire second copy for our hash key. We can use the pointer, instead, which
saves 16 bytes per entry.

MozReview-Commit-ID: 6MgKrXRSHv4

--HG--
extra : source : 5fb0b7746a5d56563b471e3061ccca124ea45485
extra : absorb_source : 275f5d4dc2c02e3d0391ed16e8690dac1e601758
2018-07-21 19:09:25 -07:00
Kris Maglione b8f2198d8c Bug 1477579: Part 1 - Use literal strings for statically registered contract ID keys. r=froydnj
Most of our components are static, and registered using literal C strings. For
those components, we currently use a nsDependentCString as a key when creating
a hash entry, which leads to an unnecessary duplication. Using literal
CStrings instead avoids the duplication.

MozReview-Commit-ID: 5DOUF8ZQMlh

--HG--
extra : source : 8359f8fe418419c50ab0ed93496e7445b570ba9f
extra : absorb_source : 2a33ae4e7e6d312adcea8ece2158f07a7050e01e
2018-07-22 10:54:56 -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 616ee870a3 Bug 1477512: Part 5 - Rearrange the fields of nsThread for better packing. r=erahm
This takes 16 bytes off of the allocated size of each instance.

MozReview-Commit-ID: AhfN6MWvVL1

--HG--
extra : rebase_source : badc6ab690f2c4e0184ac0b51b29f81fb11279c6
extra : absorb_source : 0f685515a6946c89e9467c8b1e8548c989b1907b
extra : histedit_source : 7bfb5db39b23c1d262819c22a6e5fcd884c52504
2018-07-21 16:00:02 -07:00
Kris Maglione 8a135e1872 Bug 1477512: Part 4 - Add memory reporter for thread kernel stack sizes. r=erahm
We don't have a way to determine these at runtime, but for Windows and Linux,
the values are known and predictable.

MozReview-Commit-ID: 57LMJLzl762

--HG--
extra : rebase_source : 415690574116d549171097cb9e33834e4d4a9a4f
extra : absorb_source : 4678306b020999f52dcf770d3907d79f1f38b249
extra : histedit_source : 0d0f3cb62b9f64322876fe568ccd62893e6ad4b1%2Ccaca0524b930cf93608565ec06247aa0f4fee7e2
2018-07-21 15:12:11 -07:00
Kris Maglione 1044b14dd3 Bug 1477512: Part 3 - Add memory reporter for thread heap overhead. r=erahm
This adds reporting for heap overhead from nsThread and PRThread wrappers, as
well as thread event queues. It does not, currently, include overhead from
PlatformThread or js::Thread wrappers.

MozReview-Commit-ID: 6DkvbbkjHXm

--HG--
extra : rebase_source : 79df7172387fa1f952c43b06db644390be6f0d8a
2018-07-21 14:27:15 -07:00
Kris Maglione 7c232c3f91 Bug 1477512: Part 2 - Add memory reporting functions to nsThread. r=erahm
MozReview-Commit-ID: 9wlNLaY9y8I

--HG--
extra : rebase_source : 20e95400be62aa4ec524a00c6ad65aa5fbdd18bd
2018-07-21 14:17:23 -07:00
Kris Maglione 9b66e8f0f3 Bug 1477512: Part 1 - Add memory reporter functions to thread event queues. r=erahm
MozReview-Commit-ID: J4EdwUWfyPK

--HG--
extra : rebase_source : 4731cec2d04531d6b519fc076cb53f962b4f9f6f
2018-07-21 14:16:50 -07:00
Kris Maglione 6d0a3d4c78 Bug 1477512: Part 0 - Remove unused nsThread::mEventObservers array. r=erahm
This was moved out of nsThread in bug 1350432, but some dead code was left
behind.

MozReview-Commit-ID: BOhykHyIEPp

--HG--
extra : rebase_source : 21d4f95a019ba10851fba1efc588d6c2678aed85
2018-07-21 13:21:12 -07: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
Kris Maglione fde39b49d5 Bug 1477579: Part 2 - Use nsID* rather than nsID for mFactories hash keys. r=froydnj
Our factory registrations already require that we store nsID pointers, which
we generally handle by using pointers to static data, or arena allocating a
copy of a dynamic ID.

Since we already have viable pointers to these IDs, there's no reason to store
an entire second copy for our hash key. We can use the pointer, instead, which
saves 16 bytes per entry.

MozReview-Commit-ID: 6MgKrXRSHv4

--HG--
extra : rebase_source : 8d41a3fc5bc1ffe88af998bf9a0ba9ac3331a085
2018-07-21 19:09:25 -07:00
Kris Maglione 5302f88f24 Bug 1477579: Part 1 - Use literal strings for statically registered contract ID keys. r=froydnj
Most of our components are static, and registered using literal C strings. For
those components, we currently use a nsDependentCString as a key when creating
a hash entry, which leads to an unnecessary duplication. Using literal
CStrings instead avoids the duplication.

MozReview-Commit-ID: 5DOUF8ZQMlh

--HG--
extra : rebase_source : 57d151df64e29ee756f290e7eb047610b567ef04
2018-07-22 10:54:56 -07:00
Coroiu Cristina 3628e073f1 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-07-24 00:46:46 +03:00
Coroiu Cristina 44141cfda4 Merge inbound to mozilla-central a=merge 2018-07-24 00:43:44 +03:00
Brian Hackett 7cb270f8b8 Bug 1465452 Part 9 - Allow warnings and errors to be printed without affecting the recording, r=froydnj.
--HG--
extra : rebase_source : a032f66dfebebd320691d95b54c0925f74030c9d
2018-07-23 14:59:34 +00:00
Brian Hackett ecc6572b9d Bug 1207696 Part 8f - Ensure that PL and PLD hashtables have consistent iteration order when recording/replaying, r=froydnj.
--HG--
extra : rebase_source : 5ed9fb1339c88f99214bc4159eefa34383263e94
2018-07-23 14:47:55 +00:00
Brian Hackett 52b33afe4e Bug 1207696 Part 7 - Ensure deterministic interaction of GC with CC and object references, r=smaug.
--HG--
extra : rebase_source : 5d9e7ebd1dc242ca648193ed1f27ae91d19006de
2018-07-23 14:46:37 +00:00
Brian Hackett 474e450289 Bug 1207696 Part 5l - Don't trace refcounts while recording or replaying, r=froydnj.
--HG--
extra : rebase_source : 7e410db1606f7b0fedd6a4483da908e6244ec6b5
2018-07-23 14:40:18 +00:00
Brian Hackett a1fe1635ef Bug 1207696 Part 5k - Don't generate debugger runnables on GC events, r=fitzgen.
--HG--
extra : rebase_source : e514a0190845a6bd7846ff7040457c1677d00ed4
2018-07-23 14:39:48 +00:00
Brian Hackett da3fee20ba Bug 1207696 Part 5j - Don't add GC events to timelines when recording or replaying, r=mccr8.
--HG--
extra : rebase_source : 1c600ce8918a3b343864c8a3606a4de5d25b87f6
2018-07-23 14:38:49 +00:00
Brian Hackett a2c32c4529 Bug 1207696 Part 5c - Don't dispatch runnables for GC or finalization when under the GC and recording or replaying, r=mccr8.
--HG--
extra : rebase_source : 6ff636989ac0c053b17b06510350ebc48ecc0096
2018-07-23 14:36:37 +00:00
Brian Hackett 049bcdf766 Bug 1207696 Part 5a - Disable incremental GC when recording or replaying, r=mccr8.
--HG--
extra : rebase_source : a98389408b8aecd95323a7f56f2e286f7f6ce43d
2018-07-23 14:35:17 +00:00
Gurzau Raul 19e302fb18 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-24 12:52:06 +03:00
Jonathan Kingston 3a5e700ad1 Bug 1392710 - Add use counters for marquee events. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D2209

--HG--
extra : moz-landing-system : lando
2018-07-23 22:45:26 +00:00
Cosmin Sabou fea686b1f6 Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824)
Backed out changeset 27c7daabd1a3 (bug 1265824)
Backed out changeset 7c90215a2eca (bug 1265824)
Backed out changeset c141fb67cf9a (bug 1265824)
Backed out changeset 239ab9f9ef52 (bug 1265824)
Backed out changeset 39ae151b3d8c (bug 1265824)
Backed out changeset 71b23fbe1fec (bug 1265824)
Backed out changeset 295dd1a6a09f (bug 1265824)
Backed out changeset 6aecd088e02c (bug 1265824)
Backed out changeset bf9d73b214fc (bug 1265824)
2018-07-23 19:36:37 +03:00
Brindusan Cristian 0e26947580 Backed out changeset 9a8f58cb7315 (bug 1441059) for geckoview failures on multiple files. 2018-07-23 21:03:26 +03:00
Nathan Froyd 0c5c5f4d2f Bug 1468514 - make resizing PLDHashTable smarter; r=erahm
The current code for resizing PLDHashTable modifies the cached hash for
all entries in the old hash table.  This is unnecessary, because we're
going to throw away the old hash table shortly, and inefficient, because
writing to memory we're never going to use again just wastes time and
memory bandwidth.  Instead, let's avoid the write by pulling out the
cached key and doing the necessary manipulation on local variables,
which is probably slightly faster.
2018-07-23 10:30:57 -05:00
Dylan Roeh fb453eafdf Bug 1441059 - Make nsILoadURIDelegate async to preserve the order of GeckoSession.loadUri() calls. r=snorp,bz
This alters nsILoadURIDelegate.loadURI() to return a Promise rather than spinning the event loop to synchronously return a boolean, and alters nsDocShell::InternalLoad to allow for those changes by re-calling itself if necessary based on the resolution of the promise.
2018-07-23 10:12:18 -05:00
Brian Hackett 3354a96d8d Bug 1465287 Part 8 - Allow spawning recording/replaying child processes and saving recordings, r=jld,mrbkap.
--HG--
extra : rebase_source : 1da4b1a7e485cfdafb38318860546ce3d0552815
2018-07-22 11:52:42 +00:00
Brian Hackett 846c8527a6 Bug 1465452 Part 14 - Record refcount changes for runnables, r=froydnj.
--HG--
extra : rebase_source : 34a8d17d8a3f894b47c20f5c07e48e97c79c12a7
2018-07-21 14:36:56 +00:00
Brian Hackett 54c917ef76 Bug 1465452 Part 13 - Avoid recording some timer thread state, r=froydnj.
--HG--
extra : rebase_source : f5a2e514099be1221960fb91de83d827e2121801
2018-07-21 14:36:02 +00:00
Brian Hackett 18ac75a5f8 Bug 1465452 Part 12 - Record refcount changes for abstract threads, r=froydnj.
--HG--
extra : rebase_source : a5602fe654f5ac62e33f5277c5d3f632e08d2222
2018-07-21 14:35:23 +00:00
Brian Hackett 2f0f16c25a Bug 1465452 Part 11 - Record refcount changes for pipe input/output streams, r=erahm.
--HG--
extra : rebase_source : 4c5f16a40e92688a3724da10c341dc4961911038
2018-07-21 14:34:51 +00:00
Brian Hackett 91398f534f Bug 1465452 Part 10 - Don't record atom table atomic, r=froydnj.
--HG--
extra : rebase_source : df483c29e518c0937d34317ba36b00383f2d39ad
2018-07-21 14:34:13 +00:00
Brian Hackett c29d3cce40 Bug 1465452 Part 8 - Don't record logging state, r=froydnj.
--HG--
extra : rebase_source : 6e48fdaa36184c3344d34cecb6ce947b5f0e0644
2018-07-21 14:33:38 +00:00
Brian Hackett b65c22bb28 Bug 1465452 Part 2 - Allow nsISupports subclasses to record/replay their refcount changes, r=froydnj.
--HG--
extra : rebase_source : c67e1da8a34c6b6bf6e40087da85c599f2aaeaf9
2018-07-21 14:29:15 +00:00
Brian Hackett 38e406e8a5 Bug 1465452 Part 1 - Allow platform mutexes to specify whether they are recorded, r=froydnj.
--HG--
extra : rebase_source : 5270a2370717577d454eb00d92be224635495be3
2018-07-21 14:28:21 +00:00
Brian Hackett 27848cf545 Bug 1207696 Part 4m - Don't record some threading atomics, r=froydnj.
--HG--
extra : rebase_source : 9e717d9087b4bea7693b0b7fe256740db74389d9
2018-07-21 14:27:32 +00:00
Brian Hackett 312bcb5d90 Bug 1207696 Part 4l - Don't record some debugging/statistics atomics, r=froydnj.
--HG--
extra : rebase_source : 401fdf6385e81b72d2ceee84b5ee1a9aac056aaa
2018-07-21 14:26:58 +00:00
Brian Hackett fa9ad309f5 Bug 1207696 Part 4k - Don't record deadlock detector lock, r=froydnj.
--HG--
extra : rebase_source : 5291d3efd086ff2cd7879e93fd36ef796af3ded1
2018-07-21 14:26:15 +00:00
Brian Hackett 4be736018d Bug 1207696 Part 4b - Make recording optional in mozilla mutexes and monitors, r=froydnj.
--HG--
extra : rebase_source : c00f199b38c6bdd47ed1793edf2ce90fbf2ff420
2018-07-21 14:22:54 +00:00
Bobby Holley 4d4dfa4633 Bug 1476987 - Eliminate nsXPTCVariant::ptr. r=nika
MozReview-Commit-ID: JCazltUuMBf

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

--HG--
extra : moz-landing-system : lando
2018-07-21 01:25:37 +00:00
Doug Thayer f0121c2b2b Bug 1265824 - Add StaticMonitor r=froydnj
For the IPC work monitoring when textures become unlocked, we
need a Monitor equivalent of StaticMutex - this implements that.

MozReview-Commit-ID: IceQNeqVQ8f

--HG--
extra : rebase_source : b05f8fe9b87e47e57ef8450c91edfdd9244d3287
2018-06-29 15:27:22 -07:00
Doug Thayer f460428e9c Bug 1265824 - Add StaticMonitor r=froydnj
For the IPC work monitoring when textures become unlocked, we
need a Monitor equivalent of StaticMutex - this implements that.

MozReview-Commit-ID: IceQNeqVQ8f

--HG--
extra : rebase_source : 184750cfde201ef0ce7e70301761e3e51e82b3a3
2018-06-29 15:27:22 -07:00
Robert Bartlensky 06d2e947d6 Bug 1476313: Fix DEAD_STORE errors in xpcom/reflect/xptcall/md/unix/*. r=mccr8
MozReview-Commit-ID: 29GpsKzXQhq

--HG--
extra : rebase_source : 25e5028f0aadb3cbf8f3e50e3b3af1cf8dc827f2
2018-07-19 11:36:42 +01:00
Tiberius Oros 7d1f9f312f Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-20 12:58:57 +03:00
Tiberius Oros 10e6320abc Merge inbound to mozilla-central. a=merge 2018-07-20 12:56:59 +03:00
Edgar Chen 4024c1e21e Bug 1413418 - Give the last chance to consume micro task queue during the final cycle collection; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D2121

--HG--
extra : moz-landing-system : lando
2018-07-19 16:38:33 +00:00
Bogdan Tara 217447d26d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-20 00:53:24 +03:00
Jean-Yves Avenard 1b724d418f Bug 1476729 - Wrap object in RefPtr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D2243

--HG--
extra : moz-landing-system : lando
2018-07-19 19:23:16 +00:00
Kris Maglione 4d3e4a0894 Bug 1476828: Part 1 - Reduce the default thread manager thread stack size. r=erahm f=froydnj
MozReview-Commit-ID: cRED4r0xAb

--HG--
extra : rebase_source : 1d648a5c91e802554f044c395a39be8e7f30419b
2018-07-19 14:27:42 -07:00
Nathan Froyd 6026bc4fec Bug 1471347 - part 2 - store an nsCString for SharedLibrary::mBreakpadId; r=njn
Similar to the previous part, we convert mBreakpadId to an nsCString to
avoid issues with locale-dependent std::string operations.

There are a lot of non-profiler changes here because a bunch of things
depend on the SharedLibrary object that the profiler defines.
2018-07-19 10:32:07 -04:00
Kris Maglione 2e3f19a497 Bug 1475899: Follow-up: Temporarily disable thread stack size assertion on Android. r=bustage 2018-07-18 18:04:40 -07:00
Kris Maglione f4f437793d Bug 1475899: Part 5 - Add thread stack memory reporter for Windows. r=erahm,aklotz
MozReview-Commit-ID: Bv6OPmUhl5Y

--HG--
extra : source : fbf0e4b12c8e05cabca321d352df32735b8baec9
extra : absorb_source : ce7cd1f176760f895b18426981117c665ed0aba0
2018-07-17 13:09:45 -07:00
Kris Maglione 1dbd559f77 Bug 1475899: Part 4 - Add memory reporter for committed thread stack sizes on Linux. r=erahm
Later patches add support for Windows. OS-X will need a follow-up.

MozReview-Commit-ID: DDd6uir4KzM

--HG--
extra : source : b4394660fde2b05e972c491246570d8f79d8a7c6
extra : absorb_source : 063bc5db64faa9311ac9db99259cd477fb8fcf7e
2018-07-14 02:21:30 -07:00
Kris Maglione fb98e4016d Bug 1475899: Part 3 - Add helper for parsing memory mappings on Linux. r=erahm,jld
The only real way to get memory mapping information on Linux is to read and
parse /proc/self/maps, and infer information about a specific pointer based on
its contents.

This patch adds a helper which parses the entire contents of smaps, and
returns an array of objects describing each region. It also updates resident
unique reporter to use that helper. Later patches use it to map stack base
addresses to VM regions, and report their usage data.

MozReview-Commit-ID: 8VUu1kMT77L

--HG--
extra : source : e89ebe1f22f28d2b667514cb66d39606136a2f58
extra : absorb_source : 86ad16750144e02b9fbe84390eeab6c1917b379d
2018-07-14 02:20:55 -07:00
Kris Maglione b8f2812701 Bug 1475899: Part 2 - Store stack base pointer for nsThreads on Linux. r=erahm,jld
This change stores the base allocation address and actual allocated stack size
(as opposed to the requested size, which may be 0), so that we can map them to
VM regions in a memory reporter.

MozReview-Commit-ID: IZbbyQ9pKHr

--HG--
extra : source : 391b97f0e5c029880d4a1ae697463cfcb8839116
2018-07-14 02:28:05 -07:00
Kris Maglione 9b7d0838b7 Bug 1475899: Part 1 - Track live nsThreads and add a method of enumerating them. r=erahm
This will allow us to enumerate active threads in order to report their
memory.

MozReview-Commit-ID: IExELSkFdwB

--HG--
extra : source : 2916b5e05b6d100e91448f21cb4082e41a86e87c
2018-07-14 02:19:59 -07:00
Brindusan Cristian 9cde10a0a1 Backed out 5 changesets (bug 1475899) for build bustages on /workspace/build/src/xpcom/base/MemoryMapping.cpp. CLOSED TREE
Backed out changeset fbf0e4b12c8e (bug 1475899)
Backed out changeset b4394660fde2 (bug 1475899)
Backed out changeset e89ebe1f22f2 (bug 1475899)
Backed out changeset 391b97f0e5c0 (bug 1475899)
Backed out changeset 2916b5e05b6d (bug 1475899)
2018-07-19 02:02:40 +03:00
Kris Maglione 4dab7b4343 Bug 1475899: Part 5 - Add thread stack memory reporter for Windows. r=erahm,aklotz
MozReview-Commit-ID: Bv6OPmUhl5Y

--HG--
extra : rebase_source : b159db438a3c1a7b9d2bbb11f36100f9a89d567e
2018-07-17 13:09:45 -07:00
Kris Maglione 3d58783354 Bug 1475899: Part 4 - Add memory reporter for committed thread stack sizes on Linux. r=erahm
Later patches add support for Windows. OS-X will need a follow-up.

MozReview-Commit-ID: DDd6uir4KzM

--HG--
extra : rebase_source : a28826d3331d057f4d35bec56da7738a727d9768
2018-07-14 02:21:30 -07:00
Kris Maglione c13f3c0a1d Bug 1475899: Part 3 - Add helper for parsing memory mappings on Linux. r=erahm,jld
The only real way to get memory mapping information on Linux is to read and
parse /proc/self/maps, and infer information about a specific pointer based on
its contents.

This patch adds a helper which parses the entire contents of smaps, and
returns an array of objects describing each region. It also updates resident
unique reporter to use that helper. Later patches use it to map stack base
addresses to VM regions, and report their usage data.

MozReview-Commit-ID: 8VUu1kMT77L

--HG--
extra : rebase_source : e9c233aa828b57efa5c0c154cdb9c7d049cc3312
2018-07-14 02:20:55 -07:00
Kris Maglione 9ce29230ec Bug 1475899: Part 2 - Store stack base pointer for nsThreads on Linux. r=erahm,jld
This change stores the base allocation address and actual allocated stack size
(as opposed to the requested size, which may be 0), so that we can map them to
VM regions in a memory reporter.

MozReview-Commit-ID: IZbbyQ9pKHr

--HG--
extra : rebase_source : 1b61bfd63931ce9e2bf9a71905468336971d0956
2018-07-14 02:28:05 -07:00
Kris Maglione 7d18889141 Bug 1475899: Part 1 - Track live nsThreads and add a method of enumerating them. r=erahm
This will allow us to enumerate active threads in order to report their
memory.

MozReview-Commit-ID: IExELSkFdwB

--HG--
extra : rebase_source : 94b63857357639b201b85bdd7bfc4fbe1d4b7f62
2018-07-14 02:19:59 -07:00
Paolo Amadini dc49387df8 Bug 1472555 - Part 5 - Remove the listbox layout. r=bz,surkov
MozReview-Commit-ID: Bx1p1nTurCz

--HG--
extra : rebase_source : 6910e500f30eb42b45032dbab85a3dc9c014390b
2018-07-18 11:23:32 +01:00
Chris Peterson 1c725fea47 Bug 1469769 - Part 7: Remove NS_NOTREACHED definition. r=froydnj
MozReview-Commit-ID: IwzSGKF3Osk

--HG--
extra : source : a204fa73d06079b3fb4824e8e79942ab4518fc16
extra : histedit_source : 2378e1fd4ffdbc1af1b1d3a739ecf2e3de7d22cf
2018-06-17 22:34:23 -07:00
Calixte Denizet cfaea27109 Bug 1473531 -- Disable gtest storage_DeadlockDetectorTest.storage_Sanity5DeathTest for macosx ccov build.
Summary: GTest is permafailing because of this test (GTest is always running over 1200s).

Reviewers: froydnj

Reviewed By: froydnj

Bug #: 1473531

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

--HG--
extra : rebase_source : 07413c4d7ba4eb6bd1439f292bd489a775dab61b
2018-07-17 21:24:12 +03:00
Jan de Mooij ef23676856 Bug 1475699 - Support invoking JS-implemented XPIDL methods/attributes marked as [implicit_jscontext]. r=mccr8 2018-07-17 18:11:03 +02:00
Emilio Cobos Álvarez 6b1dec4b78 Bug 1473804: Don't lie to AutoTArray::EnsureCapacity. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D1995

MozReview-Commit-ID: 350uWaD49tS
2018-07-17 10:23:47 +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
Emilio Cobos Álvarez 09e04b0f0f Bug 1475980: A moved table should be empty. r=froydnj
MozReview-Commit-ID: 7K9wNGhIhaD
2018-07-16 18:06:37 +02:00
Valentin Gosu 5bd326c5f5 Bug 1412081 - Add ability to blacklist file paths on Unix platforms r=mayhemer
--HG--
extra : rebase_source : 6894f5c3df745519e5e9db5b7bf6f004922152d1
2018-06-20 02:52:12 +02:00
Eric Rahm cf21a1de96 Bug 1442765 - Part 2: Switch nsTraceRefcnt's hashtables to use xpcom hashtables. r=mccr8
--HG--
extra : rebase_source : 5fecdd86a3ef27d211cb43d4c602162db7554f2f
2018-03-05 16:50:00 -08:00
Eric Rahm e63e92aa34 Bug 1442765 - Part 1: Add intptr_t hashkey type. r=froydnj
This adds a hashkey that operates on a uintptr_t.

--HG--
extra : rebase_source : e10b00f7735bf63cb578d18acd03c3f3e919e304
2018-03-20 17:52:16 -07:00
Jan de Mooij 594a3aa6d4 Bug 1475177 - Change sendCommand xpcshell function to only accept plain JSFunction callbacks. r=evilpie 2018-07-16 14:02:16 +02:00
Kris Maglione b744713e4e Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : intermediate-source : 7c03b7dd00e9675f9ac045ed1ea733eb0486904f
extra : absorb_source : c79df6bd9ebbec3454fcca1a81cbfa540ad91a3e
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 544ff4257f38fae99a800276d06eb0d719882ca2
2018-07-13 11:06:58 -07:00
Kris Maglione f071708db7 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : intermediate-source : ff41551f5ff1b98b72ed771a6f2a3f66a8b79a57
extra : absorb_source : c9fe7423fcbb47655b05209b44fb02b69b272d07
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : b98b792791274f00a5e649c82dc25043cc1d699a
2018-07-02 15:01:25 -07:00
Masayuki Nakano 5c3723acb2 Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan
Some callers of PLDHashTable::Search() use const_cast, some others are not
const methods due to non-const PLDHashTable::Search().

This patch removes const_cast from the former and mark some methods of the
latter const.

MozReview-Commit-ID: C8ayoi7mXc1

--HG--
extra : rebase_source : 2cba0339756e3278ba6e5f0e8a11e68217a61d34
2018-07-13 19:01:53 +09:00
Masayuki Nakano 78077d5b3c Bug 1475461 - part 1: Mark PLDHashTable::Search() and called by it as const r=Ehsan
PLDHashTable::Search() does not modify any members.  So, this method and
methods called by it should be marked as const.

MozReview-Commit-ID: 6g4jrYK1j9E

--HG--
extra : rebase_source : eda6c50c538fec0e8c09cb2ba629735eea6ec711
2018-07-13 16:56:29 +09:00
Eric Rahm 599ee96a71 Bug 1474636 - Report memory used by nsMemoryReporterManager. r=njn
This adds reporting of nsMemoryReporterManager's internals. Currently we just
report the weak and strong ref hashtables which have shown up in DMD reports.

The new entry is '/explicit/memory-reporter-manager'.

--HG--
extra : rebase_source : ab785a96a0dd52a4e09718bea015363cdf2c9c8a
extra : source : 86ba30c70a27ab73f096fe88d2005aad8470ee05
2018-07-10 15:38:52 -07:00
Ciure Andrei 1a3643ede0 Backed out 1 changesets (bug 1474636) for test_crash_with_memory_report.js failure CLOSED TREE
Backed out changeset 86ba30c70a27 (bug 1474636)
2018-07-12 02:21:33 +03:00
Eric Rahm e2148bdfde Bug 1474636 - Report memory used by nsMemoryReporterManager. r=njn
This adds reporting of nsMemoryReporterManager's internals. Currently we just
report the weak and strong ref hashtables which have shown up in DMD reports.

The new entry is '/explicit/memory-reporter-manager'.

--HG--
extra : rebase_source : 53e4cbf127101489edfe85f31088cd049369cef8
extra : histedit_source : 1575adfcfb9d6492a51ab84cf417e07466068939
2018-07-10 15:38:52 -07:00
Gurzau Raul cf965b1f59 Merge inbound to mozilla-central. a=merge 2018-07-12 01:04:09 +03:00
Jan de Mooij c542e6498e Bug 1474522 - Change PrepareScriptEnvironmentAndInvoke to always take a global object instead of an arbitrary scope. r=bholley
js-ctypse now passes the context's current global instead of the closure function it's calling.
2018-07-11 11:44:52 +02:00
Jacek Caban 52efb2adb3 Bug 1443471 - Take clang mingw into account in moz.build files r=glandium
MozReview-Commit-ID: 2vKiHjmI9Hn

--HG--
extra : rebase_source : 0a527700795ab624926ca4d6de9ec33ab59f31a6
2018-06-25 20:01:39 +02:00
Cosmin Sabou 26e792fe42 Merge autoland to mozilla-central. a=merge 2018-07-11 00:50:32 +03:00
Boris Zbarsky 8f7c90d6be Bug 1473149. Add an external string variant that keeps a DynamicAtom alive. r=njn,rwood
The change to call AsStatic() in SetKnownLiveAtom is drive-by performance cleanup.
2018-07-10 11:21:42 -07:00
Tarek Ziadé 0538cd57e2 Bug 1472668 - Don't reset performance counters when reading their values - r=baku
We're changing the counters behavior since they are not notifications anymore.
In the new behavior they don't get reset when they are retrieved,
so we can have several consumers via the promise.

If the values overflow, we let the wrapping occur (unsigned values).

MozReview-Commit-ID: 1adkszScYo4

--HG--
extra : rebase_source : cd554ad4cfa643b09f75bb07e38b5d35e08cf470
2018-07-10 10:06:41 +02:00
Kris Maglione 94f26a6578 Bug 1457728: Support tri-state comparators in nsTArray. r=erahm
MozReview-Commit-ID: FC9GPsJJ03K

--HG--
extra : source : e2d3d7bb9d1f7150ec3be7f8507977f7378ec541
extra : amend_source : 23fe2a504342c2b548e1f01fc80b662ee16443dd
2018-04-28 15:15:04 -07:00
Andreea Pavel be1d77cb98 Backed out changeset e2d3d7bb9d1f (bug 1457728) for build bustages at build\build\src\xpcom\ds\nsTArray.h(807) on a CLOSED TREE 2018-07-07 22:55:25 +03:00
Kris Maglione cd92626ded Bug 1457728: Support tri-state comparators in nsTArray. r=erahm
MozReview-Commit-ID: FC9GPsJJ03K

--HG--
extra : rebase_source : e2384e8f98b76a55aece2358528e9d9cf0272e80
extra : histedit_source : 6d0d89de11127fafd62dda2b860a50ccbbfb583d
2018-04-28 15:15:04 -07:00
Brendan Dahl 133e16ecf4 Bug 1449791 - Remove platform support of overlays. r=bz
The following was removed:
- the main meat of the overlays and interface in XULDocument
- all overlay observers and forward references
- the notion of a master document
- XUL overlay provider
- manifest parsing of overlay attribute
- references to "overlay" atom
- restrictions on persistence (only need because of overlays)
- unused code that the above referenced

I also attempted to update comments that referenced overlays, but there is still
some work to be done here.


MozReview-Commit-ID: 8lrirzcgSuJ

--HG--
extra : rebase_source : 25b4e1d3fb2af6f02d894887271fd345c9c2083b
2018-03-28 18:20:04 -07:00
Gabriele Svelto 016baeca8b Bug 1468207 - Use the new timer-based available memory tracker on Win32; r=dmajor
--HG--
extra : source : 9028b2953c7d4fcf90c12586d4077daef4335419
2018-07-04 21:06:07 +02: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 230d3ee242 Bug 1460022: Part 12 - Update XPCOM to use revised DLL interceptor interface; r=froydnj 2018-06-27 11:52:18 -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 576052018b Bug 1460022: Part 12 - Update XPCOM to use revised DLL interceptor interface; r=froydnj 2018-06-27 11:52:18 -06:00