Backed out 13 changesets (bug 1492014) for multiple failures. a=backout default tip
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 25 Sep 2018 16:26:04 +0300
changeset 438081 d03b538b6b41
parent 438080 c5a9878baf35
push id34709
push usernbeleuzu@mozilla.com
push date2018-09-25 13:26 +0000
treeherdermozilla-central@d03b538b6b41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1492014
milestone64.0a1
backs outf629b66a235f
0a8510efbba3
2798792623cf
8818f5ae0d13
0c6b469c9618
d1654231ffb8
5a3967f37d3f
ac095c2fdd8b
4d1ba44e30ab
e34938a11fab
3e142ea44140
b0f2fafdba8c
d77330a1cbfa
Backed out 13 changesets (bug 1492014) for multiple failures. a=backout Backed out changeset f629b66a235f (bug 1492014) Backed out changeset 0a8510efbba3 (bug 1492014) Backed out changeset 2798792623cf (bug 1492014) Backed out changeset 8818f5ae0d13 (bug 1492014) Backed out changeset 0c6b469c9618 (bug 1492014) Backed out changeset d1654231ffb8 (bug 1492014) Backed out changeset 5a3967f37d3f (bug 1492014) Backed out changeset ac095c2fdd8b (bug 1492014) Backed out changeset 4d1ba44e30ab (bug 1492014) Backed out changeset e34938a11fab (bug 1492014) Backed out changeset 3e142ea44140 (bug 1492014) Backed out changeset b0f2fafdba8c (bug 1492014) Backed out changeset d77330a1cbfa (bug 1492014)
dom/base/nsGlobalWindowInner.cpp
dom/console/Console.cpp
dom/console/Console.h
dom/media/webaudio/AudioContext.cpp
dom/media/webaudio/AudioWorkletImpl.cpp
dom/media/webaudio/AudioWorkletImpl.h
dom/media/webaudio/moz.build
dom/worklet/AudioWorkletGlobalScope.cpp
dom/worklet/AudioWorkletGlobalScope.h
dom/worklet/PaintWorkletGlobalScope.cpp
dom/worklet/PaintWorkletGlobalScope.h
dom/worklet/Worklet.cpp
dom/worklet/Worklet.h
dom/worklet/WorkletGlobalScope.cpp
dom/worklet/WorkletGlobalScope.h
dom/worklet/WorkletImpl.cpp
dom/worklet/WorkletImpl.h
dom/worklet/WorkletThread.cpp
dom/worklet/WorkletThread.h
dom/worklet/moz.build
layout/style/PaintWorkletImpl.cpp
layout/style/PaintWorkletImpl.h
layout/style/moz.build
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -97,17 +97,16 @@
 #include "mozilla/ThrottledEventQueue.h"
 #include "AudioChannelService.h"
 #include "nsAboutProtocolUtils.h"
 #include "nsCharTraits.h" // NS_IS_HIGH/LOW_SURROGATE
 #include "PostMessageEvent.h"
 #include "mozilla/dom/DocGroup.h"
 #include "mozilla/dom/TabGroup.h"
 #include "mozilla/StaticPrefs.h"
-#include "PaintWorkletImpl.h"
 
 // Interfaces Needed
 #include "nsIFrame.h"
 #include "nsCanvasFrame.h"
 #include "nsIWidget.h"
 #include "nsIWidgetListener.h"
 #include "nsIBaseWindow.h"
 #include "nsIDeviceSensors.h"
@@ -7815,17 +7814,17 @@ nsGlobalWindowInner::GetPaintWorklet(Err
 {
   if (!mPaintWorklet) {
     nsIPrincipal* principal = GetPrincipal();
     if (!principal) {
       aRv.Throw(NS_ERROR_FAILURE);
       return nullptr;
     }
 
-    mPaintWorklet = PaintWorkletImpl::CreateWorklet(this, principal);
+    mPaintWorklet = new Worklet(this, principal, Worklet::ePaintWorklet);
   }
 
   return mPaintWorklet;
 }
 
 void
 nsGlobalWindowInner::GetRegionalPrefsLocales(nsTArray<nsString>& aLocales)
 {
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -17,17 +17,16 @@
 #include "mozilla/dom/Performance.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/StructuredCloneHolder.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerRunnable.h"
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/dom/WorkletGlobalScope.h"
-#include "mozilla/dom/WorkletImpl.h"
 #include "mozilla/dom/WorkletThread.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/StaticPrefs.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDocument.h"
 #include "nsDOMNavigationTiming.h"
 #include "nsGlobalWindow.h"
 #include "nsJSUtils.h"
@@ -537,35 +536,33 @@ protected:
 
 class ConsoleWorkletRunnable : public Runnable
                              , public ConsoleRunnable
 {
 protected:
   explicit ConsoleWorkletRunnable(Console* aConsole)
     : Runnable("dom::console::ConsoleWorkletRunnable")
     , mConsole(aConsole)
+    , mWorkletThread(WorkletThread::Get())
   {
     WorkletThread::AssertIsOnWorkletThread();
-    nsCOMPtr<WorkletGlobalScope> global = do_QueryInterface(mConsole->mGlobal);
-    MOZ_ASSERT(global);
-    mWorkletImpl = global->Impl();
-    MOZ_ASSERT(mWorkletImpl);
+    MOZ_ASSERT(mWorkletThread);
   }
 
   ~ConsoleWorkletRunnable() override = default;
 
   NS_IMETHOD
   Run() override
   {
     // This runnable is dispatched to main-thread first, then it goes back to
     // worklet thread.
     if (NS_IsMainThread()) {
       RunOnMainThread();
       RefPtr<ConsoleWorkletRunnable> runnable(this);
-      return mWorkletImpl->DispatchRunnable(runnable.forget());
+      return mWorkletThread->DispatchRunnable(runnable.forget());
     }
 
     WorkletThread::AssertIsOnWorkletThread();
 
     ReleaseData();
     mConsole = nullptr;
     return NS_OK;
   }
@@ -577,29 +574,35 @@ protected:
 
   // This method is called in the owning thread of the Console object.
   virtual void
   ReleaseData() = 0;
 
   // This must be released on the worker thread.
   RefPtr<Console> mConsole;
 
-  RefPtr<WorkletImpl> mWorkletImpl;
+  RefPtr<WorkletThread> mWorkletThread;
 };
 
 // This runnable appends a CallData object into the Console queue running on
 // the main-thread.
 class ConsoleCallDataWorkletRunnable final : public ConsoleWorkletRunnable
 {
 public:
   static already_AddRefed<ConsoleCallDataWorkletRunnable>
   Create(Console* aConsole, ConsoleCallData* aConsoleData)
   {
     WorkletThread::AssertIsOnWorkletThread();
 
+    RefPtr<WorkletThread> workletThread = WorkletThread::Get();
+    MOZ_ASSERT(workletThread);
+
+    aConsoleData->SetIDs(workletThread->GetWorkletLoadInfo().OuterWindowID(),
+                         workletThread->GetWorkletLoadInfo().InnerWindowID());
+
     RefPtr<ConsoleCallDataWorkletRunnable> runnable =
       new ConsoleCallDataWorkletRunnable(aConsole, aConsoleData);
 
     if (!runnable->StoreConsoleData(WorkletThread::Get()->GetJSContext(),
                                     aConsoleData)) {
       return nullptr;
     }
 
@@ -611,35 +614,33 @@ private:
                                  ConsoleCallData* aCallData)
     : ConsoleWorkletRunnable(aConsole)
     , mCallData(aCallData)
   {
     WorkletThread::AssertIsOnWorkletThread();
     MOZ_ASSERT(aCallData);
     aCallData->AssertIsOnOwningThread();
 
-    const WorkletLoadInfo& loadInfo = mWorkletImpl->LoadInfo();
-    mCallData->SetIDs(loadInfo.OuterWindowID(), loadInfo.InnerWindowID());
-
     // Marking this CallData as in use.
     mCallData->mStatus = ConsoleCallData::eInUse;
   }
 
   ~ConsoleCallDataWorkletRunnable() override
   {
     MOZ_ASSERT(!mCallData);
   }
 
   void
   RunOnMainThread() override
   {
     AutoSafeJSContext cx;
 
     JSObject* sandbox =
-      mConsole->GetOrCreateSandbox(cx, mWorkletImpl->LoadInfo().Principal());
+      mConsole->GetOrCreateSandbox(cx,
+                                   mWorkletThread->GetWorkletLoadInfo().Principal());
     JS::Rooted<JSObject*> global(cx, sandbox);
     if (NS_WARN_IF(!global)) {
       return;
     }
 
     // The CreateSandbox call returns a proxy to the actual sandbox object. We
     // don't need a proxy here.
     global = js::UncheckedUnwrap(global);
@@ -912,17 +913,18 @@ private:
   void
   RunOnMainThread() override
   {
     AssertIsOnMainThread();
 
     AutoSafeJSContext cx;
 
     JSObject* sandbox =
-      mConsole->GetOrCreateSandbox(cx, mWorkletImpl->LoadInfo().Principal());
+      mConsole->GetOrCreateSandbox(cx,
+                                   mWorkletThread->GetWorkletLoadInfo().Principal());
     JS::Rooted<JSObject*> global(cx, sandbox);
     if (NS_WARN_IF(!global)) {
       return;
     }
 
     // The CreateSandbox call returns a proxy to the actual sandbox object. We
     // don't need a proxy here.
     global = js::UncheckedUnwrap(global);
@@ -995,24 +997,24 @@ private:
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(Console)
 
 // We don't need to traverse/unlink mStorage and mSandbox because they are not
 // CCed objects and they are only used on the main thread, even when this
 // Console object is used on workers.
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Console)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mGlobal)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mConsoleEventNotifier)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mDumpFunction)
   tmp->Shutdown();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Console)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGlobal)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConsoleEventNotifier)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDumpFunction)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Console)
   for (uint32_t i = 0; i < tmp->mCallDataStorage.Length(); ++i) {
     tmp->mCallDataStorage[i]->Trace(aCallbacks, aClosure);
   }
