diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 221f10c45b9..347a2d45fb7 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -19,6 +19,7 @@ #include "nsISupportsPriority.h" #include "nsITimer.h" #include "nsPIDOMWindow.h" +#include "nsLayoutStatics.h" #include "jsdbgapi.h" #include "mozilla/dom/EventTargetBinding.h" @@ -1001,6 +1002,7 @@ nsresult RuntimeService::Init() { AssertIsOnMainThread(); + nsLayoutStatics::AddRef(); mIdleThreadTimer = do_CreateInstance(NS_TIMER_CONTRACTID); NS_ENSURE_STATE(mIdleThreadTimer); @@ -1177,6 +1179,7 @@ RuntimeService::Cleanup() } CleanupOSFileConstants(); + nsLayoutStatics::Release(); } // static