Bug 1584892 - Remove CycleCollectedJSContext::Initialize's nursery size param r=karlt

Differential Revision: https://phabricator.services.mozilla.com/D47873

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paul Bone 2019-12-16 04:14:55 +00:00
parent 89a1b3056a
commit 8b4c7c407f
5 changed files with 5 additions and 11 deletions

View File

@ -952,8 +952,7 @@ class WorkerJSContext final : public mozilla::CycleCollectedJSContext {
nsresult Initialize(JSRuntime* aParentRuntime) {
nsresult rv = CycleCollectedJSContext::Initialize(
aParentRuntime, WORKER_DEFAULT_RUNTIME_HEAPSIZE,
JS::DefaultNurseryMaxBytes);
aParentRuntime, WORKER_DEFAULT_RUNTIME_HEAPSIZE);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}

View File

@ -121,8 +121,7 @@ class WorkletJSContext final : public CycleCollectedJSContext {
MOZ_ASSERT(!NS_IsMainThread());
nsresult rv = CycleCollectedJSContext::Initialize(
aParentRuntime, WORKLET_DEFAULT_RUNTIME_HEAPSIZE,
JS::DefaultNurseryMaxBytes);
aParentRuntime, WORKLET_DEFAULT_RUNTIME_HEAPSIZE);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}

View File

@ -1102,7 +1102,7 @@ CycleCollectedJSRuntime* XPCJSContext::CreateRuntime(JSContext* aCx) {
nsresult XPCJSContext::Initialize() {
nsresult rv = CycleCollectedJSContext::Initialize(
nullptr, JS::DefaultHeapMaxBytes, JS::DefaultNurseryMaxBytes);
nullptr, JS::DefaultHeapMaxBytes);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}

View File

@ -116,8 +116,7 @@ CycleCollectedJSContext::~CycleCollectedJSContext() {
}
nsresult CycleCollectedJSContext::Initialize(JSRuntime* aParentRuntime,
uint32_t aMaxBytes,
uint32_t aMaxNurseryBytes) {
uint32_t aMaxBytes) {
MOZ_ASSERT(!mJSContext);
mozilla::dom::InitScriptSettings();
@ -126,8 +125,6 @@ nsresult CycleCollectedJSContext::Initialize(JSRuntime* aParentRuntime,
return NS_ERROR_OUT_OF_MEMORY;
}
JS_SetGCParameter(mJSContext, JSGC_MAX_NURSERY_BYTES, aMaxNurseryBytes);
mRuntime = CreateRuntime(mJSContext);
mRuntime->AddContext(this);

View File

@ -95,8 +95,7 @@ class CycleCollectedJSContext
virtual ~CycleCollectedJSContext();
MOZ_IS_CLASS_INIT
nsresult Initialize(JSRuntime* aParentRuntime, uint32_t aMaxBytes,
uint32_t aMaxNurseryBytes);
nsresult Initialize(JSRuntime* aParentRuntime, uint32_t aMaxBytes);
virtual CycleCollectedJSRuntime* CreateRuntime(JSContext* aCx) = 0;