diff --git a/dom/media/ogg/OggDemuxer.cpp b/dom/media/ogg/OggDemuxer.cpp index ff7b196a5ae1..c2dabfeea98a 100644 --- a/dom/media/ogg/OggDemuxer.cpp +++ b/dom/media/ogg/OggDemuxer.cpp @@ -87,7 +87,9 @@ OggDemuxer::nsAutoOggSyncState::~nsAutoOggSyncState() { rlbox_sandbox_ogg* OggDemuxer::CreateSandbox() { rlbox_sandbox_ogg* sandbox = new rlbox_sandbox_ogg(); #ifdef MOZ_WASM_SANDBOXING_OGG - bool success = sandbox->create_sandbox(false /* infallible */); + bool success = sandbox->create_sandbox(/* shouldAbortOnFailure = */ false, + /* custom capacity = */ nullptr, + "rlbox_wasm2c_ogg"); #else bool success = sandbox->create_sandbox(); #endif diff --git a/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp b/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp index ac6200f8d50a..ba1817884143 100644 --- a/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp +++ b/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp @@ -57,8 +57,8 @@ RLBoxHunspell* RLBoxHunspell::Create(const nsCString& affpath, const w2c_mem_capacity capacity = get_valid_wasm2c_memory_capacity( expectedMaxMemory, true /* wasm's 32-bit memory */); - bool success = - sandbox->create_sandbox(/* shouldAbortOnFailure = */ false, &capacity); + bool success = sandbox->create_sandbox(/* shouldAbortOnFailure = */ false, + &capacity, "rlbox_wasm2c_hunspell"); #elif defined(MOZ_WASM_SANDBOXING_HUNSPELL) bool success = sandbox->create_sandbox(/* shouldAbortOnFailure = */ false); #else diff --git a/gfx/ots/RLBoxWOFF2Host.cpp b/gfx/ots/RLBoxWOFF2Host.cpp index 31d1e959e6f1..23ba7b5d8116 100644 --- a/gfx/ots/RLBoxWOFF2Host.cpp +++ b/gfx/ots/RLBoxWOFF2Host.cpp @@ -57,7 +57,8 @@ UniquePtr RLBoxWOFF2SandboxPool::CreateSandboxData( #if defined(MOZ_WASM_SANDBOXING_WOFF2) const w2c_mem_capacity capacity = get_valid_wasm2c_memory_capacity(aSize, true /* 32-bit wasm memory*/); - bool createOK = sandbox->create_sandbox(/* infallible = */ false, &capacity); + bool createOK = sandbox->create_sandbox(/* shouldAbortOnFailure = */ false, + &capacity, "rlbox_wasm2c_woff2"); #else bool createOK = sandbox->create_sandbox(); #endif diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 8ebe183bf70f..40aa5b5538a8 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -655,7 +655,13 @@ struct gfxFontEntry::GrSandboxData { grGetGlyphAdvanceCallback; GrSandboxData() { +#if defined(MOZ_WASM_SANDBOXING_GRAPHITE) + sandbox.create_sandbox(/* shouldAbortOnFailure = */ true, + /* custom capacity = */ nullptr, + "rlbox_wasm2c_graphite"); +#else sandbox.create_sandbox(); +#endif grGetTableCallback = sandbox.register_callback(gfxFontEntryCallbacks::GrGetTable); grReleaseTableCallback = diff --git a/media/libsoundtouch/src/RLBoxSoundTouch.cpp b/media/libsoundtouch/src/RLBoxSoundTouch.cpp index 0392ee21b2a4..d94738439135 100644 --- a/media/libsoundtouch/src/RLBoxSoundTouch.cpp +++ b/media/libsoundtouch/src/RLBoxSoundTouch.cpp @@ -14,7 +14,10 @@ RLBoxSoundTouch::RLBoxSoundTouch() {} bool RLBoxSoundTouch::Init() { #ifdef MOZ_WASM_SANDBOXING_SOUNDTOUCH - const bool success = mSandbox.create_sandbox(false /* infallible */); + const bool success = mSandbox.create_sandbox( + /* shouldAbortOnFailure = */ false, + /* custom capacity = */ nullptr, + "rlbox_wasm2c_soundtouch"); #else const bool success = true; mSandbox.create_sandbox(); diff --git a/parser/htmlparser/nsExpatDriver.cpp b/parser/htmlparser/nsExpatDriver.cpp index c52e7898f585..212f462a2599 100644 --- a/parser/htmlparser/nsExpatDriver.cpp +++ b/parser/htmlparser/nsExpatDriver.cpp @@ -1450,7 +1450,8 @@ RLBoxExpatSandboxPool::CreateSandboxData(uint64_t aSize) { #ifdef MOZ_WASM_SANDBOXING_EXPAT const w2c_mem_capacity capacity = get_valid_wasm2c_memory_capacity(aSize, true /* 32-bit wasm memory*/); - bool create_ok = sandbox->create_sandbox(/* infallible = */ false, &capacity); + bool create_ok = sandbox->create_sandbox(/* shouldAbortOnFailure = */ false, + &capacity, "rlbox_wasm2c_expat"); #else bool create_ok = sandbox->create_sandbox(); #endif