Commit Graph

1643 Commits

Author SHA1 Message Date
Steve Fink
c10602d229 Bug 1257982 - [hazards] Inherit template attrs for plain HashMap/HashSet r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D23619

--HG--
extra : moz-landing-system : lando
2019-03-18 21:37:04 +00:00
Boris Zbarsky
e348ad0b6c Improve the documentation around the MOZ_CAN_RUN_SCRIPT analysis. No bug. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23762

--HG--
extra : moz-landing-system : lando
2019-03-16 12:52:33 +00:00
Coroiu Cristina
c5833bc810 Backed out changeset 2f2a20c16289 (bug 1533777) for crashing youtube on request by jya a=backout 2019-03-13 08:52:21 +02:00
Oana Pop Rus
38d2d04978 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-12 06:53:06 +02:00
Jeff Walden
b299df2f1a Bug 1533636 - Don't bother explicitly aligning when XDRing char16_t data: the operations we use to perform the little/native-endian conversion will correctly translate into, or translate out of, unaligned memory. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D22654

--HG--
extra : rebase_source : 2013431c35fff24bb003671dc257005903ff3c07
2019-03-06 13:36:47 -08:00
Alex Gaynor
ca0c1fc191 Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22970

--HG--
extra : moz-landing-system : lando
2019-03-11 13:55:28 +00:00
Jeff Walden
cc8118aa28 Bug 1533636 - Define HashStringUntilZero and HashStringKnownLength template functions for code that wishes to invoke the HashString algorithm on non-pointer iterator types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22652

--HG--
extra : rebase_source : 68359815e1edffc8e2489d6cd817adfbdd628818
2019-03-05 10:11:32 -08:00
Gurzau Raul
7c8d994e63 Backed out 4 changesets (bug 1532253) for Windows bustage at Unified_cpp_netwerk_base2.i_o on a CLOSED TREE.
Backed out changeset 498d0bcc8ce8 (bug 1532253)
Backed out changeset 8e10880ff30b (bug 1532253)
Backed out changeset 0491d225285c (bug 1532253)
Backed out changeset 5384779a3b1f (bug 1532253)
2019-03-11 15:22:39 +02:00
Valentin Gosu
815b481df4 Bug 1532253 - Add NS_NewURIOnAnyThread r=baku!
Differential Revision: https://phabricator.services.mozilla.com/D22137

--HG--
extra : source : d33b895e5ebeef0ade779ad35323d698f710a5a5
extra : intermediate-source : 82c14f26f6de19645d4e0f4a5f4d44eaa99536f3
2019-03-05 14:01:58 +01:00
Jan de Mooij
446dc0db91 Bug 1533070 - Get rid of static initializers in GC.cpp by marking some functions/statics constexpr. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D22335

--HG--
extra : moz-landing-system : lando
2019-03-06 17:38:11 +00:00
Jeff Walden
7b8ce42e6e Bug 1453456 - Remove nsCRT::IsAscii(null-terminated string) in favor of mozilla::IsAsciiNullTerminated. r=froydnj 2019-02-25 12:22:24 -08:00
Nicholas Nethercote
f476546aaa Bug 1530311 - Add a length check to HashTable::reserve(). r=luke
Also add an assertion to a similar function in PLDHashTable.cpp.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 00:08:13 +00:00
Daniel Varga
30780abeeb Merge mozilla-inbound to mozilla-central. a=merge 2019-02-15 03:41:17 +02:00
Mike Hommey
ef3ad686ee Bug 1512504 - Remove support for MSVC. r=froydnj
Consequently, this removes:
- MOZ_LIBPRIO, which is now always enabled.
- non_msvc_compiler, which is now always true.
- The cl.py wrapper, since it's not used anymore.
- CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper.
- NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still
  worked in non-ASCII cases.

This however keeps a large part of detecting and configuring for MSVC,
because we still do need it for at least headers, libraries, and midl.

Depends on D19614

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

--HG--
extra : moz-landing-system : lando
2019-02-14 21:45:27 +00:00
Chris Peterson
8e1848413c Bug 1507049 - Rename MOZ_CRASH_UNSAFE_OOL MOZ_CRASH_UNSAFE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D18515

--HG--
extra : rebase_source : e8ef6eec0f7542bb381e2da81ae6431b2828aabc
extra : source : a8c262b4a2579e6def1b3a5a8220f5197b443e34
2019-02-03 00:09:37 -08:00
Chris Peterson
cedea8a566 Bug 1507049 - Rename MOZ_CrashOOL MOZ_Crash. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D18513

