bug 1442776 make CycleCollectedJSContext accessible from JSContext private r=peterv

Inheriting PerThreadAtomCache on CycleCollectedJSContext permits use of
static_cast, avoiding one level of indirection compared to adding a
CycleCollectedJSContext* to PerThreadAtomCache.

PerThreadAtomCache is over 18kB, and so WorkerJSContext and WorkletJSContext
are moved from the stack to the heap.

MozReview-Commit-ID: 6jdJeZcviK4
This commit is contained in:
Karl Tomlinson
2018-05-10 17:04:12 +12:00
parent 0c033711ef
commit 4b6d0c28fa
12 changed files with 83 additions and 127 deletions

View File

@@ -20,6 +20,7 @@
#include "nsPluginStreamListenerPeer.h"
#include "nsIServiceManager.h"
#include "nsThreadUtils.h"
#include "mozilla/CycleCollectedJSContext.h" // for nsAutoMicroTask
#include "mozilla/Preferences.h"
#include "nsPluginInstanceOwner.h"