Aaron Klotz
2bf8b9acc9
Bug 1368150: Add IsWindows10BuildOrNewer to MFBT; r=froydnj
...
MozReview-Commit-ID: 6lxZWDPc6ZQ
I need to be able to distinguish between builds of Windows 10. Unfortunately the
stuff that I am working with cannot be sorted out via feature detection.
--HG--
extra : rebase_source : 6da46f31815b2938d9a7a984473ed01c35b8a59d
2017-06-06 11:14:58 -06:00
Mike Hommey
05a36a133a
Bug 1369622 - Add a static_assert when no variadic argument is given to MOZ_CRASH_UNSAFE_PRINTF. r=froydnj
...
If MOZ_CRASH_UNSAFE_PRINTF is only given a format string, it means
either arguments are missing, or MOZ_CRASH should be used instead.
Hint at that with a static_assert.
--HG--
extra : rebase_source : 355c37deb8b007e61939a4c657e411d110e7bbe7
2017-06-02 15:11:47 +09:00
Mike Hommey
8914ace4ce
Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
...
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count
the number of arguments, we can now use MOZ_ARG_COUNT directly for that.
--HG--
extra : rebase_source : 1064e4cc231863dc4aff83ee6bc90d318b4be418
2017-06-02 15:06:34 +09:00
Mike Hommey
38a6de0fe3
Bug 1369622 - Fix MOZ_FOR_EACH with an empty list. r=froydnj
...
I'm not sure how I tested MOZ_FOR_EACH in bug 1368932, but it turns out
it doesn't work with an empty list, despite
MOZ_PASTE_PREFIX_AND_ARG_COUNT now supporting 0 arguments.
Macros can be tricky, and it ends up being easier to make things work
cross-compiler with a separate macro that does the counting, and
(re)building MOZ_PASTE_PREFIX_AND_ARG_COUNT on top of that. Then
MOZ_FOR_EACH ends up working as expected with an empty list.
So this adds a MOZ_ARG_COUNT macro that counts the number of variadic
arguments it's given, and derives MOZ_PASTE_PREFIX_AND_ARG_COUNT from
it.
And this adds a testcase validating that MOZ_FOR_EACH works properly
with an empty list as a result.
--HG--
extra : rebase_source : 309371d87bd1561fbd2153f44fc1256185045d23
2017-06-02 14:53:54 +09:00
Sylvestre Ledru
e3c965eb6f
Bug 1368079 - Enable the diagnostic assert when MOZ_DEV_EDITION is set r=froydnj,glandium
...
MozReview-Commit-ID: Dxi5jTGcrow
--HG--
extra : rebase_source : 959956094e6e64a50e307e48b11bb8791940d297
2017-06-05 23:47:02 +02:00
Gerald Squelart
f5f8abf86a
Bug 1338389 - Tests for Variant's detail::Nth and detail::SelectVariantType - r=froydnj
...
MozReview-Commit-ID: 4QXdctmhNze
--HG--
extra : rebase_source : ddbdf8c79f49ebb02c9e68dca0be4a6ee9ad11f4
2017-06-06 16:59:00 +12:00
Gerald Squelart
a7c6eed190
Bug 1338389 - VariantType<T> and VariantIndex<N> permit unambiguous and variadic Variant construction - r=froydnj
...
MozReview-Commit-ID: 3rDya9ZBG6Y
--HG--
extra : rebase_source : d59375a7c805d6d470f5074669f3db5a609eb518
2017-05-08 11:26:07 +12:00
Gerald Squelart
78bc93af40
Bug 1338389 - Allow repeated Variant types, but prevent is/as/extract<T> for them - r=froydnj
...
MozReview-Commit-ID: 1yEUuGsht8k
--HG--
extra : rebase_source : fed56f264821e87cc474e6686e6dc203c147ac9b
2017-05-10 15:49:38 +12:00
Gerald Squelart
6015fbb5ac
Bug 1338389 - Index-based Variant::is<N>, as<N>, and extract<N> - r=froydnj
...
MozReview-Commit-ID: C5iga0Eb1tH
--HG--
extra : rebase_source : d88cf614318cc8544d7ab52315e015a7ca4e5efd
2017-05-08 11:09:21 +12:00
Gerald Squelart
6f9c60dc02
Bug 1365802 - In VariantImplementation::moveConstruct, move the aRhs rvalue to the next moveConstruct - r=froydnj
...
Without the Move(), a temporary copy is created and passed as rvalue.
MozReview-Commit-ID: B3MXz6yzO39
--HG--
extra : rebase_source : 897493da0dfac983449da3853fe60bd6ac93117b
2017-05-18 15:39:40 +12:00
Xidorn Quan
32d247eb90
Bug 1162335 - Remove already_AddRefed::MatchNullptr. r=froydnj
...
MozReview-Commit-ID: 1hxUm9xdNhK
--HG--
extra : rebase_source : 73b9c196ca196d8d1226acb86855ad8b0b5dd4a4
2017-06-01 15:01:40 +10:00
Mike Hommey
c1becb4a54
Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
...
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.
(*) the build fails, but not directly thanks to the static_assert it
expands to.
--HG--
extra : rebase_source : 8f0fe7b352c89b5a3ec87f42ef5464c370c362ef
2017-05-25 15:47:21 +09:00
Phil Ringnalda
18c2e05936
Backed out changeset df0ddb9c9bef (bug 1368079) for making DevEdition fail to build
...
MozReview-Commit-ID: BUE6UL0WiDW
2017-05-30 23:10:48 -07:00
Tom Ritter
815d66d2b3
Bug 1368406 Use non-Windows Printf Format Specifiers in MinGW r=froydnj
...
MinGW applies the gnu_printf format attribute, which expects
non-Windows format specifiers. These macros were not designed
to handle MinGW.
MozReview-Commit-ID: HuJrK43Bg1A
--HG--
extra : rebase_source : 6ccc1b2f4ab0e71584f442e86d94322e2c6382fb
2017-05-29 00:38:57 -05:00
Sylvestre Ledru
6ef28ca31d
Bug 1368079 - Enable the diagnostic assert when MOZ_DEV_EDITION is set r=glandium
...
MozReview-Commit-ID: 1f6Kwne6zYf
--HG--
extra : rebase_source : 14f3697fe4ad7dcd356fdc1424ffc62f4ea9897b
2017-05-30 09:26:02 +02:00
Jonathan Kew
67ca6e1f88
Bug 1365928 - patch 1 - Add a MOZ_NONNULL_RETURN annotation to mfbt/Attributes.h. r=froydnj
2017-05-22 19:00:19 +01:00
Mike Hommey
c59dbe56d2
Bug 1365460 - Define MOZ_DIAGNOSTIC_ASSERT_ENABLED when MOZ_DIAGNOSTIC_ASSERT does something. r=froydnj
...
--HG--
extra : rebase_source : 557203426da1804504588198e0f8bccb3232858e
2017-05-18 11:14:17 +09:00
Bas Schouten
5a025e5c1f
Bug 1331718 - Part 2: Add unit tests for SmallPointerArray. r=froydnj
...
MozReview-Commit-ID: 7xdQfv7Dpph
2017-05-10 05:07:38 +02:00
Bas Schouten
cad9560440
Bug 1331718 - Part 1: Add small pointer array. r=froydnj
...
MozReview-Commit-ID: EapU5nBw1d3
2017-05-10 05:07:37 +02:00
Nathan Froyd
e5fbad82a1
Bug 1363426 - part 3 - minor cleanups to Atomics.h; r=erahm
...
We can move the <atomic> #include to its normal place in the file now,
as well as merging some namespace blocks at the toplevel.
2017-05-10 09:58:28 -04:00
Nathan Froyd
c0a40e46f7
Bug 1363426 - part 2 - remove unneeded MOZ_HAVE_CXX1_ATOMICS; r=erahm
...
Now that we can use <atomic> everywhere, we don't need to test whether
the standard library we're using has <atomic> support.
2017-05-10 09:58:28 -04:00
Nathan Froyd
fe42aa0b9d
Bug 1363426 - part 1 - remove #ifdeffery in Atomics.h; r=erahm
...
Every platform where we use GCC has <atomic>, so there's no need to use
GCC-specific __sync* intrinsics anymore. The <atomic> header may
generate better code for several operations, as well.
2017-05-10 09:58:28 -04:00
Carsten "Tomcat" Book
cfae756c43
Backed out changeset 1b9ecb9b9fe8 (bug 1331718)
2017-05-10 12:09:08 +02:00
Carsten "Tomcat" Book
157a9fcde2
Backed out changeset 4527bd35cc4e (bug 1331718)
2017-05-10 12:09:06 +02:00
Bas Schouten
e8f8394b4e
Bug 1331718 - Part 2: Add unit tests for SmallPointerArray. r=froydnj
...
MozReview-Commit-ID: 7xdQfv7Dpph
2017-05-10 05:07:38 +02:00
Bas Schouten
1e05e1f138
Bug 1331718 - Part 1: Add small pointer array. r=froydnj
...
MozReview-Commit-ID: EapU5nBw1d3
2017-05-10 05:07:37 +02:00
Tom Tromey
aa6e054b71
Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj
...
This annotates vsprintf-like functions with MOZ_FORMAT_PRINTF. This may
provide some minimal checking of such calls (the GCC docs say that it
checks for the string for "consistency"); but in any case shouldn't
hurt.
MozReview-Commit-ID: HgnAK1LiorE
--HG--
extra : rebase_source : 9c8d715d6560f89078c26ba3934e52a2b5778b6a
2017-05-04 12:10:19 -06:00
Kris Maglione
7d8720d597
Bug 1359653: Part 3 - Add a clear() method and move asssignment operator to AutoCleanLinkedList. r=waldo
...
MozReview-Commit-ID: 2bUTMPviJzg
--HG--
extra : source : b49bd726c8a6e955c672df17b2b9134ab3ad34d5
2017-05-02 17:54:18 -07:00
Sebastian Hengst
d8a3163a9b
Backed out changeset b49bd726c8a6 (bug 1359653)
2017-05-06 11:02:32 +02:00
Kris Maglione
e514005e37
Bug 1359653: Part 3 - Add a clear() method and move asssignment operator to AutoCleanLinkedList. r=waldo
...
MozReview-Commit-ID: 2bUTMPviJzg
--HG--
extra : rebase_source : c02a5c07030a8c2d5ad47a586a5af8f02e5ec2f6
2017-05-02 17:54:18 -07:00
Carsten "Tomcat" Book
fdc689ba16
merge mozilla-inbound to mozilla-central a=merge
2017-05-05 15:17:26 +02:00
Olli Pettay
a991315918
Bug 1358761 - dummy handling for return values in test, r=bustage
2017-05-05 10:43:37 +03:00
Olli Pettay
0096f25b51
Bug 1358761 - replace PurpleBlock with SegmentedVector to reduce indirect memory accesses when calling suspect, r=mccr8,nfroyd
...
--HG--
extra : rebase_source : e74be6bfb9efbba9361d2ce3c22518379a332200
2017-05-05 00:49:22 +03:00
Eric Rahm
14b9ff6984
Bug 935809 - Part 0: Include assertion header in DoublyLinkedList.h. r=waldo
...
MozReview-Commit-ID: 4G37uslYlOb
2017-05-03 19:22:39 -07:00
Sebastian Hengst
4183907e15
Backed out changeset ab81a462fcd4 (bug 935809) for jetpack and devtools failures, e.g. in browser_markers-docloading-03.js. r=backout
2017-05-03 00:22:28 +02:00
Eric Rahm
e9ead4b2e8
Bug 935809 - Part 0: Include assertion header in DoublyLinkedList.h. r=waldo
...
MozReview-Commit-ID: 4G37uslYlOb
2017-05-02 14:21:52 -07:00
Jim Chen
a1a22f23e5
Bug 1357873 - Fix up 64-bit Android macros in IntegerPrintfMacros.h; r=Waldo
...
On 64-bit Android, the inttypes.h macros for [u]int_fastN_t types (e.g.
int_fast16_t) use "d", "u", etc. as the format specifier, but the types
themselves are defined as `long`, `unsigned long`, etc. This patch
redefines the macros as `PRId64`, `PRIu64`, etc. to provide correct
behavior.
2017-05-01 14:46:00 -04:00
Carsten "Tomcat" Book
824aad1190
Backed out changeset 19ea645f562e (bug 1357799) on request
2017-04-27 15:09:53 +02:00
Cameron McCormack
a5624c6f9d
Bug 1356103 - Part 1: Add WeakPtrTraits to allow SupportsWeakPtr classes to opt in to more permissive thread ownership assertions. r=bholley
...
MozReview-Commit-ID: 62pJc2N8aIo
--HG--
extra : rebase_source : b1fed73b2c03d1cc1261a674a44fe578c2fe7d99
2017-04-30 12:14:06 +08:00
Iris Hsiao
0a6db9e69f
Backed out 12 changesets (bug 1356103) for build bustage at PostTraversalTask.h
...
Backed out changeset 9fb487252c28 (bug 1356103)
Backed out changeset 301237c65945 (bug 1356103)
Backed out changeset 7bc3a4861a39 (bug 1356103)
Backed out changeset 2f383d89184b (bug 1356103)
Backed out changeset a03112e1c9d5 (bug 1356103)
Backed out changeset c60b4c9cbd83 (bug 1356103)
Backed out changeset 34280baeaabe (bug 1356103)
Backed out changeset 31a0881cfb47 (bug 1356103)
Backed out changeset 529d037f9c33 (bug 1356103)
Backed out changeset 1c7831db6b07 (bug 1356103)
Backed out changeset 559f06e32df3 (bug 1356103)
Backed out changeset 784865d234cd (bug 1356103)
2017-05-04 17:56:25 +08:00
Cameron McCormack
e94f4a51be
Bug 1356103 - Part 1: Add WeakPtrTraits to allow SupportsWeakPtr classes to opt in to more permissive thread ownership assertions. r=bholley
...
MozReview-Commit-ID: 62pJc2N8aIo
--HG--
extra : rebase_source : b1fed73b2c03d1cc1261a674a44fe578c2fe7d99
2017-04-30 12:14:06 +08:00
Iris Hsiao
15d2d6ea30
Backed out 4 changesets (bug 935809) for build bustage. a=backout
...
CLOSED TREE
Backed out changeset 8a48682a5150 (bug 935809)
Backed out changeset 8260fdc2c008 (bug 935809)
Backed out changeset f53c07293e1f (bug 935809)
Backed out changeset 4176ccbd4970 (bug 935809)
--HG--
extra : amend_source : cb83d78b0bed2e4b41dc5937a2b01008aa8a84bb
2017-04-27 10:13:45 +08:00
Eric Rahm
82094ed7f5
Bug 935809 - Part 0: Include assertion header in DoublyLinkedList.h. r=waldo
...
MozReview-Commit-ID: 4G37uslYlOb
2017-04-26 12:19:54 -07:00
Carsten "Tomcat" Book
8f4e4ca99b
merge mozilla-inbound to mozilla-central a=merge
2017-04-26 08:41:31 +02:00
Myk Melez
017f4a74e5
Bug 1357897 - ensure __has_feature(thread_local) before using it on Mac; r=froydnj
...
Bug 1348419 enabled thread-local storage for Mac, but only Xcode 8+
supports that feature, which busted building with Xcode 7-. This change
fixes that bustage by ensuring a Mac compiler supports the feature
before using it.
2017-04-25 15:23:26 -07:00
Sebastian Hengst
c6d60cc8f8
Backed out changeset 9809ac55fe34 (bug 1357897) for build bustage at ThreadLocal.h:35:67. r=backout on a CLOSED TREE
2017-04-25 21:16:43 +02:00
Myk Melez
4024ee8f8d
Bug 1357897 - ensure __has_feature(thread_local) before using it on Mac; r=froydnj
...
Bug 1348419 enabled thread-local storage for Mac, but only Xcode 8+
supports that feature, which busted building with Xcode 7-. This change
fixes that bustage by ensuring a Mac compiler supports the feature
before using it.
2017-04-25 12:00:47 -07:00
Tom Tromey
66313f92eb
Bug 1349655 - remove sig_safe_t in favor of mozilla::Atomic<uint32_t>; r=djvj,njn
...
Remove the definition of sig_safe_t, which is only used by PseudoStack,
and replace the uses with mozilla::Atomic<uint32_t>.
MozReview-Commit-ID: GcPd9R94Vci
--HG--
extra : rebase_source : dcc05a219d59ffdc0486ef2e7118d888c6a93fda
2017-03-22 13:57:31 -06:00
Jan-Ivar Bruaroey
aa0a07c837
Bug 1354642 - Add MakeRefPtr<> helper class. r=Ehsan
...
MozReview-Commit-ID: es34uMTZ00
--HG--
extra : rebase_source : 8738a70a47cceece1b56b66f741e29275c066d92
2017-04-07 15:08:42 -04:00
David Major
c4a6792abb
Bug 1358169: Fix Span.h constexprs for VS2017. r=froydnj
...
I can't speak for whether the MOZ_SPAN_GCC_CONSTEXPR on operator> is necessary, but I'm going on the assumption that any callers of it must also be in the same bucket of constexpr-ness.
2017-04-20 14:58:38 -04:00
Carsten "Tomcat" Book
7aa21f3b53
merge mozilla-inbound to mozilla-central a=merge
2017-04-20 11:13:07 +02:00
Wes Kocher
2aa3f2f2e2
Merge m-c to autoland, a=merge
2017-04-19 17:17:20 -07:00
Bill McCloskey
fb57ac5b38
Bug 1355178 - Remove unnecessary refcounting from MessageChannel::mPending (r=froydnj)
...
MozReview-Commit-ID: DWEF1ObNmMa
2017-04-19 11:51:14 -07:00
Tom Tromey
f8b4c97867
Bug 1348419 - Use thread_local on XP_WIN and XP_MACOSX; r=froydnj
...
MozReview-Commit-ID: 75dTUk27p94
--HG--
extra : rebase_source : f93d5b063a6ff14d8eb6f5236828450f3f784b8c
2017-03-22 12:04:21 -06:00
Sebastian Hengst
39c052547d
Backed out changeset e39e02b11392 (bug 1348419) for failing at jsutil.cpp(42) with "data with thread storage duration may not have dll interface". r=backout
2017-04-15 01:01:11 +02:00
Tom Tromey
26856534d1
Bug 1348419 - Use thread_local on XP_WIN and XP_MACOSX; r=froydnj
...
MozReview-Commit-ID: 75dTUk27p94
--HG--
extra : rebase_source : e0b3b4c11c6d8e6b9aaa78912c48209ba87a8486
2017-03-22 12:04:21 -06:00
Steve Fink
678a2ca3dc
Bug 1356063 - Make Maybe<T> inherit static analysis annotations from T, r=mystor
...
--HG--
extra : rebase_source : 7f5e41e471b319f0143e9f91a331b1edcafc7359
2017-04-13 11:35:01 -07:00
Henri Sivonen
4064812605
Bug 1353324 - Add const char16_t variant of MakeCStringSpan() and rename both to MakeStringSpan(). r=froydnj.
...
MozReview-Commit-ID: E6LEZpe5H4w
--HG--
extra : rebase_source : dd6fe66be289e94751ecdf34113d79a091c9c8f8
2017-04-04 14:04:14 +03:00
Tom Ritter
fcb35c70f7
Bug 1331349 Fix printf formatting errors in MinGW compilation r=froydnj
...
MozReview-Commit-ID: A4PMABfxzez
--HG--
extra : rebase_source : d0c40a495ad390aeb71ddc81c33daa081f6e0ba7
2017-03-31 00:14:43 -05:00
Henri Sivonen
c514501f1a
Bug 1295611 - Add mozilla::Span. r=froydnj,gerv.
...
MozReview-Commit-ID: HGNDClVctbE
2017-03-31 13:32:18 +03:00
Benjamin Bouvier
1397cfaed9
Bug 1352073: Follow-up: don't use reserved() in opt builds; r=bustage
...
Also fix style to make it match local style.
MozReview-Commit-ID: D2HTik6HwxJ
--HG--
extra : rebase_source : 73d5a6d63597764d904f2d254ced08192871fdc0
2017-03-31 11:01:35 +02:00
Benjamin Bouvier
0eeedcfb9c
Bug 1352073: Fix off-by-one in Vector::insert; r=luke
...
MozReview-Commit-ID: HY0DYSAbi6M
--HG--
extra : rebase_source : 15aaf8576c6c78e1dd097685947507445808ee0c
extra : histedit_source : 9ece90f05a7666784a381be085a82231aef5ef29
2017-03-30 16:20:30 +02:00
Sylvestre Ledru
612d9ada4d
Bug 1357799 - Enable the diagnostic assert during the beta staged roll out period r=bholley
...
MozReview-Commit-ID: KstUhJH0bAz
--HG--
extra : rebase_source : 799023c9a69b0fea86b0204efffe12b560baa6e3
2017-04-19 18:07:04 +02:00
Jeff Gilbert
c0ed980ee2
Bug 1349379 - Clarify when to use already_AddRefed. - r=dbaron,waldo
...
MozReview-Commit-ID: 2MlOhirdzlQ
2017-03-29 13:40:42 -07:00
Terrence Cole
4cd9f1b817
Bug 1277725 - Implement a list class that is both usable and efficient. r=waldo
...
MozReview-Commit-ID: JnhnomQwSja
2016-06-02 09:18:40 -07:00
JW Wang
729d92dc53
Bug 1350790 - Add constexpr to CheckedInt. r=froydnj
...
MozReview-Commit-ID: KNJQcYiBlHM
--HG--
extra : rebase_source : 51609420239d195aaf416c1a18ff028894638775
extra : source : 96678f32ac0a09d911088df18fe4e4e95ba52930
2017-03-27 10:59:31 +08:00
Tom Ritter
da72de1e2e
Bug 1349957 Change reference (in disabled code) to new/correct member r=froydnj
...
MozReview-Commit-ID: IwA2Kro40e2
--HG--
extra : rebase_source : 0bd5f3e85ba36d068f0b23984a1faa5dcd4ccd78
2017-03-23 10:27:25 -05:00
Thinker K.F. Li
48e9a43dc4
Bug 1331173 - Increase header segment capacity for TaskTracer. r=billm
...
--HG--
extra : rebase_source : 3cc829ac53c520896d3f28ddf4a8e27a6eac6fc1
2017-03-10 02:35:00 +01:00
David Major
09f473e5a8
Bug 1345331: Include <intrin.h> at top-level before lz4.c can include it in a namespace. r=Waldo
...
MozReview-Commit-ID: 8CI8JgR3R1L
--HG--
extra : rebase_source : d3e60e458908fb621c3608a2a3f2e08eb739d87f
2017-03-09 15:11:15 +13:00
Nicolas B. Pierron
dccaffb213
Bug 1325073 - Rename mozilla::MakeGenericErrorResult to mozilla::Err. r=Waldo
2017-03-08 13:33:07 +00:00
Carsten "Tomcat" Book
f6885163cd
Merge mozilla-central to mozilla-inbound
2017-03-08 14:28:34 +01:00
Michael Layzell
46ade67ada
Bug 1331434 - Part 2: Add MOZ_MAY_CALL_AFTER_MUST_RETURN and MOZ_MUST_RETURN_FROM_CALLER annotations, r=ehsan
...
MozReview-Commit-ID: 1o2egvdhkqT
2017-03-07 19:06:48 -05:00
Michael Layzell
4689eec07a
Bug 1331434 - Part 1: Add an analysis to require a return after calls to annotated functions, r=ehsan
...
MozReview-Commit-ID: 7NqXap8FdSn
2017-03-07 19:06:48 -05:00
Xidorn Quan
b7ebe87cdc
Bug 1345074 - Add MOZ_FOR_EACH_SEPARATED which adds separator between items. r=Waldo
...
MozReview-Commit-ID: IWqs17MLhHD
--HG--
extra : rebase_source : adc004b185501c9fe8109589fb671cd5a6551002
2017-03-07 22:28:49 +11:00
Jeff Walden
bae8a13c6e
Bug 1341951 - Remove mozilla::AlignedStorage, and inline its sole use into js::jit::RInstructionStorage. r=nbp
2017-02-22 18:27:51 -08:00
Jeff Walden
fceda02d9b
Bug 1287006 - Use |alignas(T) unsigned char mStorage[sizeof(T)]| instead of AlignedStorage2 inside Maybe. r=froydnj
...
--HG--
extra : rebase_source : 59e8039481b332decacd1acc7cf1cb73ec8b78cf
2017-01-30 15:56:04 -08:00
Emanuel Hoogeveen
8867f10c5a
Bug 1338574 - Assertions.cpp can't use MOZ_CRASH_ANNOTATE, so set the crash reason directly. r=froydnj
2017-02-22 15:42:00 -05:00
Jeff Walden
d73ce21741
Bug 1287006 - Adjust media/ code to not pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer. r=jw_wang, r=rjesup
...
--HG--
extra : rebase_source : 176a2afde5772bbdf43f0f6dc8082201acadcf4f
2017-02-13 09:07:40 -08:00
Jeff Walden
8529eb5317
Bug 1338374 - Shrink Vector from (usually) four pointers in size to three when no inline storage is used. r=froydnj
...
--HG--
extra : rebase_source : bc2c7f706305d04954162720b011029c8095229f
2017-01-30 15:56:05 -08:00
Jeff Walden
d5deea2a4f
Bug 1338374 - Make Vector not use AlignedStorage for its inline element storage. r=froydnj, r=keeler
...
--HG--
extra : rebase_source : 81eb5278404b4843ed5a59819f6000f74200aa41
2017-01-30 15:56:05 -08:00
Jeff Walden
8f8272ae04
Bug 1339555 - Make various operator-news into a known-non-null pointer use a ::operator new overload that odesn't null-check. r=froydnj
...
--HG--
extra : rebase_source : cad3ffa778db607bb2ccee2ac42671e60d3c8160
2017-02-14 11:23:18 -08:00
Emanuel Hoogeveen
9c7c14c872
Bug 1338574 - Part 1: Add MOZ_CRASH_UNSAFE_OOL and MOZ_CRASH_UNSAFE_PRINTF to crash with a runtime generated explanation string. r=froydnj
...
--HG--
extra : rebase_source : 3ba633aa77ab96f763ea03a8308c539c9c2aeda0
2017-02-21 18:01:41 +01:00
Emanuel Hoogeveen
4308a12546
Bug 1338574 - Part 0: Pass __LINE__ as an argument to MOZ_REALLY_CRASH() instead of using it directly. r=froydnj
...
--HG--
extra : rebase_source : 1df7776a4627c4af417be78649ba22203dca8026
2017-02-21 18:01:38 +01:00
Tom Tromey
b3223b115f
Bug 1060419 - fix comment in IntegerPrintfMacros.h to reflect Printf.h change, r=froydnj
...
MozReview-Commit-ID: 1Zdi7XNHUHL
--HG--
extra : rebase_source : f9c3cfd96504b232ad25cf1c49f3fcb07f461cc1
2016-12-14 14:16:20 -07:00
Jeff Walden
d7372e37d9
Bug 1338374 - Use alignas/alignof to define Variant's internal raw storage. r=froydnj
...
--HG--
extra : rebase_source : a75613ba7c17ceccf20e6f096a118bfedfa1eb15
2017-01-30 15:56:05 -08:00
Jeff Walden
1811cee01b
Bug 1338374 - Make tl::Min/Max variadic. r=froydnj
...
--HG--
extra : rebase_source : 140441135e9ee1fcde0541e39a19e1a5c47203c8
2017-01-30 15:56:05 -08:00
Jeff Walden
318b206490
Bug 1338374 - Use alignas/alignof, and don't use sizeof where alignof should have been used, in MaybeOneOf. r=froydnj
...
--HG--
extra : rebase_source : eb102c6344a6b2fc5a8c904d3361ac3f6735dd43
2017-01-30 15:56:05 -08:00
Masatoshi Kimura
a35278e9a7
Bug 1325368 - Assume Win7 or later when testing Windows version. r=jimm
...
MozReview-Commit-ID: 718G0htR17H
--HG--
extra : rebase_source : e6f7a3584f03c802218a1de526345e1df1e67cf8
2017-01-29 16:42:46 +09:00
Nicolas B. Pierron
06bb70ebad
Bug 1318677 part 3 - mozilla::Result: Add a new packing strategy to pack small enumerated values in a single word. r=Waldo
2017-02-07 18:57:43 +00:00
Nicolas B. Pierron
60cb2de0a8
Bug 1318677 part 2 - mozilla::Result: Use a single enum to dispatch to the Result implementation. r=Waldo
2017-02-07 18:57:43 +00:00
Nicolas B. Pierron
cc14318018
Bug 1318677 part 1 - Use a smaller mask to remove the error tag. r=jandem
2017-02-07 18:57:42 +00:00
Jonathan Watt
33a6ca0109
Bug 1335780, part 2 - Tests for Maybe<const Type>. r=froydnj
2017-01-03 08:53:05 +00:00
Jonathan Watt
94c9b96404
Bug 1335780, part 1 - Make Maybe<T>::emplace() work when T is const. r=froydnj
2017-01-03 08:53:05 +00:00
Jeff Walden
3c1ae9aa91
Bug 1332797 - Delete the temporary directory used to store the double-conversion clone when all's said and done. r=froydnj
...
--HG--
extra : rebase_source : 838b42e130e757aae6795b41f75e0d04f0644a65
2017-01-26 13:26:40 -08:00
Jeff Walden
cd89862c7a
Bug 1332797 - Note the double-conversion git revision last used when importing double-conversion code. r=froydnj
...
--HG--
extra : rebase_source : 16af43fcda79ffc4743fda12c9ce945ee4fd8a26
2017-01-24 12:56:06 -08:00
Jeff Walden
5a966975cc
Bug 1332797 - Update our double-conversion import using the command |./update.sh d8d4e668ee1e6e10b728f0671a89b07d7c4d45be|. r=generating-script-was-reviewed
...
--HG--
extra : rebase_source : 484d0ba0085c70b1e75790a098cbe4a1a9a0c95b
2017-01-24 09:30:13 -08:00
Jeff Walden
0fdc1cbc93
Bug 1332797 - Make update.sh fail if applying a local patch creates a *.{orig,rej} file. r=froydnj
...
--HG--
extra : rebase_source : 0b774ad1df5a8bc95d4af806f80bb7a2f6f8d738
2017-01-24 09:29:50 -08:00
Jeff Walden
dd137bcf96
Bug 1332797 - Update our various local patches to apply against tip double-conversion. r=froydnj
...
--HG--
extra : rebase_source : 6b785879615aea4b9be0c31edb51bc86f8c958f9
2017-01-24 09:29:47 -08:00
Jeff Walden
bdf8fd6644
Bug 1332797 - Adjust update.sh to work against tip double-conversion. r=froydnj
...
--HG--
extra : rebase_source : b34256579fe5e55fa1a3a7a2e4ae1495265055f4
2017-01-23 15:13:21 -08:00
Jeff Walden
645ca06a98
Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj
...
--HG--
rename : mfbt/double-conversion/LICENSE => mfbt/double-conversion/source/LICENSE
rename : mfbt/double-conversion/README => mfbt/double-conversion/source/README
rename : mfbt/double-conversion/bignum-dtoa.cc => mfbt/double-conversion/source/bignum-dtoa.cc
rename : mfbt/double-conversion/bignum-dtoa.h => mfbt/double-conversion/source/bignum-dtoa.h
rename : mfbt/double-conversion/bignum.cc => mfbt/double-conversion/source/bignum.cc
rename : mfbt/double-conversion/bignum.h => mfbt/double-conversion/source/bignum.h
rename : mfbt/double-conversion/cached-powers.cc => mfbt/double-conversion/source/cached-powers.cc
rename : mfbt/double-conversion/cached-powers.h => mfbt/double-conversion/source/cached-powers.h
rename : mfbt/double-conversion/diy-fp.cc => mfbt/double-conversion/source/diy-fp.cc
rename : mfbt/double-conversion/diy-fp.h => mfbt/double-conversion/source/diy-fp.h
rename : mfbt/double-conversion/double-conversion.cc => mfbt/double-conversion/source/double-conversion.cc
rename : mfbt/double-conversion/double-conversion.h => mfbt/double-conversion/source/double-conversion.h
rename : mfbt/double-conversion/fast-dtoa.cc => mfbt/double-conversion/source/fast-dtoa.cc
rename : mfbt/double-conversion/fast-dtoa.h => mfbt/double-conversion/source/fast-dtoa.h
rename : mfbt/double-conversion/fixed-dtoa.cc => mfbt/double-conversion/source/fixed-dtoa.cc
rename : mfbt/double-conversion/fixed-dtoa.h => mfbt/double-conversion/source/fixed-dtoa.h
rename : mfbt/double-conversion/ieee.h => mfbt/double-conversion/source/ieee.h
rename : mfbt/double-conversion/strtod.cc => mfbt/double-conversion/source/strtod.cc
rename : mfbt/double-conversion/strtod.h => mfbt/double-conversion/source/strtod.h
rename : mfbt/double-conversion/utils.h => mfbt/double-conversion/source/utils.h
extra : rebase_source : e84171373b2f766698ea48d23484ed05463a4d8a
2017-01-23 15:11:50 -08:00
Jeff Walden
70018b9399
Bug 1332797 - Clear out the current double-conversion copy before updating it so that our copying properly handles added/removed files. r=froydnj
...
--HG--
extra : rebase_source : b4a4b088dfe3a1d08cc1600c04da5dc65e484807
2017-01-23 15:10:47 -08:00
Jeff Walden
ad91d7c540
Bug 1332797 - Make the double-conversion update script clone the double-conversion repository into a temporary directory, then copy out of it, taking an optional git revision to use. After this patch, |./update.sh 04cae7a8d5ef3d62ceffb03cdc3d38f258457a52| is a no-op. r=froydnj
...
--HG--
extra : rebase_source : 6fab09db9cec6aaba6004014d32c93338127bd26
2017-01-23 11:27:01 -08:00
Steve Fink
7700214282
Bug 1264053 - Transfer DifferentProcess ArrayBuffers by copying, r=jorendorff
...
--HG--
extra : rebase_source : aed39bb2f92888af7626fd4c37df366cb1761bb8
extra : histedit_source : 4e231e7ef1b0b21d0c4bff2ebaa611e8b321e6d4
2017-01-19 14:02:40 -08:00
Botond Ballo
79e41b270d
Bug 1331495 - Add an operator<< overload for Maybe. r=froydnj
...
MozReview-Commit-ID: 8TcYoikeCvR
--HG--
extra : rebase_source : 591e3c635ae5521418105e2ad1fc2672143eceeb
2017-01-18 13:53:35 -05:00
John Paul Adrian Glaubitz
ba58645c87
Bug 1329194 - mfbt:tests: Define RETURN_INSTR for SH in TestPoisonArea. r=glandium
2017-01-20 09:12:22 +09:00
Tom Ritter
4d9bda0d08
Bug 1317642 Disable WeakPtr thread assertions on MinGW r=froydnj
...
MinGW has two threading models: win32 API based, which disables std::thread,
and POSIX based which enables it but requires an emulation library (winpthreads).
Rather than attempting to switch to pthread emulation at this point, we are
disabling the std::thread based assertion checking for WeakPtr on MinGW.
MozReview-Commit-ID: BmHo70n6AuK
--HG--
extra : rebase_source : 08495775b2925a797c8098216911d30c0b79ef3d
2017-01-13 13:50:21 -06:00
David Major
e46dbc2c0f
Bug 1324093 - Part 4: Make MOZ_Report{Crash,AssertionFailure} be MOZ_NEVER_INLINE. r=froydnj
...
You'd think that this would throw off the assertion stacks in nsTraceRefcnt::WalkTheStack. But as far as I can tell, it was already setting |skipFrames| too high!
On top of that, the function was getting out-of-lined in some instances already. It really should have been MOZ_ALWAYS_INLINE_EVEN_DEBUG.
MozReview-Commit-ID: J2FZmi0pKro
--HG--
extra : rebase_source : 20e5be9f8c21637a28435f47b8ab2de101825679
2017-01-18 09:37:54 +13:00
David Major
0cf4adb5f3
Bug 1324093 - Part 3.5: Add MOZ_MAYBE_UNUSED to mfbt/Attributes.h. r=froydnj
...
MozReview-Commit-ID: Ef1nkRipaDg
--HG--
extra : rebase_source : ea298dc948a027e5a686c2f022cce5d8cb170f27
2017-01-18 09:37:54 +13:00
David Major
2166409a1d
Bug 1324093 - Part 3: Don't MOZ_ReportAssertionFailure in non-debug builds. r=froydnj f=Waldo f=nbp
...
Not only does this trim the code, it also makes MOZ_RELEASE_ASSERT follow the advice of MOZ_CRASH earlier in the file:
* If we're a DEBUG build and we crash at a MOZ_CRASH which provides an
* explanation-string, we print the string to stderr. Otherwise, we don't
* print anything; this is because we want MOZ_CRASH to be 100% safe in release
* builds, and it's hard to print to stderr safely when memory might have been
* corrupted.
MozReview-Commit-ID: Kuxzn1v9Vfs
--HG--
extra : rebase_source : 5c6efe7cb9adb1c366b423d6ff8f95002512985c
2017-01-18 09:37:46 +13:00
David Major
77329182eb
Bug 1324093 - Part 2: Don't AnnotateMozCrashReason on debug builds. r=bsmedberg
...
I left gMozCrashReason visible (but not meaningfully used) in all builds, in order to match the behavior of Assertions.cpp, and to avoid more #ifdef clutter in nsExceptionHandler.cpp.
MozReview-Commit-ID: smoFkddGzd
--HG--
extra : rebase_source : 498f927f62fc944edf254c2ff3b115131367a506
2017-01-18 09:34:02 +13:00
David Major
dd8c1f9d4e
Bug 1324093 - Part 1: Move MOZ_REALLY_CRASH's null-deref and TerminateProcess into a never-inline function. r=froydnj
...
The C versus C++ distinction was only there so that Android could make sure it used the global ::abort. I didn't see the need to maintain the distinction for Windows. (Besides, with this change we're no longer doing textual inclusion of "TerminateProcess" in the macro, so people can't take over the name.)
Linux's abort sequence wasn't long enough to be troublesome, so I left it alone.
MozReview-Commit-ID: Ah5XtWpevGz
--HG--
extra : rebase_source : 37c3fb4c50bcba8e48c6a965a02e3f8608940538
2017-01-18 09:33:25 +13:00
David Major
d27150b889
Bug 1324093 - Part 0: Use MOZ_{BEGIN,END}_EXTERN_C in Assertions.h. r=froydnj
...
Drive-by cleanup.
MozReview-Commit-ID: 8slQlbS3NS2
--HG--
extra : rebase_source : 2df96c531b8cfa03ca17c134393c5f054ca25927
2017-01-18 09:32:47 +13:00
James Cheng
642927f52b
Bug 1329334 - Variant::as<> should use MOZ_RELEASE_ASSERT. r=froydnj
...
MozReview-Commit-ID: E95959RYm2r
--HG--
extra : rebase_source : 774fcf05c3e6baf080a0e74358e7441242465bb4
2017-01-10 14:24:49 +08:00
Nicholas Nethercote
ceb22bead5
Bug 1325541 - Expand comments for MOZ_MUST_USE. r=froydnj.
...
DONTBUILD because it's a comment-only change.
--HG--
extra : rebase_source : 1b2343279f15a05ba633a0407f3eba07d6231083
2016-12-23 16:11:33 +11:00
David Major
bbf01a2d5f
Bug 1329236: Remove the DECLTYPE(expr) workaround in TestMaybe.cpp. r=ehsan
...
MozReview-Commit-ID: 5n5iRdJKn7M
--HG--
extra : rebase_source : 181165142b1f39c59c404b0b692383dd63a423b9
2017-01-06 12:53:20 -06:00
Nathan Froyd
f6a73ed989
Bug 1315274 - rename mozilla::MakeRange to mozilla::IntegerRange; r=Waldo
...
MakeRange is just way too generic for this sort of thing.
2017-01-06 09:22:53 -05:00
Jason Orendorff
5d60d5ca87
Bug 1312001 - Scramble hash codes securely, to avoid leaking bits of object and symbol addresses.
...
MozReview-Commit-ID: yR1cIjrlPP
--HG--
extra : rebase_source : 871821e53eee5502cd255d52f02665f6845e3f09
2016-11-30 15:31:56 -06:00
Chris Peterson
20bc668a02
Bug 1280295 - Remove MOZ_HAVE_REF_QUALIFIERS. r=froydnj
2017-01-03 22:42:33 -08:00
Xidorn Quan
b4ceaa3474
Bug 1325351 part 3 - Make Maybe accept value from different Maybe type when the inner type is convertible. r=froydnj
...
MozReview-Commit-ID: 2kYTncYh1Or
--HG--
extra : rebase_source : f3263ce10f3afae6e8ac734296dbb0e641c55c99
2016-12-23 11:49:33 +11:00
Xidorn Quan
30961dadd7
Bug 1325351 part 2 - Simplify 'Some' function. r=froydnj
...
MozReview-Commit-ID: AkLVQw9WYwy
--HG--
extra : rebase_source : 97449d0b2376d53ee7761da2a1ab425492c70ba6
2016-12-23 11:32:33 +11:00
Xidorn Quan
3526b1e58d
Bug 1325351 part 1 - Remove workaround for VC in Maybe. r=froydnj
...
MozReview-Commit-ID: Anlrf3D2WtN
--HG--
extra : rebase_source : 9cc2e29e374753ad40774ebd0a0efce9f9449e3b
2016-12-29 10:58:01 +11:00
Sebastian Hengst
82a8828349
Backed out changeset b4d189ca8add (bug 1325351) for spidermonkey cgc and plain shell failure in Maybe.h. r=backout
2016-12-27 10:41:01 +01:00
Sebastian Hengst
fe7c0739e3
Backed out changeset 79754b9b89b7 (bug 1325351)
2016-12-27 10:39:49 +01:00
Sebastian Hengst
6c5fadc6f5
Backed out changeset 45f0755ff471 (bug 1325351)
2016-12-27 10:39:45 +01:00
Xidorn Quan
3cead98957
Bug 1325351 part 3 - Make Maybe accept value from different Maybe type when the inner type is convertible. r=froydnj
...
MozReview-Commit-ID: 2kYTncYh1Or
--HG--
extra : rebase_source : 2d15fb3c252f1c0505d739d9540079ceb9296b39
2016-12-23 11:49:33 +11:00
Xidorn Quan
254c28b64c
Bug 1325351 part 2 - Simplify 'Some' function. r=froydnj
...
MozReview-Commit-ID: AkLVQw9WYwy
--HG--
extra : rebase_source : 8bdd5aeb7761d32c25e55966275d9a0804eb3948
2016-12-23 11:32:33 +11:00
Xidorn Quan
32962b7da7
Bug 1325351 part 1 - Remove workaround for VS2010 in Maybe. r=froydnj
...
MozReview-Commit-ID: Anlrf3D2WtN
--HG--
extra : rebase_source : a90c32e397c5081e51e6c2461d045591afae9320
2016-12-23 11:32:09 +11:00
Luke Wagner
7f0959b60f
Bug 1313351 - Fix js::RefCounted to not do leak checking. r=jandem
2016-12-23 21:13:26 +01:00
Nathan Froyd
a4e86a0fbf
Bug 1322792 - require GCC 4.9 to build; r=glandium
2016-12-23 05:47:31 -05:00
Carsten "Tomcat" Book
0aed7a4ac5
Merge mozilla-central to mozilla-inbound
...
--HG--
rename : testing/docker/base-build/HASH => taskcluster/docker/base-build/HASH
rename : testing/docker/base-test/HASH => taskcluster/docker/base-test/HASH
rename : testing/docker/centos6-build-upd/HASH => taskcluster/docker/centos6-build-upd/HASH
rename : testing/docker/centos6-build/HASH => taskcluster/docker/centos6-build/HASH
rename : testing/docker/decision/HASH => taskcluster/docker/decision/HASH
rename : testing/docker/image_builder/HASH => taskcluster/docker/image_builder/HASH
rename : testing/docker/recipes/tooltool.py => taskcluster/docker/recipes/tooltool.py
rename : testing/docker/tester/HASH => taskcluster/docker/tester/HASH
2016-12-22 16:25:35 +01:00
Ting-Yu Chou
4e68f1ffa7
Bug 1322465 part 8 - Use explicit/MOZ_IMPLICIT for the unary constructors in mfbt/. r=Ehsan
...
MozReview-Commit-ID: 2TpfrAaAIuu
--HG--
extra : rebase_source : 4fb5af1beb94c059cbadfaf27fe3949ae8b85efb
2016-12-16 15:57:15 +08:00
Jeff Walden
c8b800005a
Bug 1319740 - Parametrize ComputeSingleDisplayName based on the character type of the key string, and iterate through the string using iterators, not using null-termination. r=arai
...
--HG--
extra : rebase_source : 1c11bd11300dd467e8579faec677d1b7cb9f2e1b
2016-12-02 14:02:36 -08:00
Luke Wagner
549d7571b3
Bug 1320905 - Add js::RefCounted that uses js_delete (r=waldo)
2016-12-05 15:59:18 -08:00
Carsten "Tomcat" Book
1e97bdd3fb
Backed out changeset f38852711f38 (bug 1320905) for bustage on a CLOSED TREE
...
--HG--
extra : amend_source : 2e75cec3778e0ceb8a5d99d94004968604403f3a
2016-12-05 16:13:36 +01:00
Luke Wagner
0bf74100a8
Bug 1320905 - Add js::RefCounted that uses js_delete (r=waldo)
...
MozReview-Commit-ID: D0mSwdm0nn0
2016-12-05 08:46:27 -06:00
Nathan Froyd
2ebbd09068
Bug 1320752 - remove mozilla/Function.h; r=gerald
...
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Carsten "Tomcat" Book
a666835bf5
merge mozilla-inbound to mozilla-central a=merge
...
--HG--
extra : rebase_source : 7f6b0f633da54f747b30496110e5260a226fe249
2016-11-25 15:36:56 +01:00
James Cheng
c627faaa2b
Bug 1319673 - Make it compile error when instantiate a Variant with duplicate type. r=Tomcat,Waldo
...
MozReview-Commit-ID: IKoLU2FjtzA
--HG--
extra : rebase_source : dcf3ff852af5a985c6c77dcfb1e2a901e92fb869
2016-11-23 15:12:50 +08:00
Matt Woodrow
1985af695f
Bug 1319626 - Part 2: Add BorderLayer class and basic support for them. r=mstange
...
--HG--
extra : rebase_source : de87afc8015649fb5f4a7c4da5f4dc49e19f3d85
2016-11-24 18:11:30 +13:00
Carsten "Tomcat" Book
831c1e052a
Backed out changeset 4909935f8081 (bug 1319626)
2016-11-24 17:02:32 +01:00
Matt Woodrow
15af88120a
Bug 1319626 - Part 2: Add BorderLayer class and basic support for them. r=mstange
2016-11-24 18:11:30 +13:00
Carsten "Tomcat" Book
8b27dda5d1
merge mozilla-inbound to mozilla-central a=merge
2016-11-22 15:53:05 +01:00
James Cheng
c100bc54ce
Bug 1319016 - Part2 - Make IsVariant class use IntegralConstant as true false type. r=froydnj
...
MozReview-Commit-ID: G4ohbnUy049
--HG--
extra : rebase_source : 2c20783fe3556ecd0cc04ec1b37b002d044a4e06
2016-11-21 14:28:49 +08:00
James Cheng
cb26e3892f
Bug 1319016 - Part1 - Make IntegralConstant::value use constexpr. r=froydnj
...
MozReview-Commit-ID: DtrDeMC1f5T
--HG--
extra : rebase_source : 820fb6a1a3562bb3d6aa62294338f1328f0fb1c4
2016-11-21 14:27:58 +08:00
Jan de Mooij
2975885bae
Bug 1283562 - Add mozilla::Result<V, E> for fallible return values. r=jwalden
2016-11-21 12:52:03 +01:00
Ting-Yu Lin
d60ec2b4d6
Bug 1315624 - Delete operator&& and operator|| for CastableTypedEnumResult. r=froydnj
...
Defining these two overloading functions destroys short-circuit evaluation.
MozReview-Commit-ID: Ac7zPtAGOiE
--HG--
extra : rebase_source : 4b3906b5162c1214b9814166f7d0d7de9cb0a7f9
2016-11-07 15:00:16 +08:00
Gerald Squelart
06c4e95cd0
Bug 1316206 - Make RefPtr(decltype(nullptr)) MOZ_IMPLICIT - r=froydnj
...
Making this constructor non-explicit will permit automatic conversions from
'nullptr' into RefPtr types, which I think are not dangerous.
The one spot that this affects is in 'UserDataType nsBaseHashtable::Get(KeyType)',
which does a 'return 0;' into the UserDataType, which could be a bool, an int, a
RefPtr or other. I'm changing that into a C++11 "value initialization", which
falls back to "zero initialization" for PODs: 'return UserDataType{};'.
Also fixed the comment to clarify not-found return values, as Get(KeyType) was
not only used for pointers anyway.
MozReview-Commit-ID: F41VlvTNOZU
--HG--
extra : rebase_source : 71d5dacac75ca188e5c55d45f48a5fca76d953c6
2016-11-08 15:12:33 +11:00
Gerald Squelart
f71d8c43ff
Bug 1316206 - RefPtr construction/assignment from nullptr - r=froydnj
...
Added constructor and operator= from a nullptr, bypassing the incoming pointer
check.
Note that the constructor is 'explicit', because one particular use in
nsBaseHashtable is doing a 'return 0' into a templated type that is a RefPtr in
many cases. Making this new constructor explicit removes it from consideration
in this case.
As it's not strictly necessary to have it MOZ_IMPLICIT (but could still be
nice), I will tackle that in the patch after next.
Also changed all zeroes into nullptr when relevant in RefPtr.h (other system-
wide affected files will be updated in following patch.)
MozReview-Commit-ID: Ds4CEv9hZWI
--HG--
extra : rebase_source : f4ec156b13ea3bdcf32b1a33d76ff9771ad6d1dc
2016-11-10 07:58:10 +11:00
Emanuel Hoogeveen
515f250ac5
Bug 1309573 - Part 1: Define the crash reason in MFBT to let everything use it. r=froydnj
...
--HG--
extra : rebase_source : 12eda091c0453e067a13a80261b814128d27c45c
2016-11-06 22:57:00 -05:00
Nathan Froyd
d585884d50
Bug 1315352 - follow-up - placate the static analysis to re-open this CLOSED TREE; r=me
2016-11-07 19:26:11 -05:00