mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Use a larger small vector.
This commit is contained in:
parent
879c3710f4
commit
bc8ed81dc1
1 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ use js::jsval::JSVal;
|
||||||
use layout_interface::TrustedNodeAddress;
|
use layout_interface::TrustedNodeAddress;
|
||||||
use script_task::STACK_ROOTS;
|
use script_task::STACK_ROOTS;
|
||||||
|
|
||||||
use util::smallvec::{SmallVec, SmallVec24};
|
use util::smallvec::{SmallVec, SmallVec32};
|
||||||
|
|
||||||
use core::nonzero::NonZero;
|
use core::nonzero::NonZero;
|
||||||
use std::cell::{Cell, UnsafeCell};
|
use std::cell::{Cell, UnsafeCell};
|
||||||
|
@ -610,7 +610,7 @@ impl<T: Assignable<U>, U: Reflectable> TemporaryPushable<T> for Vec<JS<U>> {
|
||||||
/// See also [*Exact Stack Rooting - Storing a GCPointer on the CStack*]
|
/// See also [*Exact Stack Rooting - Storing a GCPointer on the CStack*]
|
||||||
/// (https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/GC/Exact_Stack_Rooting).
|
/// (https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/GC/Exact_Stack_Rooting).
|
||||||
pub struct RootCollection {
|
pub struct RootCollection {
|
||||||
roots: UnsafeCell<SmallVec24<*mut JSObject>>,
|
roots: UnsafeCell<SmallVec32<*mut JSObject>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A pointer to a RootCollection, for use in global variables.
|
/// A pointer to a RootCollection, for use in global variables.
|
||||||
|
@ -622,7 +622,7 @@ impl RootCollection {
|
||||||
/// Create an empty collection of roots
|
/// Create an empty collection of roots
|
||||||
pub fn new() -> RootCollection {
|
pub fn new() -> RootCollection {
|
||||||
RootCollection {
|
RootCollection {
|
||||||
roots: UnsafeCell::new(SmallVec24::new()),
|
roots: UnsafeCell::new(SmallVec32::new()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue