With this change, we could share this EnumTypeTraits between files easily.
MozReview-Commit-ID: 9Q2augati7l
--HG--
extra : rebase_source : b7d9fc95d9d7722ba3eb99ec9798a64ebdbeb484
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
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
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
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
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.
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.
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