mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
903519 - Allocate strings in the nursery if enabled
903519 - Allocate strings in the nursery if enabled, missed change somehow.
This commit is contained in:
parent
2f815b1d5b
commit
8c8d16709d
1 changed files with 5 additions and 5 deletions
|
|
@ -187,7 +187,7 @@ JSDependentString::new_(js::ExclusiveContext* cx, JSLinearString* baseArg, size_
|
|||
if (baseArg->isExternal() && !baseArg->ensureFlat(cx->asJSContext()))
|
||||
return nullptr;
|
||||
|
||||
JSDependentString* str = js::Allocate<JSDependentString, js::NoGC>(cx, js::gc::TenuredHeap);
|
||||
JSDependentString* str = js::Allocate<JSDependentString, js::NoGC>(cx, js::gc::DefaultHeap);
|
||||
if (str) {
|
||||
str->init(cx, baseArg, start, length);
|
||||
return str;
|
||||
|
|
@ -195,7 +195,7 @@ JSDependentString::new_(js::ExclusiveContext* cx, JSLinearString* baseArg, size_
|
|||
|
||||
js::RootedLinearString base(cx, baseArg);
|
||||
|
||||
str = js::Allocate<JSDependentString>(cx, js::gc::TenuredHeap);
|
||||
str = js::Allocate<JSDependentString>(cx, js::gc::DefaultHeap);
|
||||
if (!str)
|
||||
return nullptr;
|
||||
str->init(cx, base, start, length);
|
||||
|
|
@ -231,7 +231,7 @@ JSFlatString::new_(js::ExclusiveContext* cx, const CharT* chars, size_t length)
|
|||
if (cx->compartment()->isAtomsCompartment())
|
||||
str = js::Allocate<js::NormalAtom, allowGC>(cx);
|
||||
else
|
||||
str = js::Allocate<JSFlatString, allowGC>(cx, js::gc::TenuredHeap);
|
||||
str = js::Allocate<JSFlatString, allowGC>(cx, js::gc::DefaultHeap);
|
||||
if (!str)
|
||||
return nullptr;
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ JSThinInlineString::new_(js::ExclusiveContext* cx)
|
|||
if (cx->compartment()->isAtomsCompartment())
|
||||
return (JSThinInlineString*)(js::Allocate<js::NormalAtom, allowGC>(cx));
|
||||
|
||||
return js::Allocate<JSThinInlineString, allowGC>(cx, js::gc::TenuredHeap);
|
||||
return js::Allocate<JSThinInlineString, allowGC>(cx, js::gc::DefaultHeap);
|
||||
}
|
||||
|
||||
template <js::AllowGC allowGC>
|
||||
|
|
@ -285,7 +285,7 @@ JSFatInlineString::new_(js::ExclusiveContext* cx)
|
|||
if (cx->compartment()->isAtomsCompartment())
|
||||
return (JSFatInlineString*)(js::Allocate<js::FatInlineAtom, allowGC>(cx));
|
||||
|
||||
return js::Allocate<JSFatInlineString, allowGC>(cx, js::gc::TenuredHeap);
|
||||
return js::Allocate<JSFatInlineString, allowGC>(cx, js::gc::DefaultHeap);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue