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

1470 Коммитов

Автор SHA1 Сообщение Дата
Jeff Walden 9e8165ad5e Add support for char32_t to mozilla::IsIntegral. Found in the process of fixing another bug, no bug and r=me as so unbelievably trivial that it can't possibly deserve anything else
--HG--
extra : rebase_source : 457268f5749afbb84c50b86876df121c693a4e8f
2018-07-12 02:26:49 -07:00
Cameron McCormack 8a2341f976 Bug 1473771 - Part 2: Make LinkedList::Iterator work when element type inherits from multiple LinkedListElement<T>s. r=Waldo
MozReview-Commit-ID: 9dNTsSNyIYK

--HG--
extra : rebase_source : 60de5392ebf857d71e09a1bc7a68cc19edd66263
2018-07-06 10:56:08 +10:00
Cameron McCormack cf90987901 Bug 1473771 - Part 1: Make LinkedList<T>::sizeOfExcludingThis work when element type inherits from multiple LinkedListElement<T>s. r=Waldo
MozReview-Commit-ID: KtqGkRKs68f

--HG--
extra : rebase_source : a4946439813dab4867e80e370e884f851289b4b7
2018-07-06 10:10:09 +10:00
Jeff Walden 90507ffb7a Bug 1426909 - Introduce a new mfbt/Utf8.h header for UTF-8-related functionality, including a UTF-8 code unit type that is compatible with, but doesn't directly interconvert with, |char|. r=froydnj
--HG--
extra : rebase_source : 00760186060d7e72fac783af3fc5595a6057feca
2018-01-11 11:29:53 -07:00
Kris Maglione 2bbae5374b Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS

--HG--
extra : rebase_source : b472fe628018f88a2c4d6b3de4b7143aeca55e14
extra : absorb_source : 5cdeb568cfd2b4a5a767191402e699e61e653b3b
2018-06-29 22:50:41 -07:00
Jacek Caban 03565d5406 Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj
MozReview-Commit-ID: 6aKGtK7B74z

--HG--
extra : rebase_source : 708e16c62c91aa482bffd6dbc74f6bfe944d4fec
2018-06-26 13:06:17 +02:00
Benjamin Peterson 1c04f1eba7 Bug 1470641 - Update already_AddRefed constructor comment. r=froydnj
RIP B2G.

--HG--
extra : rebase_source : 90de1c8ef7a273e87f869ad054a46aae23153a2f
2018-06-22 23:25:19 -07:00
Andi-Bogdan Postelnicu 4a5d0dd615 Bug 1453795 - MFTB - Initialize member fields in classes/ structures. r=waldo
--HG--
extra : rebase_source : e091acb3a9f60695b87ab9e3d348c5978680d2f8
2018-06-15 13:49:31 +03:00
Jeff Walden 5b41e725ee Bug 1469003 - Convert SegmentedVector to use a manually aligned |unsigned char| array for storage, using a clean C++11 idiom. r=froydnj
--HG--
extra : rebase_source : a456526a6596ce4e204d1f64a211c12cd9d41223
2018-06-18 11:55:41 -07:00
Jeff Walden df09db05b8 Bug 1465808 - Update double-conversion to latest upstream. rs=froydnj
--HG--
extra : rebase_source : 89aeedf516a89aa5d6189bdbde8d1466e59f01f6
2018-06-12 22:12:42 -07:00
Alessio Placitelli 1ecfce2746 Bug 1467759 - Escape all the property names in JSONWriter. r=froydnj
Scalar property names (e.g. IntProperty) are already escaped correctly.
This patch escapes the collection property names (e.g. StartObjectProperty)
as well (and adds test coverage for it).

MozReview-Commit-ID: 68kkjPb2ZN7

