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

1054 Коммитов

Автор SHA1 Сообщение Дата
Kan-Ru Chen 99748028a6 Bug 1051567 - Make sure we resend file descriptors for the first chunk of a message. r=billm
Check if the buffers iterator was never consumed. This is a regression
introduced when converting ipc to use BufferList in bug 1262671.

MozReview-Commit-ID: LWAoVlI5CKJ

--HG--
extra : rebase_source : c4f16f4f90f56153c10cf1d9113c4c55748595f0
2016-08-30 18:26:59 +08:00
Andi-Bogdan Postelnicu 5a1fd6c4d4 Bug 525063 - add attribute to mark functions that initialize member variables for their parent class, in order to be scanned by clang-plugin static analysis. r=froydnj
MozReview-Commit-ID: 5yTnTUVLpSC
2016-08-30 10:07:03 +03:00
Michelangelo De Simone 0b2d2c0e55 Bug 1120059 - Remove unnecessary MOZ_EXPLICIT_CONVERSION macros. r=jwalden
MozReview-Commit-ID: 7CX1VnBRDpk

--HG--
extra : rebase_source : 36be7e6c91d2767c5a610a2806f89efa69ff1c74
2016-07-13 15:07:52 -07:00
Honza Bambas e4eacf065d Bug 956338 - Add checks to WeakPtr/nsWeakReference and related classes to assert single-thread usage. r=nfroyd
--HG--
extra : rebase_source : 140fa149eb94f027e9319a44be0bbee34648222a
2016-08-01 13:16:16 +02:00
Ryan VanderMeulen 1c0c6ec5d4 Merge m-c to inbound. a=merge 2016-08-29 12:56:19 -04:00
Kan-Ru Chen c49f09db99 Bug 1297981 - Delete BufferList::FlattenBytes and Pickle::FlattenBytes. r=billm
MozReview-Commit-ID: G3a4DN4Lovi

--HG--
extra : rebase_source : 17818efb7578117b708636d06e6a2f5d14532c94
2016-08-25 17:15:38 +08:00
Jeff Walden 34e7d5b132 Bug 1296760 - Allow Some(nullptr) and Some(Derived*) to convert to Maybe<Base*>. r=froydnj
--HG--
extra : rebase_source : 478e825f476a671e07a94f483b88cbc2d4ae8d13
2016-08-24 11:12:48 -07:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Kan-Ru Chen 506dfe6ea3 Bug 1264642 - Part 4. Use BufferList to replace raw buffers in StructuredClone. r=baku r=billm r=jorendorff
In JS StructuredClone BufferList<SystemAllocPolicy> is typedef'd to
JSStructuredCloneData and use everywhere in gecko that stores structured
clone data.

This patch changed some raw pointers to UniquePtr<JSStructuredCloneData>
and some to stack allocated JSStructuredCloneData for better life time
management. Some parameters or methods are deleted because of changing
to the new data structure.

MessagePortMessage now has the exactly same structure with
ClonedMessageData. Maybe in the future they can be consolidated.

MozReview-Commit-ID: 1IY9p5eKLgv
2016-08-23 00:40:46 +08:00
Kan-Ru Chen 3dcef6a932 Bug 1264642 - Part 3. Add BufferList::MoveFallible. r=billm
It works like a move constructor but it's fallible. It can also move
data to different but compatible AllocPolicy.

MozReview-Commit-ID: LAbPWCwnrr6
2016-08-23 00:40:46 +08:00
Kan-Ru Chen 6f3e6b1234 Bug 1264642 - Part 2. Add BufferList::Extract and Pickle::ExtractBuffers. r=billm
These methods allow us to move some buffers out of a pickle with minimum
copying. It's useful when the IPC deserialized type uses BufferList to
store data and we want to take the buffers from IPC directly.

Borrowing is not suitable to use for IPC to hand out data because we
often want to store the data somewhere for processing after IPC has
released the underlying buffers.

MozReview-Commit-ID: F1K2ZMkACqq
2016-08-23 00:40:45 +08:00
Michael Layzell e1fc3b1773 Bug 1159244 - Add release mode bounds checking with custom annotations to nsTArray, r=froydnj
MozReview-Commit-ID: Ljx9PwBCyTT
2016-08-15 13:29:45 -04:00
Igor 175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Jeff Walden 0c5ac6c90f Bug 1294537 - Don't tag |void* p| in the don't-nullcheck placement operator new overload as MOZ_NONNULL, because that makes a double-checking assertion of non-nullness into a compiler warning. r=froydnj
--HG--
extra : rebase_source : b53a1c5dce924ea030f54bb41e13baf27cd3d823
2016-08-12 18:02:03 -07:00
Nathan Froyd 0a6a801dc2 Bug 1294537 - introduce a non-null-checking placement operator new; r=sunfish,nbp
The default placement operator new is defined to always require that its
result be null-checked.  A sufficiently smart compiler can remove this
check, but not all compilers are sufficiently smart.  Better to have a
custom placement operator new that will remove null checks in a way
defined by the standard.
2016-08-12 22:43:49 -04:00
Tom Schuster 42824df666 Bug 1197324 - add format-string checking attribute to snprintf_literal. r=froydnj 2016-08-03 14:37:31 +02:00
Benjamin Bouvier 23575fdec5 Bug 1248555: Introduce variants of SpecificNaN / BitwiseCast that preserve the signaling NaN bit; r=froydnj
MozReview-Commit-ID: 5A8p06nBqyI

