зеркало из https://github.com/mozilla/pjs.git
Bug 754299 - Update gcMaxMallocBytes of existing compartments in JSRuntime::setGCMaxMallocBytes. r=billm
This commit is contained in:
Родитель
031f58e555
Коммит
096e083ebf
|
@ -1099,6 +1099,14 @@ JSContext::runningWithTrustedPrincipals() const
|
|||
return !compartment || compartment->principals == runtime->trustedPrincipals();
|
||||
}
|
||||
|
||||
void
|
||||
JSRuntime::setGCMaxMallocBytes(size_t value)
|
||||
{
|
||||
gcMaxMallocBytes = value;
|
||||
for (CompartmentsIter c(this); !c.done(); c.next())
|
||||
c->setGCMaxMallocBytes(value);
|
||||
}
|
||||
|
||||
void
|
||||
JSRuntime::updateMallocCounter(JSContext *cx, size_t nbytes)
|
||||
{
|
||||
|
|
|
@ -852,9 +852,7 @@ struct JSRuntime : js::RuntimeFriendFields
|
|||
JS_DECLARE_NEW_METHODS(malloc_, JS_ALWAYS_INLINE)
|
||||
JS_DECLARE_DELETE_METHODS(free_, JS_ALWAYS_INLINE)
|
||||
|
||||
void setGCMaxMallocBytes(size_t value) {
|
||||
gcMaxMallocBytes = value;
|
||||
}
|
||||
void setGCMaxMallocBytes(size_t value);
|
||||
|
||||
/*
|
||||
* Call this after allocating memory held by GC things, to update memory
|
||||
|
|
Загрузка…
Ссылка в новой задаче