@@ -1047,46 +1049,44 @@ Console::Create(JSContext* aCx, nsPIDOMW
     // shown in the devtools webconsole. But this should be fine because
     // probably we are shutting down, or the window is CCed/GCed.
     nsPIDOMWindowOuter* outerWindow = aWindow->GetOuterWindow();
     if (outerWindow) {
       outerWindowID = outerWindow->WindowID();
     }
   }
 
-  RefPtr<Console> console =
-    new Console(aCx, aWindow->AsGlobal(), outerWindowID, innerWindowID);
+  RefPtr<Console> console = new Console(aCx, aWindow, outerWindowID, innerWindowID);
   console->Initialize(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return console.forget();
 }
 
 /* static */ already_AddRefed<Console>
-Console::CreateForWorklet(JSContext* aCx, nsIGlobalObject* aGlobal,
-                          uint64_t aOuterWindowID, uint64_t aInnerWindowID,
-                          ErrorResult& aRv)
+Console::CreateForWorklet(JSContext* aCx, uint64_t aOuterWindowID,
+                          uint64_t aInnerWindowID, ErrorResult& aRv)
 {
   WorkletThread::AssertIsOnWorkletThread();
 
   RefPtr<Console> console =
-    new Console(aCx, aGlobal, aOuterWindowID, aInnerWindowID);
+    new Console(aCx, nullptr, aOuterWindowID, aInnerWindowID);
   console->Initialize(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return console.forget();
 }
 
-Console::Console(JSContext* aCx, nsIGlobalObject* aGlobal,
+Console::Console(JSContext* aCx, nsPIDOMWindowInner* aWindow,
                  uint64_t aOuterWindowID, uint64_t aInnerWindowID)
-  : mGlobal(aGlobal)
+  : mWindow(aWindow)
   , mOuterID(aOuterWindowID)
   , mInnerID(aInnerWindowID)
   , mDumpToStdout(false)
   , mChromeInstance(false)
   , mMaxLogLevel(ConsoleLogLevel::All)
   , mStatus(eUnknown)
   , mCreationTimeStamp(TimeStamp::Now())
 {
@@ -1113,17 +1113,17 @@ Console::Initialize(ErrorResult& aRv)
 
   if (NS_IsMainThread()) {
     nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
     if (NS_WARN_IF(!obs)) {
       aRv.Throw(NS_ERROR_FAILURE);
       return;
     }
 
-    if (mInnerID) {
+    if (mWindow) {
       aRv = obs->AddObserver(this, "inner-window-destroyed", true);
       if (NS_WARN_IF(aRv.Failed())) {
         return;
       }
     }
 
     aRv = obs->AddObserver(this, "memory-pressure", true);
     if (NS_WARN_IF(aRv.Failed())) {
@@ -1541,51 +1541,49 @@ Console::MethodInternal(JSContext* aCx, 
   if (NS_WARN_IF(!callData->Initialize(aCx, aMethodName, aMethodString,
                                        aData, this))) {
     return;
   }
 
   OriginAttributes oa;
 
   if (NS_IsMainThread()) {
-    if (mGlobal) {
+    if (mWindow) {
       // Save the principal's OriginAttributes in the console event data
       // so that we will be able to filter messages by origin attributes.
-      nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mGlobal);
+      nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mWindow);
       if (NS_WARN_IF(!sop)) {
         return;
       }
 
       nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
       if (NS_WARN_IF(!principal)) {
         return;
       }
 
       oa = principal->OriginAttributesRef();
       callData->SetAddonId(principal);
 
 #ifdef DEBUG
       if (!nsContentUtils::IsSystemPrincipal(principal)) {
-        nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mGlobal);
+        nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
         if (webNav) {
           nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
           MOZ_ASSERT(loadContext);
 
           bool pb;
           if (NS_SUCCEEDED(loadContext->GetUsePrivateBrowsing(&pb))) {
             MOZ_ASSERT(pb == !!oa.mPrivateBrowsingId);
           }
         }
       }
 #endif
     }
   } else if (WorkletThread::IsOnWorkletThread()) {
-    nsCOMPtr<WorkletGlobalScope> global = do_QueryInterface(mGlobal);
-    MOZ_ASSERT(global);
-    oa = global->Impl()->LoadInfo().OriginAttributesRef();
+    oa = WorkletThread::Get()->GetWorkletLoadInfo().OriginAttributesRef();
   } else {
     WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
     MOZ_ASSERT(workerPrivate);
     oa = workerPrivate->GetOriginAttributes();
   }
 
   callData->SetOriginAttributes(oa);
 
@@ -1665,17 +1663,17 @@ Console::MethodInternal(JSContext* aCx, 
              !aData.IsEmpty()) {
     MaybeExecuteDumpFunctionForTime(aCx, aMethodName, aMethodString,
                                     monotonicTimer, aData[0]);
   } else {
     MaybeExecuteDumpFunction(aCx, aMethodString, aData, nullptr);
   }
 
   if (NS_IsMainThread()) {
-    if (mInnerID) {
+    if (mWindow) {
       callData->SetIDs(mOuterID, mInnerID);
     } else if (!mPassedInnerID.IsEmpty()) {
       callData->SetIDs(NS_LITERAL_STRING("jsm"), mPassedInnerID);
     } else {
       nsAutoString filename;
       if (callData->mTopStackFrame.isSome()) {
         filename = callData->mTopStackFrame->mFilename;
       }
@@ -2862,28 +2860,28 @@ Console::GetConsoleInternal(const Global
   }
 }
 
 bool
 Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
                         const Sequence<JS::Value>& aData,
                         DOMHighResTimeStamp* aTimeStamp)
 {
-  if (nsCOMPtr<nsPIDOMWindowInner> innerWindow = do_QueryInterface(mGlobal)) {
-    nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(innerWindow);
+  if (mWindow) {
+    nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(mWindow);
     MOZ_ASSERT(win);
 
     RefPtr<Performance> performance = win->GetPerformance();
     if (!performance) {
       return false;
     }
 
     *aTimeStamp = performance->Now();
 
-    nsDocShell* docShell = static_cast<nsDocShell*>(win->GetDocShell());
+    nsDocShell* docShell = static_cast<nsDocShell*>(mWindow->GetDocShell());
     RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
     bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
 
     // The 'timeStamp' recordings do not need an argument; use empty string
     // if no arguments passed in.
     if (isTimelineRecording && aMethodName == MethodTimeStamp) {
       JS::Rooted<JS::Value> value(aCx, aData.Length() == 0
         ? JS_GetEmptyStringValue(aCx)
--- a/dom/console/Console.h
+++ b/dom/console/Console.h
@@ -40,19 +40,24 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Console, nsIObserver)
   NS_DECL_NSIOBSERVER
 
   static already_AddRefed<Console>
   Create(JSContext* aCx, nsPIDOMWindowInner* aWindow, ErrorResult& aRv);
 
   static already_AddRefed<Console>
-  CreateForWorklet(JSContext* aCx, nsIGlobalObject* aGlobal,
-                   uint64_t aOuterWindowID, uint64_t aInnerWindowID,
-                   ErrorResult& aRv);
+  CreateForWorklet(JSContext* aCx, uint64_t aOuterWindowID,
+                   uint64_t aInnerWindowID, ErrorResult& aRv);
+
+  // WebIDL methods
+  nsPIDOMWindowInner* GetParentObject() const
+  {
+    return mWindow;
+  }
 
   static void
   Log(const GlobalObject& aGlobal, const Sequence<JS::Value>& aData);
 
   static void
   Info(const GlobalObject& aGlobal, const Sequence<JS::Value>& aData);
 
   static void
@@ -130,17 +135,17 @@ public:
   void
   RetrieveConsoleEvents(JSContext* aCx, nsTArray<JS::Value>& aEvents,
                         ErrorResult& aRv);
 
   void
   SetConsoleEventHandler(AnyCallback* aHandler);
 
 private:
-  Console(JSContext* aCx, nsIGlobalObject* aGlobal,
+  Console(JSContext* aCx, nsPIDOMWindowInner* aWindow,
           uint64_t aOuterWindowID, uint64_t aInnerWIndowID);
   ~Console();
 
   void
   Initialize(ErrorResult& aRv);
 
   void
   Shutdown();
@@ -435,19 +440,18 @@ private:
   ShouldProceed(MethodName aName) const;
 
   uint32_t
   WebIDLLogLevelToInteger(ConsoleLogLevel aLevel) const;
 
   uint32_t
   InternalLogLevelToInteger(MethodName aName) const;
 
-  // Owning/CC thread only
-  nsCOMPtr<nsIGlobalObject> mGlobal;
-  // These nsCOMPtr are touched on main thread only.
+  // All these nsCOMPtr are touched on main thread only.
+  nsCOMPtr<nsPIDOMWindowInner> mWindow;
   nsCOMPtr<nsIConsoleAPIStorage> mStorage;
   RefPtr<JSObjectHolder> mSandbox;
 
   // Touched on the owner thread.
   nsDataHashtable<nsStringHashKey, DOMHighResTimeStamp> mTimerRegistry;
   nsDataHashtable<nsStringHashKey, uint32_t> mCounterRegistry;
 
   nsTArray<RefPtr<ConsoleCallData>> mCallDataStorage;
@@ -492,15 +496,14 @@ private:
 
   friend class ConsoleCallData;
   friend class ConsoleCallDataWorkletRunnable;
   friend class ConsoleInstance;
   friend class ConsoleProfileWorkerRunnable;
   friend class ConsoleProfileWorkletRunnable;
   friend class ConsoleRunnable;
   friend class ConsoleWorkerRunnable;
-  friend class ConsoleWorkletRunnable;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* mozilla_dom_Console_h */
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -43,32 +43,32 @@
 
 #include "AudioBuffer.h"
 #include "AudioBufferSourceNode.h"
 #include "AudioChannelService.h"
 #include "AudioDestinationNode.h"
 #include "AudioListener.h"
 #include "AudioNodeStream.h"
 #include "AudioStream.h"
-#include "AudioWorkletImpl.h"
 #include "AutoplayPolicy.h"
 #include "BiquadFilterNode.h"
 #include "ChannelMergerNode.h"
 #include "ChannelSplitterNode.h"
 #include "ConstantSourceNode.h"
 #include "ConvolverNode.h"
 #include "DelayNode.h"
 #include "DynamicsCompressorNode.h"
 #include "GainNode.h"
 #include "IIRFilterNode.h"
 #include "MediaElementAudioSourceNode.h"
 #include "MediaStreamAudioDestinationNode.h"
 #include "MediaStreamAudioSourceNode.h"
 #include "MediaStreamGraph.h"
 #include "nsContentUtils.h"
+#include "nsGlobalWindowInner.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 #include "nsPIDOMWindow.h"
 #include "nsPrintfCString.h"
 #include "nsRFPService.h"
 #include "OscillatorNode.h"
 #include "PannerNode.h"
 #include "PeriodicWave.h"
@@ -586,17 +586,29 @@ AudioContext::Listener()
   }
   return mListener;
 }
 
 Worklet*
 AudioContext::GetAudioWorklet(ErrorResult& aRv)
 {
   if (!mWorklet) {
-    mWorklet = AudioWorkletImpl::CreateWorklet(this, aRv);
+    nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();
+    if (NS_WARN_IF(!window)) {
+      aRv.Throw(NS_ERROR_FAILURE);
+      return nullptr;
+    }
+    nsCOMPtr<nsIPrincipal> principal =
+        nsGlobalWindowInner::Cast(window)->GetPrincipal();
+    if (NS_WARN_IF(!principal)) {
+      aRv.Throw(NS_ERROR_FAILURE);
+      return nullptr;
+    }
+
+    mWorklet = new Worklet(window, principal, Worklet::eAudioWorklet);
   }
 
   return mWorklet;
 }
 
 bool
 AudioContext::IsRunning() const
 {
deleted file mode 100644
--- a/dom/media/webaudio/AudioWorkletImpl.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#include "AudioWorkletImpl.h"
-
-#include "AudioContext.h"
-#include "mozilla/dom/AudioWorkletBinding.h"
-#include "mozilla/dom/AudioWorkletGlobalScope.h"
-#include "mozilla/dom/Worklet.h"
-#include "mozilla/dom/WorkletThread.h"
-#include "nsGlobalWindowInner.h"
-
-namespace mozilla {
-
-/* static */ already_AddRefed<dom::Worklet>
-AudioWorkletImpl::CreateWorklet(dom::AudioContext* aContext, ErrorResult& aRv)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  nsCOMPtr<nsPIDOMWindowInner> window = aContext->GetOwner();
-  if (NS_WARN_IF(!window)) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-  nsCOMPtr<nsIPrincipal> principal =
-    nsGlobalWindowInner::Cast(window)->GetPrincipal();
-  if (NS_WARN_IF(!principal)) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
-  RefPtr<AudioWorkletImpl> impl = new AudioWorkletImpl(window, principal);
-  return MakeAndAddRef<dom::Worklet>(window, std::move(impl));
-}
-
-AudioWorkletImpl::AudioWorkletImpl(nsPIDOMWindowInner* aWindow,
-                                   nsIPrincipal* aPrincipal)
-  : WorkletImpl(aWindow, aPrincipal)
-{
-}
-
-AudioWorkletImpl::~AudioWorkletImpl() = default;
-
-JSObject*
-AudioWorkletImpl::WrapWorklet(JSContext* aCx, dom::Worklet* aWorklet,
-                              JS::Handle<JSObject*> aGivenProto)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  return dom::AudioWorklet_Binding::Wrap(aCx, aWorklet, aGivenProto);
-}
-
-already_AddRefed<dom::WorkletGlobalScope>
-AudioWorkletImpl::ConstructGlobalScope()
-{
-  dom::WorkletThread::AssertIsOnWorkletThread();
-
-  return MakeAndAddRef<dom::AudioWorkletGlobalScope>(this);
-}
-
-} // namespace mozilla
deleted file mode 100644
--- a/dom/media/webaudio/AudioWorkletImpl.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#ifndef AudioWorkletImpl_h
-#define AudioWorkletImpl_h
-
-#include "mozilla/dom/WorkletImpl.h"
-
-namespace mozilla {
-
-namespace dom {
-  class AudioContext;
-}
-
-class AudioWorkletImpl final : public WorkletImpl
-{
-public:
-  // Methods for parent thread only:
-
-  static already_AddRefed<dom::Worklet>
-  CreateWorklet(dom::AudioContext* aContext, ErrorResult& aRv);
-
-  JSObject*
-  WrapWorklet(JSContext* aCx, dom::Worklet* aWorklet,
-              JS::Handle<JSObject*> aGivenProto) override;
-
-protected:
-  // Execution thread only.
-  already_AddRefed<dom::WorkletGlobalScope> ConstructGlobalScope() override;
-
-private:
-  AudioWorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
-  ~AudioWorkletImpl();
-};
-
-} // namespace mozilla
-
-#endif // AudioWorkletImpl_h
--- a/dom/media/webaudio/moz.build
+++ b/dom/media/webaudio/moz.build
@@ -84,17 +84,16 @@ UNIFIED_SOURCES += [
     'AudioNode.cpp',
     'AudioNodeEngine.cpp',
     'AudioNodeExternalInputStream.cpp',
     'AudioNodeStream.cpp',
     'AudioParam.cpp',
     'AudioParamMap.cpp',
     'AudioProcessingEvent.cpp',
     'AudioScheduledSourceNode.cpp',
-    'AudioWorkletImpl.cpp',
     'AudioWorkletNode.cpp',
     'AudioWorkletProcessor.cpp',
     'BiquadFilterNode.cpp',
     'ChannelMergerNode.cpp',
     'ChannelSplitterNode.cpp',
     'ConstantSourceNode.cpp',
     'ConvolverNode.cpp',
     'DelayBuffer.cpp',
--- a/dom/worklet/AudioWorkletGlobalScope.cpp
+++ b/dom/worklet/AudioWorkletGlobalScope.cpp
@@ -7,19 +7,18 @@
 #include "AudioWorkletGlobalScope.h"
 #include "WorkletPrincipal.h"
 #include "mozilla/dom/AudioWorkletGlobalScopeBinding.h"
 #include "mozilla/dom/FunctionBinding.h"
 
 namespace mozilla {
 namespace dom {
 
-AudioWorkletGlobalScope::AudioWorkletGlobalScope(WorkletImpl* aImpl)
-  : WorkletGlobalScope(aImpl)
-  , mCurrentFrame(0)
+AudioWorkletGlobalScope::AudioWorkletGlobalScope()
+  : mCurrentFrame(0)
   , mCurrentTime(0)
   , mSampleRate(0.0)
 {}
 
 bool
 AudioWorkletGlobalScope::WrapGlobalObject(JSContext* aCx,
                                           JS::MutableHandle<JSObject*> aReflector)
 {
--- a/dom/worklet/AudioWorkletGlobalScope.h
+++ b/dom/worklet/AudioWorkletGlobalScope.h
@@ -5,27 +5,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_AudioWorkletGlobalScope_h
 #define mozilla_dom_AudioWorkletGlobalScope_h
 
 #include "mozilla/dom/WorkletGlobalScope.h"
 
 namespace mozilla {
-
-class WorkletImpl;
-
 namespace dom {
 
 class VoidFunction;
 
 class AudioWorkletGlobalScope final : public WorkletGlobalScope
 {
 public:
-  explicit AudioWorkletGlobalScope(WorkletImpl* aImpl);
+  AudioWorkletGlobalScope();
 
   bool
   WrapGlobalObject(JSContext* aCx,
                    JS::MutableHandle<JSObject*> aReflector) override;
 
   void
   RegisterProcessor(const nsAString& aType,
                     VoidFunction& aProcessorCtor);
--- a/dom/worklet/PaintWorkletGlobalScope.cpp
+++ b/dom/worklet/PaintWorkletGlobalScope.cpp
@@ -7,20 +7,17 @@
 #include "PaintWorkletGlobalScope.h"
 #include "WorkletPrincipal.h"
 #include "mozilla/dom/PaintWorkletGlobalScopeBinding.h"
 #include "mozilla/dom/FunctionBinding.h"
 
 namespace mozilla {
 namespace dom {
 
-PaintWorkletGlobalScope::PaintWorkletGlobalScope(WorkletImpl* aImpl)
-  : WorkletGlobalScope(aImpl)
-{
-}
+PaintWorkletGlobalScope::PaintWorkletGlobalScope() = default;
 
 bool
 PaintWorkletGlobalScope::WrapGlobalObject(JSContext* aCx,
                                           JS::MutableHandle<JSObject*> aReflector)
 {
   JS::RealmOptions options;
   return PaintWorkletGlobalScope_Binding::Wrap(aCx, this, this,
                                               options,
--- a/dom/worklet/PaintWorkletGlobalScope.h
+++ b/dom/worklet/PaintWorkletGlobalScope.h
@@ -5,27 +5,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_PaintWorkletGlobalScope_h
 #define mozilla_dom_PaintWorkletGlobalScope_h
 
 #include "mozilla/dom/WorkletGlobalScope.h"
 
 namespace mozilla {
-
-class WorkletImpl;
-
 namespace dom {
 
 class VoidFunction;
 
 class PaintWorkletGlobalScope final : public WorkletGlobalScope
 {
 public:
-  explicit PaintWorkletGlobalScope(WorkletImpl* aImpl);
+  PaintWorkletGlobalScope();
 
   bool
   WrapGlobalObject(JSContext* aCx,
                    JS::MutableHandle<JSObject*> aReflector) override;
 
   void
   RegisterPaint(const nsAString& aType, VoidFunction& aProcessorCtor);
 
--- a/dom/worklet/Worklet.cpp
+++ b/dom/worklet/Worklet.cpp
@@ -1,64 +1,69 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "Worklet.h"
 #include "WorkletThread.h"
+#include "AudioWorkletGlobalScope.h"
+#include "PaintWorkletGlobalScope.h"
 
 #include "mozilla/dom/WorkletBinding.h"
+#include "mozilla/dom/AudioWorkletBinding.h"
 #include "mozilla/dom/BlobBinding.h"
+#include "mozilla/dom/DOMPrefs.h"
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
+#include "mozilla/dom/RegisterWorkletBindings.h"
 #include "mozilla/dom/Response.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/ScriptLoader.h"
-#include "mozilla/dom/WorkletImpl.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/SourceBufferHolder.h"
 #include "nsIInputStreamPump.h"
 #include "nsIThreadRetargetableRequest.h"
 #include "nsNetUtil.h"
 #include "xpcprivate.h"
 
 namespace mozilla {
 namespace dom {
 
 class ExecutionRunnable final : public Runnable
 {
 public:
-  ExecutionRunnable(WorkletFetchHandler* aHandler, WorkletImpl* aWorkletImpl,
-                    JS::UniqueTwoByteChars aScriptBuffer, size_t aScriptLength)
+  ExecutionRunnable(WorkletFetchHandler* aHandler, Worklet::WorkletType aType,
+                    JS::UniqueTwoByteChars aScriptBuffer, size_t aScriptLength,
+                    const WorkletLoadInfo& aWorkletLoadInfo)
     : Runnable("Worklet::ExecutionRunnable")
     , mHandler(aHandler)
-    , mWorkletImpl(aWorkletImpl)
     , mScriptBuffer(std::move(aScriptBuffer))
     , mScriptLength(aScriptLength)
+    , mWorkletType(aType)
     , mResult(NS_ERROR_FAILURE)
   {
     MOZ_ASSERT(NS_IsMainThread());
   }
 
   NS_IMETHOD
   Run() override;
 
 private:
   void
   RunOnWorkletThread();
 
   void
   RunOnMainThread();
 
   RefPtr<WorkletFetchHandler> mHandler;
-  RefPtr<WorkletImpl> mWorkletImpl;
   JS::UniqueTwoByteChars mScriptBuffer;
   size_t mScriptLength;
+  Worklet::WorkletType mWorkletType;
   nsresult mResult;
 };
 
 // ---------------------------------------------------------------------------
 // WorkletFetchHandler
 
 class WorkletFetchHandler final : public PromiseNativeHandler
                                 , public nsIStreamLoaderObserver
@@ -219,20 +224,20 @@ public:
                                    scriptTextBuf, scriptTextLength);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       RejectPromises(rv);
       return NS_OK;
     }
 
     // Moving the ownership of the buffer
     nsCOMPtr<nsIRunnable> runnable =
-      new ExecutionRunnable(this, mWorklet->mImpl, std::move(scriptTextBuf),
-                            scriptTextLength);
+      new ExecutionRunnable(this, mWorklet->Type(), std::move(scriptTextBuf),
+                            scriptTextLength, mWorklet->LoadInfo());
 
-    RefPtr<WorkletThread> thread = mWorklet->mImpl->GetOrCreateThread();
+    RefPtr<WorkletThread> thread = mWorklet->GetOrCreateThread();
     if (!thread) {
       RejectPromises(NS_ERROR_FAILURE);
       return NS_OK;
     }
 
     if (NS_FAILED(thread->DispatchRunnable(runnable.forget()))) {
       RejectPromises(NS_ERROR_FAILURE);
       return NS_OK;
@@ -377,17 +382,17 @@ ExecutionRunnable::RunOnWorkletThread()
   MOZ_ASSERT(workletThread);
 
   JSContext* cx = workletThread->GetJSContext();
 
   AutoJSAPI jsapi;
   jsapi.Init();
 
   RefPtr<WorkletGlobalScope> globalScope =
-    mWorkletImpl->CreateGlobalScope(jsapi.cx());
+    Worklet::CreateGlobalScope(jsapi.cx(), mWorkletType);
   MOZ_ASSERT(globalScope);
 
   AutoEntryScript aes(globalScope, "Worklet");
   cx = aes.cx();
 
   JS::Rooted<JSObject*> globalObj(cx, globalScope->GetGlobalJSObject());
 
   NS_ConvertUTF16toUTF8 url(mHandler->URL());
@@ -424,23 +429,46 @@ ExecutionRunnable::RunOnMainThread()
     mHandler->ExecutionFailed(mResult);
     return;
   }
 
   mHandler->ExecutionSucceeded();
 }
 
 // ---------------------------------------------------------------------------
+// WorkletLoadInfo
+
+WorkletLoadInfo::WorkletLoadInfo(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
+  : mInnerWindowID(aWindow->WindowID())
+  , mDumpEnabled(DOMPrefs::DumpEnabled())
+  , mOriginAttributes(BasePrincipal::Cast(aPrincipal)->OriginAttributesRef())
+  , mPrincipal(aPrincipal)
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  nsPIDOMWindowOuter* outerWindow = aWindow->GetOuterWindow();
+  if (outerWindow) {
+    mOuterWindowID = outerWindow->WindowID();
+  } else {
+    mOuterWindowID = 0;
+  }
+}
+
+WorkletLoadInfo::~WorkletLoadInfo()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+}
+
+// ---------------------------------------------------------------------------
 // Worklet
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(Worklet)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Worklet)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
-  tmp->mImpl->TerminateThread();
+  tmp->TerminateThread();
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Worklet)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(Worklet)
@@ -448,50 +476,88 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCA
 NS_IMPL_CYCLE_COLLECTING_ADDREF(Worklet)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Worklet)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Worklet)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-Worklet::Worklet(nsPIDOMWindowInner* aWindow, RefPtr<WorkletImpl> aImpl)
+Worklet::Worklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal,
+                 WorkletType aWorkletType)
   : mWindow(aWindow)
-  , mImpl(std::move(aImpl))
+  , mWorkletType(aWorkletType)
+  , mWorkletLoadInfo(aWindow, aPrincipal)
 {
   MOZ_ASSERT(aWindow);
-  MOZ_ASSERT(mImpl);
+  MOZ_ASSERT(aPrincipal);
   MOZ_ASSERT(NS_IsMainThread());
 
 #ifdef RELEASE_OR_BETA
   MOZ_CRASH("This code should not go to release/beta yet!");
 #endif
 }
 
 Worklet::~Worklet()
 {
-  mImpl->TerminateThread();
+  TerminateThread();
 }
 
 JSObject*
 Worklet::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
-  return mImpl->WrapWorklet(aCx, this, aGivenProto);
+  MOZ_ASSERT(NS_IsMainThread());
+  if (mWorkletType == eAudioWorklet) {
+    return AudioWorklet_Binding::Wrap(aCx, this, aGivenProto);
+  } else {
+    return Worklet_Binding::Wrap(aCx, this, aGivenProto);
+  }
 }
 
 already_AddRefed<Promise>
 Worklet::AddModule(const nsAString& aModuleURL,
                    const WorkletOptions& aOptions,
                    CallerType aCallerType,
                    ErrorResult& aRv)
 {
   MOZ_ASSERT(NS_IsMainThread());
   return WorkletFetchHandler::Fetch(this, aModuleURL, aOptions, aCallerType, aRv);
 }
 
+/* static */ already_AddRefed<WorkletGlobalScope>
+Worklet::CreateGlobalScope(JSContext* aCx, WorkletType aWorkletType)
+{
+  WorkletThread::AssertIsOnWorkletThread();
+
+  RefPtr<WorkletGlobalScope> scope;
+
+  switch (aWorkletType) {
+    case eAudioWorklet:
+      scope = new AudioWorkletGlobalScope();
+      break;
+    case ePaintWorklet:
+      scope = new PaintWorkletGlobalScope();
+      break;
+  }
+
+  JS::Rooted<JSObject*> global(aCx);
+  NS_ENSURE_TRUE(scope->WrapGlobalObject(aCx, &global), nullptr);
+
+  JSAutoRealm ar(aCx, global);
+
+  // Init Web IDL bindings
+  if (!RegisterWorkletBindings(aCx, global)) {
+    return nullptr;
+  }
+
+  JS_FireOnNewGlobalObject(aCx, global);
+
+  return scope.forget();
+}
+
 WorkletFetchHandler*
 Worklet::GetImportFetchHandler(const nsACString& aURI)
 {
   MOZ_ASSERT(NS_IsMainThread());
   return mImportHandlers.GetWeak(aURI);
 }
 
 void
@@ -500,10 +566,36 @@ Worklet::AddImportFetchHandler(const nsA
 {
   MOZ_ASSERT(aHandler);
   MOZ_ASSERT(!mImportHandlers.GetWeak(aURI));
   MOZ_ASSERT(NS_IsMainThread());
 
   mImportHandlers.Put(aURI, aHandler);
 }
 
+WorkletThread*
+Worklet::GetOrCreateThread()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+
+  if (!mWorkletThread) {
+    // Thread creation. FIXME: this will change.
+    mWorkletThread = WorkletThread::Create(mWorkletLoadInfo);
+  }
+
+  return mWorkletThread;
+}
+
+void
+Worklet::TerminateThread()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  if (!mWorkletThread) {
+    return;
+  }
+
+  mWorkletThread->Terminate();
+  mWorkletThread = nullptr;
+  mWorkletLoadInfo.mPrincipal = nullptr;
+}
+
 } // dom namespace
 } // mozilla namespace
--- a/dom/worklet/Worklet.h
+++ b/dom/worklet/Worklet.h
@@ -3,70 +3,134 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_Worklet_h
 #define mozilla_dom_Worklet_h
 
 #include "mozilla/Attributes.h"
+#include "mozilla/BasePrincipal.h"
 #include "mozilla/ErrorResult.h"
 #include "nsRefPtrHashtable.h"
 #include "nsWrapperCache.h"
 #include "nsCOMPtr.h"
 
 class nsPIDOMWindowInner;
+class nsIPrincipal;
 
 namespace mozilla {
-
-class WorkletImpl;
-
 namespace dom {
 
 class Promise;
+class Worklet;
 class WorkletFetchHandler;
+class WorkletGlobalScope;
 struct WorkletOptions;
+class WorkletThread;
 enum class CallerType : uint32_t;
 
+class WorkletLoadInfo
+{
+public:
+  WorkletLoadInfo(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
+  ~WorkletLoadInfo();
+
+  uint64_t OuterWindowID() const { return mOuterWindowID; }
+  uint64_t InnerWindowID() const { return mInnerWindowID; }
+  bool DumpEnabled() const { return mDumpEnabled; }
+
+  const OriginAttributes& OriginAttributesRef() const
+  {
+    return mOriginAttributes;
+  }
+
+  nsIPrincipal* Principal() const
+  {
+    MOZ_ASSERT(NS_IsMainThread());
+    return mPrincipal;
+  }
+
+private:
+  uint64_t mOuterWindowID;
+  uint64_t mInnerWindowID;
+  bool mDumpEnabled;
+  OriginAttributes mOriginAttributes;
+  nsCOMPtr<nsIPrincipal> mPrincipal;
+
+  friend class Worklet;
+  friend class WorkletThread;
+};
+
 class Worklet final : public nsISupports
                     , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Worklet)
 
-  Worklet(nsPIDOMWindowInner* aWindow, RefPtr<WorkletImpl> aImpl);
+  enum WorkletType {
+    eAudioWorklet,
+    ePaintWorklet,
+  };
+
+  Worklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal,
+          WorkletType aWorkletType);
 
   nsPIDOMWindowInner* GetParentObject() const
   {
     return mWindow;
   }
 
   virtual JSObject*
   WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   already_AddRefed<Promise>
   AddModule(const nsAString& aModuleURL,
             const WorkletOptions& aOptions,
             CallerType aCallerType, ErrorResult& aRv);
 
+  WorkletType Type() const
+  {
+    return mWorkletType;
+  }
+
+  static already_AddRefed<WorkletGlobalScope>
+  CreateGlobalScope(JSContext* aCx, WorkletType aWorkletType);
+
+  WorkletThread*
+  GetOrCreateThread();
+
+  const WorkletLoadInfo&
+  LoadInfo() const
+  {
+    return mWorkletLoadInfo;
+  }
+
 private:
   ~Worklet();
 
   WorkletFetchHandler*
   GetImportFetchHandler(const nsACString& aURI);
 
   void
   AddImportFetchHandler(const nsACString& aURI, WorkletFetchHandler* aHandler);
 
+  void
+  TerminateThread();
+
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
 
+  WorkletType mWorkletType;
+
   nsRefPtrHashtable<nsCStringHashKey, WorkletFetchHandler> mImportHandlers;
 
-  const RefPtr<WorkletImpl> mImpl;
+  RefPtr<WorkletThread> mWorkletThread;
+
+  WorkletLoadInfo mWorkletLoadInfo;
 
   friend class WorkletFetchHandler;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_Worklet_h
--- a/dom/worklet/WorkletGlobalScope.cpp
+++ b/dom/worklet/WorkletGlobalScope.cpp
@@ -1,19 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WorkletGlobalScope.h"
 #include "mozilla/dom/WorkletGlobalScopeBinding.h"
-#include "mozilla/dom/WorkletImpl.h"
 #include "mozilla/dom/Console.h"
-#include "mozilla/StaticPrefs.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(WorkletGlobalScope)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(WorkletGlobalScope)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
@@ -31,54 +29,56 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCA
 NS_IMPL_CYCLE_COLLECTING_ADDREF(WorkletGlobalScope)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(WorkletGlobalScope)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WorkletGlobalScope)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
   NS_INTERFACE_MAP_ENTRY(WorkletGlobalScope)
 NS_INTERFACE_MAP_END
 
-WorkletGlobalScope::WorkletGlobalScope(WorkletImpl* aImpl)
-  : mImpl(aImpl)
-{
-}
-
-WorkletGlobalScope::~WorkletGlobalScope() = default;
+WorkletGlobalScope::WorkletGlobalScope() = default;
 
 JSObject*
 WorkletGlobalScope::WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto)
 {
   MOZ_CRASH("We should never get here!");
   return nullptr;
 }
 
 already_AddRefed<Console>
 WorkletGlobalScope::GetConsole(JSContext* aCx, ErrorResult& aRv)
 {
+  RefPtr<WorkletThread> thread = WorkletThread::Get();
+  MOZ_ASSERT(thread);
+
   if (!mConsole) {
-    const WorkletLoadInfo& loadInfo = mImpl->LoadInfo();
-    mConsole = Console::CreateForWorklet(aCx, this,
-                                         loadInfo.OuterWindowID(),
-                                         loadInfo.InnerWindowID(), aRv);
+    mConsole =
+      Console::CreateForWorklet(aCx,
+                                thread->GetWorkletLoadInfo().OuterWindowID(),
+                                thread->GetWorkletLoadInfo().InnerWindowID(),
+                                aRv);
     if (NS_WARN_IF(aRv.Failed())) {
       return nullptr;
     }
   }
 
   RefPtr<Console> console = mConsole;
   return console.forget();
 }
 
 void
 WorkletGlobalScope::Dump(const Optional<nsAString>& aString) const
 {
   WorkletThread::AssertIsOnWorkletThread();
 
-  if (!StaticPrefs::browser_dom_window_dump_enabled()) {
+  WorkletThread* workletThread = WorkletThread::Get();
+  MOZ_ASSERT(workletThread);
+
+  if (!workletThread->GetWorkletLoadInfo().DumpEnabled()) {
     return;
   }
 
   if (!aString.WasPassed()) {
     return;
   }
 
   NS_ConvertUTF16toUTF8 str(aString.Value());
--- a/dom/worklet/WorkletGlobalScope.h
+++ b/dom/worklet/WorkletGlobalScope.h
@@ -13,33 +13,30 @@
 #include "nsIGlobalObject.h"
 #include "nsWrapperCache.h"
 
 #define WORKLET_IID \
   { 0x1b3f62e7, 0xe357, 0x44be, \
     { 0xbf, 0xe0, 0xdf, 0x85, 0xe6, 0x56, 0x85, 0xac } }
 
 namespace mozilla {
-
-class WorkletImpl;
-
 namespace dom {
 
 class Console;
 
 class WorkletGlobalScope : public nsIGlobalObject
                          , public nsWrapperCache
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(WORKLET_IID)
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WorkletGlobalScope)
 
-  explicit WorkletGlobalScope(WorkletImpl* aImpl);
+  WorkletGlobalScope();
 
   nsIGlobalObject* GetParentObject() const
   {
     return nullptr;
   }
 
   virtual JSObject*
   WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
@@ -51,26 +48,23 @@ public:
   GetGlobalJSObject() override
   {
     return GetWrapper();
   }
 
   already_AddRefed<Console>
   GetConsole(JSContext* aCx, ErrorResult& aRv);
 
-  WorkletImpl* Impl() const { return mImpl; }
-
   void
   Dump(const Optional<nsAString>& aString) const;
 
 protected:
-  ~WorkletGlobalScope();;
+  ~WorkletGlobalScope() = default;
 
 private:
-  const RefPtr<WorkletImpl> mImpl;
   RefPtr<Console> mConsole;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(WorkletGlobalScope, WORKLET_IID)
 
 } // namespace dom
 } // namespace mozilla
 
deleted file mode 100644
--- a/dom/worklet/WorkletImpl.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#include "WorkletImpl.h"
-
-#include "Worklet.h"
-#include "WorkletThread.h"
-
-#include "mozilla/BasePrincipal.h"
-#include "mozilla/dom/RegisterWorkletBindings.h"
-#include "mozilla/dom/WorkletBinding.h"
-
-namespace mozilla {
-
-// ---------------------------------------------------------------------------
-// WorkletLoadInfo
-
-WorkletLoadInfo::WorkletLoadInfo(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
-  : mInnerWindowID(aWindow->WindowID())
-  , mOriginAttributes(BasePrincipal::Cast(aPrincipal)->OriginAttributesRef())
-  , mPrincipal(aPrincipal)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  nsPIDOMWindowOuter* outerWindow = aWindow->GetOuterWindow();
-  if (outerWindow) {
-    mOuterWindowID = outerWindow->WindowID();
-  } else {
-    mOuterWindowID = 0;
-  }
-}
-
-WorkletLoadInfo::~WorkletLoadInfo()
-{
-  MOZ_ASSERT(!mPrincipal || NS_IsMainThread());
-}
-
-// ---------------------------------------------------------------------------
-// WorkletImpl
-
-WorkletImpl::WorkletImpl(nsPIDOMWindowInner* aWindow,
-                         nsIPrincipal* aPrincipal)
-  : mWorkletLoadInfo(aWindow, aPrincipal)
-{
-}
-
-WorkletImpl::~WorkletImpl() = default;
-
-JSObject*
-WorkletImpl::WrapWorklet(JSContext* aCx, dom::Worklet* aWorklet,
-                         JS::Handle<JSObject*> aGivenProto)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  return dom::Worklet_Binding::Wrap(aCx, aWorklet, aGivenProto);
-}
-
-already_AddRefed<dom::WorkletGlobalScope>
-WorkletImpl::CreateGlobalScope(JSContext* aCx)
-{
-  dom::WorkletThread::AssertIsOnWorkletThread();
-
-  RefPtr<dom::WorkletGlobalScope> scope = ConstructGlobalScope();
-
-  JS::Rooted<JSObject*> global(aCx);
-  NS_ENSURE_TRUE(scope->WrapGlobalObject(aCx, &global), nullptr);
-
-  JSAutoRealm ar(aCx, global);
-
-  // Init Web IDL bindings
-  if (!dom::RegisterWorkletBindings(aCx, global)) {
-    return nullptr;
-  }
-
-  JS_FireOnNewGlobalObject(aCx, global);
-
-  return scope.forget();
-}
-
-dom::WorkletThread*
-WorkletImpl::GetOrCreateThread()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!mWorkletThread) {
-    // Thread creation. FIXME: this will change.
-    mWorkletThread = dom::WorkletThread::Create();
-  }
-
-  return mWorkletThread;
-}
-
-void
-WorkletImpl::TerminateThread()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  if (!mWorkletThread) {
-    return;
-  }
-
-  mWorkletThread->Terminate();
-  mWorkletThread = nullptr;
-  mWorkletLoadInfo.mPrincipal = nullptr;
-}
-
-nsresult
-WorkletImpl::DispatchRunnable(already_AddRefed<nsIRunnable> aRunnable)
-{
-  // TODO: bug 1492011 re ConsoleWorkletRunnable.
-  MOZ_ASSERT(mWorkletThread);
-  return mWorkletThread->DispatchRunnable(std::move(aRunnable));
-}
-
-} // namespace mozilla
deleted file mode 100644
--- a/dom/worklet/WorkletImpl.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_worklet_WorkletImpl_h
-#define mozilla_dom_worklet_WorkletImpl_h
-
-#include "MainThreadUtils.h"
-#include "mozilla/OriginAttributes.h"
-
-class nsPIDOMWindowInner;
-class nsIPrincipal;
-class nsIRunnable;
-
-namespace mozilla {
-
-namespace dom {
-
-class Worklet;
-class WorkletGlobalScope;
-class WorkletThread;
-
-} // namespace dom
-
-class WorkletLoadInfo
-{
-public:
-  WorkletLoadInfo(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
-  ~WorkletLoadInfo();
-
-  uint64_t OuterWindowID() const { return mOuterWindowID; }
-  uint64_t InnerWindowID() const { return mInnerWindowID; }
-
-  const OriginAttributes& OriginAttributesRef() const
-  {
-    return mOriginAttributes;
-  }
-
-  nsIPrincipal* Principal() const
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-    return mPrincipal;
-  }
-
-private:
-  // Modified only in constructor.
-  uint64_t mOuterWindowID;
-  const uint64_t mInnerWindowID;
-  const OriginAttributes mOriginAttributes;
-  // Accessed on only worklet parent thread.
-  nsCOMPtr<nsIPrincipal> mPrincipal;
-
-  friend class WorkletImpl;
-  friend class WorkletThread;
-};
-
-/**
- * WorkletImpl is accessed from both the worklet's parent thread (on which the
- * Worklet object lives) and the worklet's execution thread.  It is owned by
- * Worklet and WorkletGlobalScope.  No parent thread cycle collected objects
- * are owned indefinitely by WorkletImpl because WorkletImpl is not cycle
- * collected.
- */
-class WorkletImpl
-{
-public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WorkletImpl);
-
-  // Methods for parent thread only:
-
-  virtual JSObject*
-  WrapWorklet(JSContext* aCx, dom::Worklet* aWorklet,
-              JS::Handle<JSObject*> aGivenProto);
-
-  dom::WorkletThread* GetOrCreateThread();
-  void TerminateThread();
-
-  // Execution thread only.
-  already_AddRefed<dom::WorkletGlobalScope> CreateGlobalScope(JSContext* aCx);
-
-  // Any thread.
-
-  const WorkletLoadInfo& LoadInfo() const { return mWorkletLoadInfo; }
-
-  // Use DispatchRunnable only when the thread is known to already exist.
-  nsresult DispatchRunnable(already_AddRefed<nsIRunnable> aRunnable);
-
-protected:
-  WorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
-  virtual ~WorkletImpl();
-
-  virtual already_AddRefed<dom::WorkletGlobalScope> ConstructGlobalScope() = 0;
-
-  // The only WorkletLoadInfo member modified is mPrincipal which is accessed
-  // on only the parent thread.
-  WorkletLoadInfo mWorkletLoadInfo;
-
-  // Parent thread only.
-  RefPtr<dom::WorkletThread> mWorkletThread;
-};
-
-} // namespace mozilla
-
-#endif // mozilla_dom_worklet_WorkletImpl_h
--- a/dom/worklet/WorkletThread.cpp
+++ b/dom/worklet/WorkletThread.cpp
@@ -254,39 +254,41 @@ public:
     mWorkletThread->TerminateInternal();
     return NS_OK;
   }
 
 private:
   RefPtr<WorkletThread> mWorkletThread;
 };
 
-WorkletThread::WorkletThread()
+WorkletThread::WorkletThread(const WorkletLoadInfo& aWorkletLoadInfo)
   : nsThread(MakeNotNull<ThreadEventQueue<mozilla::EventQueue>*>(
                MakeUnique<mozilla::EventQueue>()),
              nsThread::NOT_MAIN_THREAD, kWorkletStackSize)
+  , mWorkletLoadInfo(aWorkletLoadInfo)
   , mCreationTimeStamp(TimeStamp::Now())
   , mJSContext(nullptr)
   , mIsTerminating(false)
 {
   MOZ_ASSERT(NS_IsMainThread());
   nsContentUtils::RegisterShutdownObserver(this);
 }
 
 WorkletThread::~WorkletThread()
 {
   // This should be gone during the termination step.
   MOZ_ASSERT(!mJSContext);
 }
 
 // static
 already_AddRefed<WorkletThread>
-WorkletThread::Create()
+WorkletThread::Create(const WorkletLoadInfo& aWorkletLoadInfo)
 {
-  RefPtr<WorkletThread> thread = new WorkletThread();
+  RefPtr<WorkletThread> thread =
+    new WorkletThread(aWorkletLoadInfo);
   if (NS_WARN_IF(NS_FAILED(thread->Init()))) {
     return nullptr;
   }
 
   RefPtr<PrimaryRunnable> runnable = new PrimaryRunnable(thread);
   if (NS_WARN_IF(NS_FAILED(thread->DispatchRunnable(runnable.forget())))) {
     return nullptr;
   }
@@ -401,16 +403,22 @@ WorkletThread::TerminateInternal()
 JSContext*
 WorkletThread::GetJSContext() const
 {
   AssertIsOnWorkletThread();
   MOZ_ASSERT(mJSContext);
   return mJSContext;
 }
 
+const WorkletLoadInfo&
+WorkletThread::GetWorkletLoadInfo() const
+{
+  return mWorkletLoadInfo;
+}
+
 /* static */ bool
 WorkletThread::IsOnWorkletThread()
 {
   CycleCollectedJSContext* ccjscx = CycleCollectedJSContext::Get();
   return ccjscx && ccjscx->GetAsWorkletJSContext();
 }
 
 /* static */ void
--- a/dom/worklet/WorkletThread.h
+++ b/dom/worklet/WorkletThread.h
@@ -4,62 +4,70 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_worklet_WorkletThread_h
 #define mozilla_dom_worklet_WorkletThread_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/CondVar.h"
+#include "mozilla/dom/Worklet.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/TimeStamp.h"
 #include "nsThread.h"
 
 class nsIRunnable;
 
 namespace mozilla {
 namespace dom {
 
 class WorkletThread final : public nsThread, public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIOBSERVER
 
-  static already_AddRefed<WorkletThread> Create();
+  static already_AddRefed<WorkletThread>
+  Create(const WorkletLoadInfo& aWorkletLoadInfo);
 
   static WorkletThread*
   Get();
 
   static bool
   IsOnWorkletThread();
 
   static void
   AssertIsOnWorkletThread();
 
+  static JSPrincipals*
+  GetWorkerPrincipal();
+
   JSContext*
   GetJSContext() const;
 
+  const WorkletLoadInfo&
+  GetWorkletLoadInfo() const;
+
   nsresult
   DispatchRunnable(already_AddRefed<nsIRunnable> aRunnable);
 
   void
   Terminate();
 
   DOMHighResTimeStamp
   TimeStampToDOMHighRes(const TimeStamp& aTimeStamp) const
   {
     MOZ_ASSERT(!aTimeStamp.IsNull());
     TimeDuration duration = aTimeStamp - mCreationTimeStamp;
     return duration.ToMilliseconds();
   }
 
 private:
-  WorkletThread();
+  explicit WorkletThread(const WorkletLoadInfo& aWorkletLoadInfo);
   ~WorkletThread();
 
   void
   RunEventLoop(JSRuntime* aParentRuntime);
   class PrimaryRunnable;
 
   void
   TerminateInternal();
@@ -71,16 +79,17 @@ private:
   Dispatch(already_AddRefed<nsIRunnable> aRunnable, uint32_t aFlags) override;
 
   NS_IMETHOD
   DispatchFromScript(nsIRunnable* aRunnable, uint32_t aFlags) override;
 
   NS_IMETHOD
   DelayedDispatch(already_AddRefed<nsIRunnable>, uint32_t) override;
 
+  const WorkletLoadInfo mWorkletLoadInfo;
   TimeStamp mCreationTimeStamp;
 
   // Touched only on the worklet thread. This is a raw pointer because it's set
   // and nullified by RunEventLoop().
   JSContext* mJSContext;
 
   bool mIsTerminating; // main thread
 };
--- a/dom/worklet/moz.build
+++ b/dom/worklet/moz.build
@@ -7,27 +7,25 @@
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM")
 
 EXPORTS.mozilla.dom += [
     'AudioWorkletGlobalScope.h',
     'PaintWorkletGlobalScope.h',
     'Worklet.h',
     'WorkletGlobalScope.h',
-    'WorkletImpl.h',
     'WorkletPrincipal.h',
     'WorkletThread.h',
 ]
 
 UNIFIED_SOURCES += [
     'AudioWorkletGlobalScope.cpp',
     'PaintWorkletGlobalScope.cpp',
     'Worklet.cpp',
     'WorkletGlobalScope.cpp',
-    'WorkletImpl.cpp',
     'WorkletPrincipal.cpp',
     'WorkletThread.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/js/xpconnect/src',
 ]
 
deleted file mode 100644
--- a/layout/style/PaintWorkletImpl.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#include "PaintWorkletImpl.h"
-
-#include "mozilla/dom/PaintWorkletGlobalScope.h"
-#include "mozilla/dom/Worklet.h"
-#include "mozilla/dom/WorkletThread.h"
-
-namespace mozilla {
-
-/* static */ already_AddRefed<dom::Worklet>
-PaintWorkletImpl::CreateWorklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  RefPtr<PaintWorkletImpl> impl = new PaintWorkletImpl(aWindow, aPrincipal);
-  return MakeAndAddRef<dom::Worklet>(aWindow, std::move(impl));
-}
-
-PaintWorkletImpl::PaintWorkletImpl(nsPIDOMWindowInner* aWindow,
-                                   nsIPrincipal* aPrincipal)
-  : WorkletImpl(aWindow, aPrincipal)
-{
-}
-
-PaintWorkletImpl::~PaintWorkletImpl() = default;
-
-already_AddRefed<dom::WorkletGlobalScope>
-PaintWorkletImpl::ConstructGlobalScope()
-{
-  dom::WorkletThread::AssertIsOnWorkletThread();
-
-  return MakeAndAddRef<dom::PaintWorkletGlobalScope>(this);
-}
-
-} // namespace mozilla
deleted file mode 100644
--- a/layout/style/PaintWorkletImpl.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-#ifndef PaintWorkletImpl_h
-#define PaintWorkletImpl_h
-
-#include "mozilla/dom/WorkletImpl.h"
-
-namespace mozilla {
-
-class PaintWorkletImpl final : public WorkletImpl
-{
-public:
-  // Methods for parent thread only:
-
-  static already_AddRefed<dom::Worklet>
-  CreateWorklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
-
-protected:
-  // Execution thread only.
-  already_AddRefed<dom::WorkletGlobalScope> ConstructGlobalScope() override;
-
-private:
-  PaintWorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
-  ~PaintWorkletImpl();
-};
-
-} // namespace mozilla
-
-#endif // PaintWorkletImpl_h
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -197,17 +197,16 @@ UNIFIED_SOURCES += [
     'nsICSSDeclaration.cpp',
     'nsMediaFeatures.cpp',
     'nsROCSSPrimitiveValue.cpp',
     'nsStyleCoord.cpp',
     'nsStyleStruct.cpp',
     'nsStyleTransformMatrix.cpp',
     'nsStyleUtil.cpp',
     'nsTransitionManager.cpp',
-    'PaintWorkletImpl.cpp',
     'PostTraversalTask.cpp',
     'PreloadedStyleSheet.cpp',
     'Rule.cpp',
     'ServoBindings.cpp',
     'ServoCSSParser.cpp',
     'ServoCSSRuleList.cpp',
     'ServoElementSnapshot.cpp',
     'ServoStyleSet.cpp',