--HG--
extra : rebase_source : 87ebcc9792d42c6b2e6164a639340da37b4b602c
extra : histedit_source : b4ab7c6b9f4bb7fe2cc88a3208d6fa8e6fefce08
2016-08-01 20:02:05 +02:00
Daniel Holbert 489e357178 Bug 1291423: Explicitly qualify the destructor call that we invoke in Maybe::reset. r=Waldo
MozReview-Commit-ID: 6vQouBSxnsZ
2016-08-02 21:19:08 -07:00
Chris Peterson 9fc9590608 Bug 1289990 - Remove VS2013 workaround for TestTuple.cpp crash. r=froydnj
--HG--
extra : rebase_source : c5138bb0ea6a77b04030074ecebd85ba0808afa3
2016-07-27 23:13:08 -07:00
Cameron McCormack fdb4542277 Bug 1290035 - Remove the explicit Type parameter to MakeEnumeratedRange. r=Waldo
MozReview-Commit-ID: BtFVn9pTQpU

--HG--
extra : rebase_source : be83c74953e2fbc7ace2ce49ceebb060da394c50
2016-07-28 17:48:50 +08:00
Andi-Bogdan Postelnicu 79a0735001 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 6dFygYzTYfN
2016-07-25 16:57:30 +03:00
Wes Kocher 1feda59958 Backed out changeset 9c839b1d1397 (bug 1283395) for static build bustage CLOSED TREE 2016-07-25 08:54:47 -07:00
Andi-Bogdan Postelnicu 440264fed8 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 6dFygYzTYfN
2016-07-25 17:43:14 +03:00
Nathan Froyd 6dad001d7f Bug 1238661 - fix mozilla::SignalTrampoline to work properly with clang; r=darchons
mozilla::SignalTrampoline is designed to work around a bug in older ARM
kernels; it constructs a trampoline function with a NOP slide and then
calls a specified function.  This feat is accomplished using inline
assembly and naked functions, which is a GCC extension where you get to
write the entire body of your function using GCC inline assembly.

Unfortunately, the particular implementation that it uses requires the
specified function's address to be loaded into a register.  GCC permits
this and we use input arguments to the assembly statement to ensure that
GCC knows it shouldn't clobber the incoming argument registers when
trying to load the function's address.

clang, however, complains about the use of input parameters in naked
functions.  So we need to find something that will work on both GCC and
clang.

The trick is to realize that we're a) tail-calling the specified
function and b) we don't have to worry about calling a fully-general
function.  We just have to worry about calling a function inside libxul,
and we can therefore "assume" that the offset between the branch and the
called function fits into the immediate field of a Thumb (or ARM) branch
instruction.  (This assumption is not strictly true; the branch range is
+/-16MB or so and libxul is actually quite a bit bigger than that.  But
it works in practice, and the linker will insert branch stubs if
necessary to make things work out OK.)

The upshot is that we can use a "b" instruction instead of a "bx"
instruction, and this makes clang much happier.  As a small bonus, the
stub gets ever-so-much-more efficient, which is probably the
least-significant micro-optimization ever.
2016-07-25 18:16:06 -04:00
Chris Peterson b0efbe0ef8 Bug 1288603 - Remove NumericLimits.h because all platforms have numeric_limits<char16_t>. r=froydnj 2016-07-22 22:05:45 -07:00
Carsten "Tomcat" Book 336105a0de merge mozilla-inbound to mozilla-central a=merge 2016-07-22 11:58:02 +02:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson d634a99cad Bug 1277106 - Part 4: Remove MOZ_UTF16() macro. r=Waldo 2016-07-19 21:07:53 -07:00
Chris Peterson 8949f73d27 Bug 1277106 - Part 1: Use VS2015's real char16_t instead of aliasing wchar_t. r=Waldo
and remove MOZ_CHAR16_IS_NOT_WCHAR #ifdefs.
2016-07-20 22:01:43 -07:00
Carsten "Tomcat" Book 718ce69fb7 Backed out changeset c8e5a0703821 (bug 1283395) for bustage on a CLOSED TREE 2016-07-21 08:13:06 +02:00
Andi-Bogdan Postelnicu d2d46ad585 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 1F5GGpQtq4x
2016-07-20 15:45:34 +03:00
Wes Kocher 3bba9b339e Backed out 5 changesets (bug 1287623) for static build bustage CLOSED TREE
Backed out changeset a48daec87ec9 (bug 1287623)
Backed out changeset 248153344e15 (bug 1287623)
Backed out changeset 8aa409c9b1ce (bug 1287623)
Backed out changeset 602d4d88e806 (bug 1287623)
Backed out changeset 114da8bdc0b0 (bug 1287623)
2016-07-20 15:40:33 -07:00
Andrew McCreight 155e619376 Bug 1287623, part 3 - Add more methods involving StaticRefPtr. r=froydnj
This patch adds a number of standard conversions to and from RefPtr<>
and already_AddRefed<>.
2016-07-20 15:19:00 -07:00
Andrew McCreight a5a3cca3f9 Bug 1287623, part 3 - Add more methods involving StaticRefPtr. r=froydnj
This patch adds a number of standard conversions to and from RefPtr<>
and already_AddRefed<>.
2016-07-21 09:54:17 -07:00
Jeff Walden efea1b6545 Bug 1287243 - Optimize the type used to store Variant's tag. r=fitzgen
--HG--
extra : rebase_source : c7c6fd63ea50330958ef794dc28cc8890ef59bbe
2016-07-16 02:31:45 -07:00
Terrence Cole 1fe18b25cf Bug 1232686 - Use decltype to infer Variant::match return type; r=fitzgen
--HG--
extra : rebase_source : 38f280cc3014b2285a79e377f1fa8edf4c5f4661
2015-12-15 07:45:22 -08:00
Boris Chiou c329f132b7 Bug 1276573 - Add a new constructor for Range<T>. r=Waldo
These new constructor accepts two RangedPtr<T> arguments.

