Skip to content

Commit

Permalink
fix: Prevent Invalid Pointer when loading extensions on Windows, re…
Browse files Browse the repository at this point in the history
…name `with_extension_path` -> `with_extensions_path` (#1421)
  • Loading branch information
SpikeHD authored Nov 19, 2024
1 parent 7e46916 commit 7bb4f49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/extension_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": "patch"
---

Fix extension loading on Windows.
3 changes: 2 additions & 1 deletion src/webview2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,9 @@ impl InnerWebView {
for entry in fs::read_dir(extension_path)? {
let path = entry?.path();
let path_hs = HSTRING::from(path.as_path());
let handler = ProfileAddBrowserExtensionCompletedHandler::create(Box::new(|_, _| Ok(())));

profile.AddBrowserExtension(&path_hs, None)?;
profile.AddBrowserExtension(&path_hs, &handler)?;
}

Ok(())
Expand Down

0 comments on commit 7bb4f49

Please sign in to comment.