--HG--
extra : rebase_source : 00910ccc380f24a12181fef2a72d84c1170cb9fe
extra : source : d39e75533e61b315c9ee0000ea74eca3bf474f58
2019-02-03 00:00:12 -08:00
Tooru Fujisawa
72222a022c Bug 1524755 - Use ptrdiff_t instead in RangedPtr. r=jwalden 2019-02-08 12:13:23 +09:00
Aaron Klotz
607ac36e06 Bug 1528045: Add detection for Win10 1809 to WindowsVersion.h; r=froydnj 2019-02-05 15:10:11 -07:00
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Nathan Froyd
0d56a7008a Bug 1523949 - part 1 - make MOZ_THREAD_LOCAL name lookups work anywhere; r=erahm
MOZ_THREAD_LOCAL currently assumes its invocations live in the global
namespace, which may not always be true, e.g. when declaring a static
class member whose enclosing class lives in `namespace mozilla` or
similar.  We should qualify the name lookups required to always start
from the global namespace to avoid such problems.
2019-01-30 17:26:27 -05:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Andrew McCreight
9e451b1da0 Bug 1517611 - Cycle collect WebAuthnManager and U2F more. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17026

--HG--
extra : moz-landing-system : lando
2019-01-18 23:21:46 +00:00
David Major
d3a71fc36a Bug 1520241 - Avoid slow sleeps on Windows in TestSPSCQueue.exe r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D16583

--HG--
extra : moz-landing-system : lando
2019-01-16 12:04:13 +00:00
Mike Hommey
70f1ad55e1 Bug 1519307 - Add a new project to build useful parts of breakpad independently. r=froydnj
With `ac_add_options --enable-project=tools/crashreporter` in a
mozconfig, `./mach build` builds minidump_stackwalk, dump_syms
and fileid.

One caveat is that due to limitation in how the build system works
currently, it's cumbersome to keep dump_syms as a host program for
Gecko, and to make it a target program for this project. For now,
keep it as a host program. We're not going to use it on automation,
but it's still convenient to have for quick local builds (I've had
to resort to awful hacks downstream).

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

--HG--
extra : moz-landing-system : lando
2019-01-11 16:01:15 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Olli Pettay
827502c9a8 Bug 1517237 - Make move assignment of RefPtr to have the same behavior as nsCOMPtr's, r=froydnj 2019-01-02 21:44:32 +02:00
Sylvestre Ledru
b2099f351e Bug 1515434 - Only activate the deactivation of -Wc++2a-compat from clang 6 r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15012

--HG--
extra : moz-landing-system : lando
2018-12-19 21:18:46 +00:00
Sylvestre Ledru
bd9482e301 Bug 1509926 - Disable the warning -Wc++2a-compat on some files r=dholbert
Fails with clang trunk:
"type of UTF-8 string literal will change from array of const char to array of const char8_t in C++2a"
otherwise

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

--HG--
extra : moz-landing-system : lando
2018-12-17 06:56:45 +00:00
Sylvestre Ledru
6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Nathan Froyd
0c1169eedc Bug 1508873 - part 3 - reorganize HashTable's internal storage; r=luke
As discussed in the previous commit message, HashTableEntry wastes space
for common entry types.  This commit reorganizes the internal storage to
store all the hashes packed together, followed by all the entries, which
eliminates the aforementioned waste.
2018-12-13 12:21:19 -05:00
Nathan Froyd
6b20e36d68 Bug 1508873 - part 2 - convert HashTable to work primarily in terms of slots; r=luke
HashTableEntry's data layout currently wastes a fair amount of space due
to ABI-mandated padding.  For instance, HashTableEntry<T*> on a 64-bit
platform looks like:

class HashTableEntry {
  HashNumber mKeyHash;
  // Four bytes of wasted space here to pad mValueData to the correct place.
  unsigned char mValueData[sizeof(T*)];
};

This wasted space means that sets of pointers backed by
mozilla::HashTable waste a quarter of their entry storage space.  Maps
of pointers to pointers waste a sixth of their entry storage space.
We'd like to fix this by packing all the cached hashes together,
followed by all the hash table entries.

As a first step to laying out the hash table storage differently, we
have to make HashTable not access entries directly, but go through an
abstraction that represents the key and the entry.  We call this
abstraction "slots".  This commit is similar to the change done for
PLDHashTable previously.