MozReview-Commit-ID: 8a3bYserLMr

--HG--
extra : rebase_source : 216de17b7a51783fe48d604b432d4dc7df6ad6eb
2016-05-30 13:58:13 +08:00
Chris Peterson 43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Chris Peterson 2b3b60f7b1 Bug 1277155 - Part 1: Remove snprintf() polyfills for VS2013 in Sprintf.h and #defines. r=froydnj r=mhowell 2016-06-27 20:45:03 -07:00
Chris Pearce ab7252caa2 Bug 1267918 - Add do_AddRef(const RefPtr<T>& aObj). r=froydnj
This means we can return already_AddRefed<T> for any RefPtr<T>s
being held as instance variables easier.

MozReview-Commit-ID: HFHdkF8EUsK

--HG--
extra : rebase_source : df650d39c010386afcb8cb2dd48292c26fbc6501
2016-06-30 10:06:10 +12:00
Jeff Walden e20f0f4551 Bug 1282795 - Silence warnings when MOZ_ALWAYS_{TRUE,FALSE} are passed expressions with embedded side effects, that would ordinarily trigger side effects but don't inside certain unevaluated contexts within MOZ_ASSERT, which then triggers compiler warnings with new-enough clang. You are not expected to understand this. r=froydnj
--HG--
extra : rebase_source : ffe6d35af74c50b04dbddc9cc3965292875c64a0
2016-06-28 17:12:14 +01:00
Andi-Bogdan Postelnicu 5e3fc1519f Bug 525063 - renamed MOZ_INITIALIZED_OUTSIDE_CONSTRUCTOR -> MOZ_INIT_OUTSIDE_CTOR. r=nfroyd
MozReview-Commit-ID: GPQY8b2OM2V
2016-06-28 16:30:49 +03:00
Seth Fowler a2712d4b0e Bug 1255632 - Make Maybe::map and Maybe::apply support lambdas. r=waldo,njn 2016-06-22 16:32:40 -07:00
Carsten "Tomcat" Book c46c20b362 Backed out changeset 7b03f23fdde5 (bug 1255632) for bustage on a CLOSED TREE 2016-06-22 08:48:25 +02:00
Seth Fowler 358b410aaa Bug 1255632 - Make Maybe::map and Maybe::apply support lambdas. r=waldo,njn 2016-06-21 22:15:27 -07:00
Luke Wagner fa9fafb015 Bug 1277896 - add Vector::initLengthUninitialized (r=waldo)
MozReview-Commit-ID: He6Kzr0giLU
2016-06-10 13:28:04 -05:00
Luke Wagner 6b6f143161 Bug 1278391 - add move constructor to EnumeratedArray (r=njn)
MozReview-Commit-ID: AQjH3xx9TSq

--HG--
extra : rebase_source : 599dc2bf76fa2921de6bf3b41c7d384db70a7ff9
2016-06-09 08:42:16 -05:00
Andi-Bogdan Postelnicu 12bac0f757 Bug 525063 - add attribute to mark member variables that should be skipped by clang plugin initialization checker. r=nfroyd
MozReview-Commit-ID: 4V1YcK2thiF
2016-06-09 09:32:11 +03:00
Andi-Bogdan Postelnicu c735dfa442 Bug 1278201 - prevent writing |mRefCnt| after it's freed. r=Ms2ger
MozReview-Commit-ID: G7fZzrGWHmW

--HG--
extra : rebase_source : 6f311948a8d2222358aec860f2c6d6223862e814
2016-06-06 17:23:10 +03:00