Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

test(canvas): use the default runtime context

lanyue-llkcc6c5ab684a0
diff --git a/moli-renderer-v8/src/script_vm/tests/canvas_fill_rect.rs b/moli-renderer-v8/src/script_vm/tests/canvas_fill_rect.rs
index 11a734488..ccec43425 100644
--- a/moli-renderer-v8/src/script_vm/tests/canvas_fill_rect.rs
+++ b/moli-renderer-v8/src/script_vm/tests/canvas_fill_rect.rs
@@ -34,7 +34,7 @@ fn canvas_fill_rect_registered_native_proxy_keeps_context_identity() {
ctx.setTransform(1,0,0,1,20,10); ctx.fillStyle='red'; ctx.globalAlpha=.5;",
)
.unwrap();
- let context_ptr = &vm.page_default_context as *const _;
+ let context_ptr = &vm.page_default_runtime.context as *const _;
vm.with_context_scope_by_ptr_and_checkpoint_for_test(context_ptr, |scope, _| {
let global = scope.get_current_context().global(scope);
let key = crate::util::v8str(scope, "ctx");