-
Notifications
You must be signed in to change notification settings - Fork 23
Description
It seems like we access preferences from more than one thread? If I compile in debug mode and run the mochitests I get the following crash:
0:18.31 GECKO(1158803) [1158803] Assertion failure: sInServoTraversal || NS_IsMainThread(), at /home/leen/project-foxhound/obj-tf-release/dist/include/mozilla/ServoUtils.h:33
Initializing stack-fixing for the first stack frame, this may take a while...
0:20.85 INFO runtests.py | Waiting for browser...
0:38.87 GECKO(1158803) #1: mozilla::IsInServoTraversal() (/home/leen/project-foxhound/obj-tf-release/dist/include/mozilla/ServoUtils.h:33)
0:38.87 GECKO(1158803) #2: mozilla::ServoStyleSet::IsInServoTraversal() (/home/leen/project-foxhound/obj-tf-release/dist/include/mozilla/ServoStyleSet.h:117)
0:38.87 GECKO(1158803) #3: mozilla::Preferences::InitStaticMembers() (/home/leen/project-foxhound/modules/libpref/Preferences.cpp:3755)
0:38.88 GECKO(1158803) #4: nsresult mozilla::Internals::GetPrefValue<bool*>(char const*, bool*&&, mozilla::PrefValueKind) (/home/leen/project-foxhound/modules/libpref/Preferences.cpp:4777)
0:38.89 GECKO(1158803) #5: bool mozilla::Internals::GetPref(char const*, bool, mozilla::PrefValueKind) (/home/leen/project-foxhound/modules/libpref/Preferences.cpp:4819)
0:38.90 GECKO(1158803) #6: mozilla::Preferences::GetBool(char const*, bool, mozilla::PrefValueKind) (/home/leen/project-foxhound/modules/libpref/Preferences.cpp:5207)
0:38.90 GECKO(1158803) #7: isActive(char const*) (/home/leen/project-foxhound/dom/tainting/nsTaintingUtils.cpp:37)
0:38.90 GECKO(1158803) #8: isSourceActive(char const*) (/home/leen/project-foxhound/dom/tainting/nsTaintingUtils.cpp:49)
0:38.91 GECKO(1158803) #9: MarkTaintSource(JSContext*, JS::MutableHandleJS::Value, char const*, nsTSubstring<char16_t> const&) (/home/leen/project-foxhound/dom/tainting/nsTaintingUtils.cpp:320)
0:38.92 GECKO(1158803) #10: mozilla::dom::MessageEvent::GetData(JSContext*, JS::MutableHandleJS::Value, mozilla::ErrorResult&) (/home/leen/project-foxhound/dom/events/MessageEvent.cpp:73)
0:38.92 GECKO(1158803) #11: mozilla::dom::MessageEvent_Binding::get_data(JSContext*, JS::Handle<JSObject*>, void*, JSJitGetterCallArgs) (MessageEventBinding.cpp:761)
0:38.92 GECKO(1158803) #12: bool mozilla::dom::binding_detail::GenericGetter<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) (/home/leen/project-foxhound/dom/bindings/BindingUtils.cpp:3153)
0:38.92 GECKO(1158803) #13: CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:494)
0:38.92 GECKO(1158803) #14: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:592)
0:38.92 GECKO(1158803) #15: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:659)
0:38.92 GECKO(1158803) #16: js::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, js::AnyInvokeArgs const&, JS::MutableHandleJS::Value, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:691)
0:38.92 GECKO(1158803) #17: js::CallGetter(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:813)
0:38.92 GECKO(1158803) #18: CallGetter(JSContext*, JS::Handlejs::NativeObject*, JS::HandleJS::Value, JS::HandleJS::PropertyKey, js::PropertyInfoBase, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/NativeObject.cpp:2143)
0:38.92 GECKO(1158803) #19: bool GetExistingProperty<(js::AllowGC)1>(JSContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, js::PropertyInfoBase, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) (/home/leen/project-foxhound/js/src/vm/NativeObject.cpp:2171)
0:38.92 GECKO(1158803) #20: bool NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) (/home/leen/project-foxhound/js/src/vm/NativeObject.cpp:2319)
0:38.92 GECKO(1158803) #21: js::NativeGetProperty(JSContext*, JS::Handlejs::NativeObject*, JS::HandleJS::Value, JS::HandleJS::PropertyKey, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/NativeObject.cpp:2350)
0:38.92 GECKO(1158803) #22: js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::HandleJS::Value, JS::HandleJS::PropertyKey, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/ObjectOperations-inl.h:117)
0:38.92 GECKO(1158803) #23: js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::HandleJS::Value, js::PropertyName*, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/ObjectOperations-inl.h:124)
0:38.92 GECKO(1158803) #24: js::GetProperty(JSContext*, JS::HandleJS::Value, JS::Handlejs::PropertyName*, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:4804)
0:38.92 GECKO(1158803) #25: GetPropertyOperation(JSContext*, JS::Handlejs::PropertyName*, JS::HandleJS::Value, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:260)
0:38.92 GECKO(1158803) #26: js::Interpret(JSContext*, js::RunState&) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:3011)
0:38.92 GECKO(1158803) #27: MaybeEnterInterpreterTrampoline(JSContext*, js::RunState&) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:408)
0:38.92 GECKO(1158803) #28: js::RunScript(JSContext*, js::RunState&) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:466)
0:38.92 GECKO(1158803) #29: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:624)
0:38.92 GECKO(1158803) #30: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:659)
0:38.92 GECKO(1158803) #31: js::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, js::AnyInvokeArgs const&, JS::MutableHandleJS::Value, js::CallReason) (/home/leen/project-foxhound/js/src/vm/Interpreter.cpp:691)
0:38.92 GECKO(1158803) #32: JS::Call(JSContext*, JS::HandleJS::Value, JS::HandleJS::Value, JS::HandleValueArray const&, JS::MutableHandleJS::Value) (/home/leen/project-foxhound/js/src/vm/CallAndConstruct.cpp:119)
0:38.93 GECKO(1158803) #33: mozilla::dom::EventHandlerNonNull::Call(mozilla::dom::BindingCallContext&, JS::HandleJS::Value, mozilla::dom::Event&, JS::MutableHandleJS::Value, mozilla::ErrorResult&) (EventHandlerBinding.cpp:65)
0:38.93 GECKO(1158803) #34: void mozilla::dom::EventHandlerNonNull::Call<nsCOMPtrmozilla::dom::EventTarget >(nsCOMPtrmozilla::dom::EventTarget const&, mozilla::dom::Event&, JS::MutableHandleJS::Value, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) (/home/leen/project-foxhound/obj-tf-release/dist/include/mozilla/dom/EventHandlerBinding.h:82)
0:38.93 GECKO(1158803) #35: mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) (/home/leen/project-foxhound/dom/events/JSEventHandler.cpp:201)
0:38.93 GECKO(1158803) #36: mozilla::EventListenerManager::HandleEventSingleListener(mozilla::EventListenerManager::Listener*, nsAtom*, mozilla::WidgetEvent*, mozilla::dom::Event*, mozilla::dom::EventTarget*, bool) (/home/leen/project-foxhound/dom/events/EventListenerManager.cpp:1347)
0:38.93 GECKO(1158803) #37: mozilla::EventListenerManager::HandleEventWithListenerArray(mozilla::EventListenerManager::ListenerArray*, nsAtom*, mozilla::EventMessage, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, bool) (/home/leen/project-foxhound/dom/events/EventListenerManager.cpp:1665)
0:38.93 GECKO(1158803) #38: mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) (/home/leen/project-foxhound/dom/events/EventListenerManager.cpp:1562)
0:38.93 GECKO(1158803) #39: mozilla::EventListenerManager::HandleEvent(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) (/home/leen/project-foxhound/obj-tf-release/dist/include/mozilla/EventListenerManager.h:468)
0:38.93 GECKO(1158803) #40: mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) (/home/leen/project-foxhound/dom/events/EventDispatcher.cpp:368)
0:38.93 GECKO(1158803) #41: mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArraymozilla::EventTargetChainItem&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) (/home/leen/project-foxhound/dom/events/EventDispatcher.cpp:609)
0:38.93 GECKO(1158803) #42: mozilla::EventDispatcher::Dispatch(mozilla::dom::EventTarget*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArraymozilla::dom::EventTarget*) (/home/leen/project-foxhound/dom/events/EventDispatcher.cpp:1224)
0:38.93 GECKO(1158803) #43: mozilla::EventDispatcher::DispatchDOMEvent(mozilla::dom::EventTarget, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) (/home/leen/project-foxhound/dom/events/EventDispatcher.cpp:1363)
0:38.93 GECKO(1158803) #44: nsWindowRoot::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) (/home/leen/project-foxhound/dom/base/nsWindowRoot.cpp:83)
0:38.93 GECKO(1158803) #45: mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&) (/home/leen/project-foxhound/dom/events/EventTarget.cpp:214)
0:38.93 GECKO(1158803) #46: mozilla::dom::MessageEventRunnable::DispatchDOMEvent(JSContext*, mozilla::dom::WorkerPrivate*, mozilla::DOMEventTargetHelper*, bool) (/home/leen/project-foxhound/dom/workers/MessageEventRunnable.cpp:81)
0:38.93 GECKO(1158803) #47: mozilla::dom::MessageEventRunnable::WorkerRun(JSContext*, mozilla::dom::WorkerPrivate*) (/home/leen/project-foxhound/dom/workers/MessageEventRunnable.cpp:95)
0:38.93 GECKO(1158803) #48: mozilla::dom::WorkerThreadRunnable::Run() (/home/leen/project-foxhound/dom/workers/WorkerRunnable.cpp:443)
0:38.93 GECKO(1158803) #49: nsThread::ProcessNextEvent(bool, bool*) (/home/leen/project-foxhound/xpcom/threads/nsThread.cpp:1199)
0:38.93 GECKO(1158803) #50: NS_ProcessNextEvent(nsIThread*, bool) (/home/leen/project-foxhound/xpcom/threads/nsThreadUtils.cpp:480)
0:38.93 GECKO(1158803) #51: mozilla::dom::WorkerPrivate::DoRunLoop(JSContext*) (/home/leen/project-foxhound/dom/workers/WorkerPrivate.cpp:3566)
0:38.93 GECKO(1158803) #52: mozilla::dom::workerinternals::(anonymous namespace)::WorkerThreadPrimaryRunnable::Run() (/home/leen/project-foxhound/dom/workers/RuntimeService.cpp:2159)
0:38.93 GECKO(1158803) #53: nsThread::ProcessNextEvent(bool, bool*) (/home/leen/project-foxhound/xpcom/threads/nsThread.cpp:1199)
0:38.93 GECKO(1158803) #54: NS_ProcessNextEvent(nsIThread*, bool) (/home/leen/project-foxhound/xpcom/threads/nsThreadUtils.cpp:480)
0:38.93 GECKO(1158803) #55: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (/home/leen/project-foxhound/ipc/glue/MessagePump.cpp:299)
0:38.93 GECKO(1158803) #56: MessageLoop::RunInternal() (/home/leen/project-foxhound/ipc/chromium/src/base/message_loop.cc:371)
0:38.93 GECKO(1158803) #57: MessageLoop::RunHandler() (/home/leen/project-foxhound/ipc/chromium/src/base/message_loop.cc:364)
0:38.93 GECKO(1158803) #58: MessageLoop::Run() (/home/leen/project-foxhound/ipc/chromium/src/base/message_loop.cc:345)
0:38.93 GECKO(1158803) #59: nsThread::ThreadFunc(void*) (/home/leen/project-foxhound/xpcom/threads/nsThread.cpp:372)
0:38.95 GECKO(1158803) #60: _pt_root (/home/leen/project-foxhound/nsprpub/pr/src/pthreads/ptthread.c:204)
0:38.95 GECKO(1158803) #61: ??? (/lib/x86_64-linux-gnu/libc.so.6 + 0x891f5)
0:38.95 GECKO(1158803) #62: ??? (/lib/x86_64-linux-gnu/libc.so.6 + 0x10989c)
0:38.95 GECKO(1158803) #63: ??? (???:???)
0:38.95 GECKO(1158803) [Socket 1158897, IPC I/O Child] WARNING: [300D5B1B6DEBD220.2D55D620A7C6CBA7]: Dropping message ''; no connection to unknown peer 1.1: file /home/leen/project-foxhound/ipc/glue/NodeController.cpp:364
0:38.95 GECKO(1158803) [Socket 1158897, Main Thread] WARNING: Shutting down Socket process early due to a crash!: file /home/leen/project-foxhound/netwerk/ipc/SocketProcessChild.cpp:234
0:38.95 Main app process: killed by SIGSEGV