This adds the call NS_SetCurrentThreadName() to the thread created using
base::Thread (e.g. the Compositor thread) so that the name gets annotated in the
crash report and displayed on socorro.
MozReview-Commit-ID: 9bNeHlhbicA
--HG--
extra : amend_source : a7c0c09e7fa057df4c0e212e1579961c3f9617b1
extra : histedit_source : 8919f69bc68861858105efed12cc0a37404b38b0
This change moves most of the logic for the threadsafety check into
nsAutoOwningThread, rather than having part of the logic live in
nsAutoOwningThread and part of the logic live in nsDebug.h. Changing
this also forces us to clean up a couple of places that replicated the
logic that lived in nsDebug.h as well.
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management. (Though after this patch there are
still a handful of spots needing SmprintfFree.)
MozReview-Commit-ID: COa4nzIX5qa
--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).
--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
This patch implements async returns for IPDL using MozPromises. There
are following changes:
* Initialize AbstractThreads for MessageLoops
* Record promises and their reject functions
* When async message returns, call their resolve functions
* When send error or channel close, call their reject functions
* Implement "unresolved-ipc-promises" count for about:memory
* Test cases
See bug attachment for generated code from test cases
MozReview-Commit-ID: 7xmg8gwDGaW
--HG--
rename : ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl
extra : rebase_source : 55c4f68a3f8b7d0df5ca9f9c45b9a205b337282d
The new names make it clearer that these actions apply to just one thread.
- profiler_sleep_start() --> profiler_thread_sleep()
- profiler_sleep_end() --> profiler_thread_wake()
- profiler_is_sleeping() --> profiler_thread_is_sleeping()
- GeckoProfilerSleepRAII --> GeckoProfilerThreadSleepRAII
- GeckoProfilerWakeRAII --> GeckoProfilerThreadWakeRAII
This update is mostly because the upstream implementation is now free of
the gnarly, XP-required implementation of condition variables and
updating both the posix and windows implementations at the same time
seemed easier.
The WARN_UNUSED_RESULT macro is defined in multiple Google header files in ipc/chromium and webrtc. Copy the WARN_UNUSED_RESULT definition from the latest security/sandbox/chromium/base/compiler_specific.h to our ipc/chromium code. Also remove the ALLOW_UNUSED macro definition because it is no longer defined in the latest compiler_specific.h and is not used anywhere.
Warning: -Wmacro-redefined in ipc/chromium/src/base/compiler_specific.h: 'WARN_UNUSED_RESULT' macro redefined
ipc/chromium/src/base/compiler_specific.h:73:9: warning: 'WARN_UNUSED_RESULT' macro redefined [-Wmacro-redefined]
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
media/webrtc/trunk/webrtc/typedefs.h:152:9: note: previous definition is here
#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
MozReview-Commit-ID: EUIlXGKLhDL
--HG--
extra : rebase_source : f252b7b36824f6e4f11fdf6e543dd760ac90e81e
extra : histedit_source : 870eaf4875e954c16e3a951ffea73102ffff2436
WINVER=0x0601 implies PSAPI_VERSION=2. We should not mix PSAPI_VERSION.
MozReview-Commit-ID: Ckxel4JNW2x
--HG--
extra : rebase_source : 3dc221ca67642ea810cb353869f76b82c40c7bf3
The WARN_UNUSED_RESULT macro is defined in multiple Google header files in ipc/chromium and webrtc. Copy the WARN_UNUSED_RESULT definition from the latest security/sandbox/chromium/base/compiler_specific.h to our ipc/chromium code. Also remove the ALLOW_UNUSED macro definition because it is no longer defined in the latest compiler_specific.h and is not used anywhere.
Warning: -Wmacro-redefined in ipc/chromium/src/base/compiler_specific.h: 'WARN_UNUSED_RESULT' macro redefined
ipc/chromium/src/base/compiler_specific.h:73:9: warning: 'WARN_UNUSED_RESULT' macro redefined [-Wmacro-redefined]
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
media/webrtc/trunk/webrtc/typedefs.h:152:9: note: previous definition is here
#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
MozReview-Commit-ID: EUIlXGKLhDL
--HG--
extra : rebase_source : 4c584dfa2243514aef0357ff919d1cba48bd8b86
WINVER=0x0601 implies PSAPI_VERSION=2. We should not mix PSAPI_VERSION.
MozReview-Commit-ID: Ckxel4JNW2x
--HG--
extra : rebase_source : 932c67a3cae063fe4b0c5fec9048e67ce6286ad3
Currently, ipc/chromium detects sparc64 by checking whether
__sparc64__ is defined. However, this definition is used on BSD
targets only. Linux targets define both __sparc__ and __arch64__
on sparc64. Since this also works on BSD, rather use __sparc__
and __arch64__ instead of __sparc64__ to detect sparc64 targets.
CreateThreadAttributeList warns:
// Note that the pointer to the HANDLE array ends up embedded in the result of
// this function and must stay alive until FreeThreadAttributeList is called,
// hence it is passed in so the owner is the caller of this function.
but the caller was passing a |handlesToInherit| that was declared inside a block scope that ends before we're finished using lpAttributeList.
This happened to work on MSVC but leads to badness under clang-cl.
+ Bonus fix for a sometimes-uninitialized warning in CreateThreadAttributeList.
MozReview-Commit-ID: 6uu3ICjfj5k
--HG--
extra : rebase_source : 45fd2e4084c80ab60bcf7bee8e1575b40b5b3283