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

1326 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 9f2dd4775e Bug 1407468 - Replace multiple !JS_STANDALONE with MOZ_WIDGET_TOOLKIT. r=mshal
--HG--
extra : rebase_source : 4f9f9f583c3422ed0f8d1d65ea8e7575bd9baf2c
2017-10-05 14:50:01 +09:00
Jeff Walden a3d9df23d5 Bug 1407137 - Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj
--HG--
extra : rebase_source : 6afed8e85fcf8801144a1a34ea07f590baa0f5e0
2017-10-10 10:19:31 -07:00
Jeff Walden be56429c85 Bug 1402344 - Update mfbt-double-conversion to the latest upstream rev. r=froydnj
--HG--
rename : mfbt/double-conversion/source/LICENSE => mfbt/double-conversion/double-conversion/LICENSE
rename : mfbt/double-conversion/source/README.md => mfbt/double-conversion/double-conversion/README.md
rename : mfbt/double-conversion/source/bignum-dtoa.cc => mfbt/double-conversion/double-conversion/bignum-dtoa.cc
rename : mfbt/double-conversion/source/bignum-dtoa.h => mfbt/double-conversion/double-conversion/bignum-dtoa.h
rename : mfbt/double-conversion/source/bignum.cc => mfbt/double-conversion/double-conversion/bignum.cc
rename : mfbt/double-conversion/source/bignum.h => mfbt/double-conversion/double-conversion/bignum.h
rename : mfbt/double-conversion/source/cached-powers.cc => mfbt/double-conversion/double-conversion/cached-powers.cc
rename : mfbt/double-conversion/source/cached-powers.h => mfbt/double-conversion/double-conversion/cached-powers.h
rename : mfbt/double-conversion/source/diy-fp.cc => mfbt/double-conversion/double-conversion/diy-fp.cc
rename : mfbt/double-conversion/source/diy-fp.h => mfbt/double-conversion/double-conversion/diy-fp.h
rename : mfbt/double-conversion/source/double-conversion.cc => mfbt/double-conversion/double-conversion/double-conversion.cc
rename : mfbt/double-conversion/source/double-conversion.h => mfbt/double-conversion/double-conversion/double-conversion.h
rename : mfbt/double-conversion/source/fast-dtoa.cc => mfbt/double-conversion/double-conversion/fast-dtoa.cc
rename : mfbt/double-conversion/source/fast-dtoa.h => mfbt/double-conversion/double-conversion/fast-dtoa.h
rename : mfbt/double-conversion/source/fixed-dtoa.cc => mfbt/double-conversion/double-conversion/fixed-dtoa.cc
rename : mfbt/double-conversion/source/fixed-dtoa.h => mfbt/double-conversion/double-conversion/fixed-dtoa.h
rename : mfbt/double-conversion/source/ieee.h => mfbt/double-conversion/double-conversion/ieee.h
rename : mfbt/double-conversion/source/strtod.cc => mfbt/double-conversion/double-conversion/strtod.cc
rename : mfbt/double-conversion/source/strtod.h => mfbt/double-conversion/double-conversion/strtod.h
rename : mfbt/double-conversion/source/utils.h => mfbt/double-conversion/double-conversion/utils.h
extra : rebase_source : 2d03850dcd1db749f0debecffec2e870acd1b958
2017-10-09 22:15:37 -07:00
Jean-Yves Avenard a81f8e9be1 Bug 1406793 - Make IsWindows* methods thread-safe. r=froydnj
MozReview-Commit-ID: 9AmhHv2g983

--HG--
extra : rebase_source : c814d15bdbfacdbe48fe7705e41a8c8878339a9a
2017-10-09 10:36:23 +02:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Chris Peterson 7bbe4a40e6 Bug 1405582 - Span: avoid repeated calls to size(). r=hsivonen
MozReview-Commit-ID: BKFrbvEt57l

