mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
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:
parent
89a1b3056a
commit
8b4c7c407f
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user