Bug 941672: assert thread state init'ed upon seeing Exclusive context (r=shu).
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Tue, 03 Dec 2013 20:21:01 +0100
changeset 174449 17aacd34982ceabe666f203c7edfdc5ccc364aac
parent 174448 b947d59fe3c156b51211ae5dce5c7d35a4f4e3a9
child 174450 28f646255d25df67c5bf0bd338bb37c9d8a2b34b
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs941672
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 941672: assert thread state init'ed upon seeing Exclusive context (r=shu).
js/src/jscntxt.cpp
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -1048,17 +1048,21 @@ js_HandleExecutionInterrupt(JSContext *c
     return true;
 }
 
 js::ThreadSafeContext::ThreadSafeContext(JSRuntime *rt, PerThreadData *pt, ContextKind kind)
   : ContextFriendFields(rt),
     contextKind_(kind),
     perThreadData(pt),
     allocator_(nullptr)
-{ }
+{
+#ifdef JS_WORKER_THREADS
+    JS_ASSERT_IF(kind == Context_Exclusive, rt->workerThreadState != nullptr);
+#endif
+}
 
 bool
 ThreadSafeContext::isForkJoinSlice() const
 {
     return contextKind_ == Context_ForkJoin;
 }
 
 ForkJoinSlice *