--HG--
extra : rebase_source : 9aeb6fd018da5b8623f14ab927bd786c29ae56ae
extra : source : c5bedfde8b9dc2929fc14cfc2dc816e5f08b4ad8
2017-09-19 13:18:38 -07:00
Chris Peterson a48326552c Bug 1405582 - Span: delete implicit constructors for char* and char16_t*. r=froydnj,hsivonen
Delete Span's implicit constructors for char* and char16_t* pointers to avoid accidental construction in cases where a pointer does not point to a zero-terminated string. Use the MakeStringSpan() function instead.

I deleted both the const and non-const char* and char16_t* constructors, in the name of cross-compiler consistency. If we only delete the const char* and char16_t* constructors, for some reason, MSVC complains that `Span<char> s(charArray)` uses a deleted constructor while clang nor gcc permit it. I don't know if this is a compiler bug in MSVC or clang and gcc.

Also, do not permit MakeSpan() for string literals (const char and char16_t arrays) because the Span length would include the zero terminator, which may surprise callers. Use MakeStringSpan() to create a Span whose length that excludes the string literal's zero terminator or use the MakeSpan() overload that accepts a pointer and length and specify the string literal's full length.

The following Span usages are prevented:

  Span<const char> span("literal"); // error
  Span<char> span(charArray); // error

  Span<const char> span;
  span = "literal"; // error
  span = charArray; // error

  MakeSpan("literal"); // error

The following Span usages are still permitted:

  assert(MakeStringSpan("literal") == 8); // OK: span length is calculated with strlen() and excludes the zero terminator
  MakeStringSpan(charArray); // OK: span length is calculated with strlen() and excludes the zero terminator
  MakeSpan(charArray); // OK: span length is the char array size including any zero terminator

MozReview-Commit-ID: Et71CpjsiyI

--HG--
extra : rebase_source : f6f8bdb28726f0f2368fdfdd039fb1d7dcf2914e
extra : source : 0547d8924ffc7713d6cf32cc06eeeaf00e0d69a3
2017-09-20 00:38:07 -07:00
Jim Blandy d68a13309e No bug: RollingMean.h doc fix. DONTBUILD r=kentuckyfriedtakahe
--HG--
extra : rebase_source : ea6ed30a67a1b0d3d19048b3c2b61857514371da
extra : amend_source : 3dc9b5c144c565ca9b90914de626c15e610aa372
2016-12-20 23:11:30 -08:00
Sebastian Hengst 9187795579 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 74cERYrHFIG
2017-09-28 11:44:21 +02:00
Tom Ritter 86d478e605 Bug 1402355 Require TLS_OUT_OF_INDEXES to be defined before ThreadLocalKeyStoragewill be defined on Windows r=glandium
ThreadLocalKeyStorage uses Thread Local APIs that are declared in
processthreadsapi.h (although it's more common to just include
windows.h). If a caller wants to use this class, it is their
responsibility to include an appropriate header before including
ThreadLocal.h


MozReview-Commit-ID: GO5dHKVWpZO

--HG--
extra : rebase_source : ff8d6cda1eed7bd9d54745c869b4e47a895b605a
2017-09-27 15:09:23 -05:00
Luke Wagner bb375a16d4 Bug 1329019 - Allow specifying capacity to Vector::replaceRawBuffer (r=froydnj)
MozReview-Commit-ID: 9Eq6PR53n4i
2017-09-22 10:34:24 -05:00
Luke Wagner 231c33a9fe Bug 1329019 - Vector::podResizeToFit should update reserved (r=froydnj)
MozReview-Commit-ID: CkoNRjxmjom
2017-09-22 10:33:36 -05:00
Mats Palmgren b00f969bb5 Bug 1356936 - Use __builtin_add/sub/mul_overflow() where available to optimize CheckedInt. r=waldo,ehsan
MozReview-Commit-ID: ARw6zNelpSk
2017-09-21 18:24:10 +02:00
Dimitry Andric f2d86a8b30 Bug 1399412 - Work around clang assertion by wrapping lz4.c in an extern C block. r=froydnj
MozReview-Commit-ID: LLgSbJadbyJ

