Skip to content

Commit abf128d

Browse files
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fb611bd commit abf128d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/js-host-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ A sandbox with the JavaScript runtime loaded, ready for handlers and modules.
9898
- `clearModules()` — Remove all registered modules (sync)
9999

100100
**Other Methods:**
101-
- `getLoadedSandbox()``Promise<LoadedJSSandbox>`Compiles all modules and handlers into the guest. Modules are registered first, then handlers.
101+
- `getLoadedSandbox()``Promise<LoadedJSSandbox>`Registers all module sources and compiles/loads handlers into the guest; modules are compiled on-demand when first imported.
102102

103103
```javascript
104104
// Add a module (sync)

src/js-host-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ impl JSSandboxWrapper {
862862
validate_napi_module_identifier(&module_name, "Module name")?;
863863
if let Some(ref ns) = namespace {
864864
validate_napi_module_identifier(ns, "Module namespace")?;
865+
validate_napi_namespace_not_reserved(ns)?;
865866
}
866867
self.with_inner_mut(|sandbox| {
867868
match namespace {

0 commit comments

Comments
 (0)