Parts of HashTable still work in terms of Entry; the creation and
destruction of tables was not worth changing here.  We'll address that
in the next commit.
2018-12-13 12:21:19 -05:00
Nathan Froyd
1d59bcc108 Bug 1508873 - part 1 - statically assert alignment for hashtable entries; r=luke
We do this to make our lives easier in later patches; this check
guarantees that we don't need padding between the block of cached hash
values and the block of entries immediately after it.
2018-12-13 12:21:19 -05:00
Cosmin Sabou
46fe1d73a2 Backed out 3 changesets (bug 1508873) for spidermonkey build bustages. CLOSED TREE
Backed out changeset a356b2566ae2 (bug 1508873)
Backed out changeset 4bb5dd072865 (bug 1508873)
Backed out changeset a6657732fdbe (bug 1508873)
2018-12-12 22:09:30 +02:00
Nathan Froyd
ba32deb674 Bug 1508873 - part 3 - reorganize HashTable's internal storage; r=luke
As discussed in the previous commit message, HashTableEntry wastes space
for common entry types.  This commit reorganizes the internal storage to
store all the hashes packed together, followed by all the entries, which
eliminates the aforementioned waste.
2018-12-12 14:57:21 -05:00
Nathan Froyd
27902c8e43 Bug 1508873 - part 2 - convert HashTable to work primarily in terms of slots; r=luke
HashTableEntry's data layout currently wastes a fair amount of space due
to ABI-mandated padding.  For instance, HashTableEntry<T*> on a 64-bit
platform looks like:

class HashTableEntry {
  HashNumber mKeyHash;
  // Four bytes of wasted space here to pad mValueData to the correct place.
  unsigned char mValueData[sizeof(T*)];
};

This wasted space means that sets of pointers backed by
mozilla::HashTable waste a quarter of their entry storage space.  Maps
of pointers to pointers waste a sixth of their entry storage space.
We'd like to fix this by packing all the cached hashes together,
followed by all the hash table entries.

As a first step to laying out the hash table storage differently, we
have to make HashTable not access entries directly, but go through an
abstraction that represents the key and the entry.  We call this
abstraction "slots".  This commit is similar to the change done for
PLDHashTable previously.

Parts of HashTable still work in terms of Entry; the creation and
destruction of tables was not worth changing here.  We'll address that
in the next commit.
2018-12-12 14:57:21 -05:00
Nathan Froyd
05c72d126b Bug 1508873 - part 1 - statically assert alignment for hashtable entries; r=luke
We do this to make our lives easier in later patches; this check
guarantees that we don't need padding between the block of cached hash
values and the block of entries immediately after it.
2018-12-12 14:57:21 -05:00
Henri Sivonen
c58ccc7e2b Bug 1512155 - Introduce a movable type that combines mozilla::UniquePtr<T[]> and its length. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D13795

--HG--
extra : moz-landing-system : lando
2018-12-07 08:28:08 +00:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier
a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Ehsan Akhgari
0ad55ab74f Bug 1510513 - Retain the formatting of MOZ_DEFINE_ENUM_* macros r=sylvestre
These macros tend to be handled quite poorly since the clang-format
tokenizer cannot figure out how to handle them.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:14:19 +00:00
Jeff Walden
5499a179ff Bug 1508725 - Adjust mozilla::FloatingPoint<T>'s definition so only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. r=froydnj
--HG--
extra : rebase_source : fe3e97b77945bcffd5f4415351541fcd5875bdbb
2018-06-07 13:25:12 -07:00
Nathan Froyd
213e4e231d Bug 1509927 - use a little more KnownNotNull placement new in MFBT; r=njn
This change avoids some useless null checks.
2018-11-26 18:51:35 -05:00
Brian Hackett
733258b327 Bug 1505935 Part 4 - Inform the record/replay system about all script compilations, r=jorendorff.
--HG--
extra : rebase_source : cc0d08d1133be5b99c863e6ba5879010b8de084f
2018-11-17 10:55:06 -10:00
Jeff Walden
e36d4a90d5 Bug 1504802 - Translate Unit-relevant offsets into sourceUnits, into char16_t-relevant offsets with respect to the just-computed lineOfContext, when reporting a syntax error and adding a line of context to it. r=arai
--HG--
extra : rebase_source : 6afac624e4ab295a4df74759a4297294c5923006
2018-11-05 18:55:56 -08:00
Aaron Klotz
152c7bf8a5 Bug 1508460: Add specialization for void* to HasFreeLSB; r=froydnj
HasFreeLSB currently fails for any types that map to void*. Unless we fix this,
we can't use certain types as template parameters for mozilla::Result.

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

--HG--
extra : moz-landing-system : lando
2018-11-19 23:56:54 +00:00
Ted Campbell
59d3110a5a Bug 1508180 - Use uppercase macro names in mfbt/RecordReplay.h r=bhackett
Rename MOZ_MakeRecordReplayWrapper to MOZ_MAKE_RECORD_REPLAY_WRAPPER so
that clang-format doesn't mangle code.

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

--HG--
extra : moz-landing-system : lando
2018-11-19 18:52:49 +00:00
Brian Hackett
6afedf5456 Bug 1505935 Part 1 - Rename IsInternalScript API, r=lsmyth.
--HG--
extra : rebase_source : 4e182c0ee98d654dd7755c7c5bce9391d6e04a0f
2018-11-10 15:26:52 -10:00
arthur.iakab
c0b26c4076 Merge inbound to mozilla-central a=merge 2018-11-15 11:54:15 +02:00