--HG--
extra : amend_source : 08d7908fe6807db654411fc291bccc98496d4275
2017-09-13 09:43:00 -04:00
Wes Kocher ff68b95b87 Merge inbound to central, a=merge
MozReview-Commit-ID: ClVRh99eIUo
2017-09-14 00:03:28 -07:00
Sebastian Hengst 123fb86836 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-14 00:15:34 +02:00
Matt Woodrow a56e3551a2 Bug 1397056 - Add Contains and a return parameter to Remove for SmallPointerArray. r=froydnj
* * *
[mq]: fix

MozReview-Commit-ID: 5laM7PQLP7X
2017-09-12 14:11:47 -04:00
Mike Hommey 087c1cda52 Bug 1399031 - Add a Tls{Get,Set}Value-based ThreadLocal implementation for Windows. r=froydnj
--HG--
extra : rebase_source : 13a407d35973ba2ed6da29195f5ce8a2c0f7cff4
2017-09-12 16:04:17 +09:00
Mike Hommey 97e87fc179 Bug 1399031 - Expose pthread_{get,set}specific-based TLS whether "native" TLS is supported or not. r=froydnj
There are use cases for wanting a specific TLS implementation
independently of whether __thread or thread_local are supported.
This is one step in that direction, making the
pthread_{get,set}specific-based implementation available independently.

We still keep everything under the mozilla::detail namespace because
it's still better if people don't try to use mozilla::ThreadLocal
directly.

--HG--
extra : rebase_source : 095b95a577b85efaaf2f3c0b7c3ac968ff711738
2017-09-12 15:37:31 +09:00
Kevin Hsieh a0a376f2f1 Bug 1396026 - Update OTS to accept Awami Nastaliq. r=froydnj,jfkthame
MozReview-Commit-ID: EvF3YDhuwNn

--HG--
extra : rebase_source : 20046aa4f2695f923574bf00207f06a113d1f246
2017-09-07 10:40:59 -07:00
Wes Kocher b1233c7d04 Backed out changeset 371a03aa9b24 (bug 1397056) for build errors in SmallPointerArray.h a=backout CLOSED TREE
MozReview-Commit-ID: FNVPjKmVCWB

--HG--
extra : rebase_source : 41e380e59d9eead945ba515d85c1b9195329bc74
2017-09-12 12:39:09 -07:00
Matt Woodrow 5675f29866 Bug 1397056 - Add Contains and a return parameter to Remove for SmallPointerArray. r=froydnj
* * *
[mq]: fix

MozReview-Commit-ID: 5laM7PQLP7X

--HG--
extra : rebase_source : f1baa7c1581fcc864d2b548989e967f57e24b921
2017-09-12 14:11:47 -04:00
Ryan VanderMeulen 909ebdebd8 Bug 1398021 - Update lz4 to version 1.8.0. r=froydnj 2017-09-12 09:00:37 -04:00
Mike Hommey be1493b6fc Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj
Mozjemalloc uses its own doubly linked list, which, being inherited from
C code, doesn't do much type checking, and, in practice, is rather
similar to DoublyLinkedList, so use the latter instead.

--HG--
extra : rebase_source : 9eb7334b6dde05f9af0eaea4184e532c69d0264e
2017-09-02 08:55:42 +09:00
Mike Hommey 0d8ed2b1a5 Bug 1396723 - Simplify the trait users of DoublyLinkedList need to define. r=froydnj
While the flexibility of the current trait is nice, it's actually not
used to its fullest anywhere, and is boilerplate-y. While it is useful
to be able to put the links anywhere, there's not much usefulness from
being able to split mNext and mPrev.

So instead of a trait that allows to get/set mNext and mPrev
independently, we just use a trait that tells how to get a reference to
a DoublyLinkedListElement from a list element itself.

--HG--
extra : rebase_source : 674277bac4fc979f2e483a77b5ef1495baccc7fe
2017-09-02 08:09:58 +09:00
Mike Hommey 18212266ea Bug 1398543 - Add missing condition in DoublyLinkedList::ElementNotInList. r=froydnj
--HG--
extra : rebase_source : fa07b148bd0d7e7428e70fb8a05edb5792836135
2017-09-10 08:49:56 +09:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Phil Ringnalda bc78097d88 Backed out 2 changesets (bug 1396723) for !ElementAccess::Get(mHead).mPrev assertion failures
Backed out changeset 4f17343164b6 (bug 1396723)
Backed out changeset b744eba9ca78 (bug 1396723)

