Going to do this in parts Part 1 - Move the mem estimation code outside the sandbox https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e80ce3f857b5208f2b718c7df3163f9dfd77ca1 Part 2 - Augment the `RLBoxSandboxPool` - `RLBoxSandboxPool::CreateSandboxData` function accept params that it can pass to the `RLBoxWoff2SandboxPool::CreateSandboxData` - `RLBoxSandboxPool::PopOrCreate` needs to accept a function pointer that accepts a "sandbox filter" that would apply a filter condition (Filter's type would be `bool (*)(RLBoxSandboxPoolData&))` Part 3 - Write an algorithm to estimate size of sandbox based on size of decompressed font. Need to do some testing to figure out what this estimate should be. But maybe something like at 50% more that the expected decompress size to account for input size and misc allocs
Bug 1744460 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Going to do this in parts Part 1 - Move the mem estimation code outside the sandbox https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e80ce3f857b5208f2b718c7df3163f9dfd77ca1 Part 2 - Augment the `RLBoxSandboxPool` - `RLBoxSandboxPool::CreateSandboxData` function accept params that it can pass to the `RLBoxWoff2SandboxPool::CreateSandboxData` - `RLBoxSandboxPool::PopOrCreate` needs to accept a function pointer that accepts a "sandbox filter" that would apply a filter condition (Filter's type would be `bool (*)(RLBoxSandboxPoolData&))` Part 3 - Write an algorithm to estimate size of sandbox based on size of decompressed font. Need to do some testing to figure out what this estimate should be. But maybe something like at 50% more that the expected decompress size to account for input size and misc allocs - I need to add a small feature to RLBox to expose the maximum memory of a sandbox (it has only the "current memory" right now)
Going to do this in parts Part 1 - Move the mem estimation code outside the sandbox Part 2 - Augment the `RLBoxSandboxPool` - `RLBoxSandboxPool::CreateSandboxData` function accept params that it can pass to the `RLBoxWoff2SandboxPool::CreateSandboxData` - `RLBoxSandboxPool::PopOrCreate` needs to accept a function pointer that accepts a "sandbox filter" that would apply a filter condition (Filter's type would be `bool (*)(RLBoxSandboxPoolData&))` Part 3 - Write an algorithm to estimate size of sandbox based on size of decompressed font. Need to do some testing to figure out what this estimate should be. But maybe something like at 50% more that the expected decompress size to account for input size and misc allocs - I need to add a small feature to RLBox to expose the maximum memory of a sandbox (it has only the "current memory" right now)
Going to do this in parts Part 1 - Move the mem estimation code outside the sandbox - From here `modules/woff2/src/woff2_dec.cc:1300` Part 2 - Augment the `RLBoxSandboxPool` - `RLBoxSandboxPool::CreateSandboxData` function accept params that it can pass to the `RLBoxWoff2SandboxPool::CreateSandboxData` - `RLBoxSandboxPool::PopOrCreate` needs to accept a function pointer that accepts a "sandbox filter" that would apply a filter condition (Filter's type would be `bool (*)(RLBoxSandboxPoolData&))` Part 3 - Write an algorithm to estimate size of sandbox based on size of decompressed font. Need to do some testing to figure out what this estimate should be. But maybe something like at 50% more that the expected decompress size to account for input size and misc allocs - I need to add a small feature to RLBox to expose the maximum memory of a sandbox (it has only the "current memory" right now)