--HG--
extra : rebase_source : b42939ccebb71fc73914ff595803b2d6c7df2715
2018-06-08 19:50:25 +02:00
Jeff Walden 784f62bdc2 Bug 1466928 - Make mozilla::SmallPointerArray compatible with the C++ object model. r=froydnj
--HG--
extra : rebase_source : e803add704e25f981bd8609405fc6f2967f40b05
2018-06-07 03:53:54 -07:00
Jeff Walden c55625cdec Bug 1467336 - Implement mozilla::IsAscii to detect pure ASCII characters. r=froydnj
--HG--
extra : rebase_source : 1f6de2745234766d676178bdeafb9b82e48e51b5
2018-06-07 02:17:10 -07:00
Jeff Walden 701bad47cd Bug 1438212 - Implement mozilla::IsFloat32Representable using an algorithm that handles NaN correctly and doesn't sometimes invoke undefined behavior. r=froydnj
--HG--
extra : rebase_source : b4246ea818046b1e4100b90a3a371a866ea2b098
2018-06-06 16:03:47 -07:00
Jeff Walden 7bbef1fafc Bug 1465981 - Use memcpy instead of union-arm-punning (which has implementation-defined, desired behavior with gcc and presumably clang, and is not known to have problems on MSVC, but potentially could with other compilers) in BitwiseCast. r=froydnj
--HG--
extra : rebase_source : 686363576c84710ae0181afc32b05dee8b40a59b
2018-06-06 16:03:47 -07:00
André Bargull f7acf7bc9c Bug 1466909 - Use AddLvalueReference for UniquePtr's operator*(). r=froydnj
--HG--
extra : rebase_source : df072aca7e79ce534c3bc620a352adfc92fbf245
2018-06-07 07:27:22 -07:00
Eric Rahm 51f133db96 Bug 1467048 - Add a version of CorruptionCanary for statics. r=froydnj
This adds 'CorruptionCanaryForStatics', which as the name implies is suitable
for use in objects that are statically declared. It has a trivial destructor
which allows us to avoid the need for static constructors.

--HG--
extra : amend_source : 27f8eff9ead21fde9f5f5d17f16c322d2c995a27
2018-06-06 14:50:17 -07:00
arthur.iakab fd0ee7c9b8 Merge inbound to mozilla-central a=merge 2018-06-06 00:58:30 +03:00
Eric Rahm 572911732c Bug 1436768 - Add debug code to LazyLogModule. r=froydnj
--HG--
extra : rebase_source : bd70f788eb986b73eb70460337d5d7c3423c4e8a
extra : source : 82ef13b02416c8519178a7e8e08791b7b8dfcbdb
2018-05-09 11:16:27 -07:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

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

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

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

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Henri Sivonen c3fcb6ab2c Bug 1466475 - Make mozilla::Span produce aligned bogus pointers per new Rust rules. r=froydnj
MozReview-Commit-ID: JFVSRu53Geh

--HG--
extra : rebase_source : a9436aef554b6e892195324744f135d2b65086d5
2018-06-04 12:59:46 +03:00
Daniel Stenberg 0506997177 bug 1464999 - make SplayTree.remove clear mRight and mLeft r=froydnj
... to allow a user to remove() an entry, update the values and
re-insert() it into a tree.

MozReview-Commit-ID: GrSY90Q3ugt

--HG--
extra : rebase_source : 9d8876064f9e3d5b9e4249936a4c999b74fcc9ad
2018-05-29 09:41:24 +02:00
Paul Adenot 515134e9a0 Bug 1454385 - Add a single producer single consumer lock and wait free queue to mfbt/. r=froydnj
MozReview-Commit-ID: 6Dq0GQtYgv2

--HG--
extra : rebase_source : 67bc4245a61c15738e3a6467a03b41e9e29af9ce
2018-04-13 17:14:05 +02:00
Csoregi Natalia acd92af57e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-23 01:02:30 +03:00
Alex Gaynor 3511d14f46 Bug 1462912 - fixed BufferList::Extract to handle the case where the call consumes the entirety of the BufferList; r=froydnj
MozReview-Commit-ID: 1LWODn8JaNL

--HG--
extra : rebase_source : 29cea444a49eb5e2ade33214ff52d6419949337e
2018-05-22 13:04:59 -04:00
Kris Maglione d92e63a9a9 Bug 1463299: Add RefPtr::forget special case for ambiguous nsISupports casts. r=bz
When we use RefPtr with nsISupports sub-classes, it's usually because the type
cannot be unambiguously cast to nsISupports. We already have a ToSupports
generic function to resolve ambiguity in these cases, so we may as well use
it here.

MozReview-Commit-ID: FaHhPKAPn6j

--HG--
extra : rebase_source : dd8f3707bdebedfe559aed0caf2c3b0c49163735
extra : histedit_source : 9805787a169329b9c739dfa456cfe6a61a22b7d7
2018-05-21 17:23:10 -07:00
shindli 4ff26c26f4 Merge inbound to mozilla-central. a=merge 2018-05-22 00:29:52 +03:00
Nathan Froyd b29b040b36 Bug 1410186 - turn Maybe assertions into diagnostic assertions; r=bkelly
We out-of-line the relevant functions because assertions can generate
quite a bit of code, and we'd rather let the compiler determine if these
functions should be inlined now.
2018-05-21 10:03:59 -04:00
Bogdan Tara 2aa42f2cab Backed out changeset c82274a23aea (bug 1410186) on request by igoldan a=backout 2018-05-21 16:53:30 +03:00
Masatoshi Kimura 1c639cc220 Bug 1463011 - Constexpr-ify mozilla::NotNull r=njn
MozReview-Commit-ID: EyXmRskjtfU

--HG--
extra : rebase_source : bd86a8126d1f2098c436f5e61106857c8b068c04
2018-05-21 23:03:16 +09:00
Alex Gaynor a13531321e Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj 2018-05-18 18:59:00 -04:00
Gurzau Raul 841689c6d7 Backed out changeset 1d0aa0c581cf (bug 1456189) for bustage on selftest.py on a CLOSED TREE 2018-05-18 01:00:26 +03:00
Alex Gaynor bb3ec615d6 Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj 2018-05-17 17:16:43 -04:00
Tom Ritter 4c56c059bb Bug 1460645 Avoid the thread_local keyword for MinGW and instead use __thread r=froydnj
MozReview-Commit-ID: 5RPwQVatThs

--HG--
extra : rebase_source : 0ad9a69f51529c6a35dc76555e4cb5d37a087a28
2018-05-10 11:11:19 -05:00
Noemi Erli 5ffb086f4a Backed out changeset 98e368b5c4be (bug 1463035) for failures in tools/profiler/tests/chrome/test_profile_worker.html on a CLOSED TREE 2018-05-22 03:16:44 +03:00
Mike Hommey c51cee4730 Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r=jchen
For some reason, GNU as is not happy with the assembly generated after
bug 1238661 anymore on Debian armel.

OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
workaround anymore, so let's just kill it.

--HG--
extra : rebase_source : 6fd06832136d4f840c65f74b63f1c1bec48d525d
2018-05-21 12:04:22 +09:00
Nathan Froyd d0ba1c83de Bug 1410186 - turn Maybe assertions into diagnostic assertions; r=bkelly
We out-of-line the relevant functions because assertions can generate
quite a bit of code, and we'd rather let the compiler determine if these
functions should be inlined now.
2018-05-15 16:34:59 -04:00
Ryan VanderMeulen 1e5a06e4b0 Bug 1460316 - Update lz4 to version 1.8.2. r=froydnj 2018-05-09 12:16:28 -04:00
Aaron Klotz 84feb9c523 Bug 1460057: Update WindowsVersion with latest Windows 10 build numbers; r=froydnj 2018-05-07 17:24:51 -06:00
Gerald Squelart 9b8e47ab12 Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj
NonDereferenceable denotes the intent that a pointer will (most likely) not be
dereferenced, but its numeric value may be used for e.g. logging purposes.

Dereferencing operations are explicitly disabled to avoid unintentional misuses.
Casting is still possible between related types (same as with raw pointers),
but pointers stay safely stored inside NonDereferenceable objects. These casts
do not trigger `clang++ -fsanitize=vptr` errors.

MozReview-Commit-ID: 5885pB7hSFR

--HG--
extra : rebase_source : 3c4011da64d84f1b19991742b76bafbffa90d590
2018-03-28 17:48:53 +11:00
Masatoshi Kimura 2b6d5d5d7e Bug 1442275 - Implement a path charset agnostic wrapper for PR_LoadLibraryWithFlags. r=froydnj
MozReview-Commit-ID: 5rjmcv4kz9x

--HG--
extra : rebase_source : b57c7e79ceaa2dc3d65f52ee8f665c640dd1f41c
2018-04-24 00:31:53 +09:00
Jon Coppeard edcb15ad07 Bug 1456875 - Add const iterators for LinkedList r=Waldo 2018-04-30 10:21:31 +01:00
Jeff Walden 04d21ccac0 Bug 1451248. r=jorendorff, r=bz
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
Alex Gaynor 3e8fd2dc07 Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8
There are three things we want to be true:

a) If the child sends a large value and the parent can't allocate enough space
   for it we use an infallible allocation so the parent dies with an OOM.
b) If a fuzzer generates (huge-length, small-data) we don't try to allocate
   huge-length bytes; knowing that the read will fail.
c) No fuzzer-specific branches in the core IPC serialization code.

Finally, this makes (huge-length, small-data) consistent with other cases where
the data is potentially truncated: ReadParam returns false.

MozReview-Commit-ID: 6nDKrw5z4pt

--HG--
extra : rebase_source : 58372d29139e9545a6ed2852c7243affeab6fdb7
2018-04-19 16:53:29 -04:00
Nathan Froyd 9362ad6e83 Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald
Otherwise, one can do thinkos like:

  MakeScopeExit(...);

and the scope exiting function will execute much earlier than the
intended:

  auto guard = MakeScopeExit(...);
2018-04-18 12:14:18 -04:00
Margareta Eliza Balazs dbef13782c Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout
Backed out changeset ac685df07bfc (bug 1451278)
Backed out changeset 5944ccd5060d (bug 1451278)
2018-04-16 21:41:03 +03:00