MozReview-Commit-ID: JbvM6oMxEFl
2017-09-06 21:39:20 -07:00
Mike Hommey 6b7116c52d Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj
Mozjemalloc uses its own doubly linked list, which, being inherited from
C code, doesn't do much type checking, and, in practice, is rather
similar to DoublyLinkedList, so use the latter instead.

--HG--
extra : rebase_source : 1d40653b8117e28d8633134f379540c3c517a306
2017-09-02 08:55:42 +09:00
Mike Hommey b16f4035ba Bug 1396723 - Simplify the trait users of DoublyLinkedList need to define. r=froydnj
While the flexibility of the current trait is nice, it's actually not
used to its fullest anywhere, and is boilerplate-y. While it is useful
to be able to put the links anywhere, there's not much usefulness from
being able to split mNext and mPrev.

So instead of a trait that allows to get/set mNext and mPrev
independently, we just use a trait that tells how to get a reference to
a DoublyLinkedListElement from a list element itself.

--HG--
extra : rebase_source : f84c5799c305a4a3b7dc5deb727a05d4d537bb15
2017-09-02 08:09:58 +09:00
Wes Kocher f66c96f2c8 Backed out 2 changesets (bug 1396723) for build failures in TestDoublyLinkedList.cpp a=backout
Backed out changeset 1c0f9d069ade (bug 1396723)
Backed out changeset 6ca94a450b81 (bug 1396723)

MozReview-Commit-ID: 2w3WTvhpg6J
2017-09-06 14:30:41 -07:00
Mike Hommey d946f42f29 Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj
Mozjemalloc uses its own doubly linked list, which, being inherited from
C code, doesn't do much type checking, and, in practice, is rather
similar to DoublyLinkedList, so use the latter instead.

--HG--
extra : rebase_source : 7f2c03d6ba5c1da5d8badb0de710b7900e9d00c1
2017-09-02 08:55:42 +09:00
Mike Hommey 9a3dd41f50 Bug 1396723 - Simplify the trait users of DoublyLinkedList need to define. r=froydnj
While the flexibility of the current trait is nice, it's actually not
used to its fullest anywhere, and is boilerplate-y. While it is useful
to be able to put the links anywhere, there's not much usefulness from
being able to split mNext and mPrev.

So instead of a trait that allows to get/set mNext and mPrev
independently, we just use a trait that tells how to get a reference to
a DoublyLinkedListElement from a list element itself.

--HG--
extra : rebase_source : b7d502754a764670e291acdd56726948db935497
2017-09-02 08:09:58 +09:00
Kilik Kuo 3d9fbae6bd Bug 1279171 - Do not use WMF when application is in Windows pre-2000 compatibility mode. r=froydnj
MozReview-Commit-ID: BPiz2WWrshF

--HG--
extra : rebase_source : c5e78e94c542a5b00b06e177aa088ad3bb56da57
2017-08-24 11:46:56 +08:00
Kris Maglione 6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Kris Maglione c9899cb3fa Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN

--HG--
extra : rebase_source : 24ad4a54cbd170eb04ded21794530e56b1dfbd82
2017-08-29 21:28:22 -07:00
Kris Maglione 92dcd409a3 Bug 1366511: Part 1 - Allow packing Result<T, nsresult> values into a single word. r=ehsan,nbp
When used as an error value, nsresult should never be NS_OK, which means that
we should be able to safely pack simple nsresult Result values into a single
word.

MozReview-Commit-ID: GJvnyTPjynk

--HG--
extra : rebase_source : ab5a64b545dfbfe9bbef167f8b63ecbf00b16e07
2017-08-31 16:01:43 -07:00
Nick Fitzgerald 9da40f6365 Bug 1277338 - Part 7: Export mozglue when JS_STANDALONE && !jemalloc; r=glandium,sfink
This makes sure that:

* We don't define `MOZ_GLUE_IN_PROGRAM` so that everything in mozglue gets
  defined.

* `MFBT_API`'s symbol export rules match `JS_PUBLIC_API` and `EXPORT_JS_API`.

* We add mozglue to SpiderMonkey's `USE_LIBS` when jemalloc is disabled.
2017-08-31 15:59:13 -07:00
Tom Ritter 92ff663a31 Bug 1393498 Mark the stub_BaseThreadInitThunk as MOZ_NORETURN to silence a warning about a noreturn function not returning r=dmajor,froydnj
/home/worker/workspace/build/src/mozglue/build/WindowsDllBlocklist.cpp:816:1: error: 'noreturn' function does return [-Werror]

MozReview-Commit-ID: SYgPDW0sMV

--HG--
extra : rebase_source : 27b1dda404b3fc5fab95dd524677387bad921751
2017-08-24 22:49:09 -05:00
Tom Ritter 8dbe002119 Bug 1393538 Clean up unused variables in toolkit/ r=smaug
MozReview-Commit-ID: I6r50dqJJHJ

--HG--
extra : rebase_source : f1f773db8f0ec44c1cf6f194973f870b08f6138b
2017-08-24 15:07:59 -05:00
Bill McCloskey f90a87caa9 Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj)
MozReview-Commit-ID: JWBxz3bwgwD
2017-08-25 10:28:23 -07:00
Bill McCloskey 06a265a5bd Bug 1350432 - Add TLS infallible init (r=froydnj)
MozReview-Commit-ID: 9Fgltrw4p8
2017-08-25 10:28:23 -07:00
Nathan Froyd c5fa35746e Bug 1390568 - manually de-virtualize do_QueryReferent; r=ehsan
nsQueryReferent is defined as an nsCOMPtr_helper, which implies that
calling its operator() method requires a virtual call.  While
nsQueryReferent is marked `final`, compiler inlining decisions make it
impossible to de-virtualize the call to operator().  However, we have
many other classes returned by do_* functions that nsCOMPtr handles
directly, requiring no extra virtual calls, and we can give
nsQueryReferent the same treatment.
2017-08-24 20:04:31 -04:00
Tristan Bourvon ba0998ae31 Bug 1380423 - Add static-analysis to enforce strict rules on functions which can run scripts. r=mystor
MozReview-Commit-ID: GGSyq0z5msB
2017-08-08 19:48:53 +03:00
Wes Kocher fb8abb94c7 Merge inbound to central, a=merge
MozReview-Commit-ID: 1mWKzfX4kl
2017-08-23 18:07:24 -07:00
Luke Wagner e59ff0294c Bug 1351488 - Add MOZ_XPCOM_ABI to mfbt (r=froydnj)
MozReview-Commit-ID: Hw3zDX3TOhs

--HG--
extra : rebase_source : 96d93215f9d79e376df25108d0f4d82a178bda28
2017-08-23 10:16:56 -05:00
James Cheng 5a887baca6 Bug 1392885 -Add debug message when misusing the guard object. r=froydnj
MozReview-Commit-ID: 78iFX5qUcTC

--HG--
extra : rebase_source : 320b23d8d6a1fcff7fe6573243f10393f1bf56cf
2017-08-23 11:59:21 +08:00
Xidorn Quan 667a3cb5a4 Bug 1391103 - Align Maybe::mStorage like when the type is in a struct. r=froydnj
MozReview-Commit-ID: 6ArNhZA4Wdf

--HG--
extra : rebase_source : f69ae80c146f2acb308a6c9707aac7ee22f5d992
2017-08-17 09:49:19 +10:00
Sylvestre Ledru 22a57591b0 Bug 1387002 - Replace .size() by .empty() when applicable in mfbt r=froydnj
MozReview-Commit-ID: 9S5oZQkykKv

--HG--
extra : rebase_source : dfc6b9bccb3a388486efb7179a5864b19e0952ec
2017-08-03 12:07:07 +02:00
Tristan Bourvon 2e77c99160 Bug 1374024 - add checker to prevent dangling pointers returned by method calls on temporaries. r=mystor
MozReview-Commit-ID: 9khNt59ONF
2017-07-05 16:14:21 +02:00