v0.12.6 Bugfix dead init and set html before run#1314
Open
citkane wants to merge 37 commits into
Open
Conversation
…ew_cc and complete define/implement refactoring.
This was referenced Jun 18, 2025
citkane
commented
Jun 19, 2025
Comment on lines
+233
to
+250
| user_script add_user_script_impl(const std::string &js) override { | ||
| auto wjs = win_string::widen_string(js); | ||
| std::wstring script_id; | ||
| bool done{}; | ||
| webview2_user_script_added_handler handler{[&](HRESULT res, LPCWSTR id) { | ||
| if (SUCCEEDED(res)) { | ||
| script_id = id; | ||
| // We need a reload, else the user script will never execute unless the user explicitly calls | ||
| // `navigate` after `init` | ||
| if (owns_window()) { | ||
| reload_browser_window(); | ||
| } | ||
| } else { | ||
| console.error("Windows failed to add user script.", | ||
| static_cast<webview_error_t>(res)); | ||
| } | ||
| done = true; | ||
| }}; |
Contributor
Author
There was a problem hiding this comment.
With reference to #1255
@SteffenL and @AlbertXingZhang, as far as Heisenburg bugs are concerned, I did manage to observe this error log being triggered once during a CI tests run. Re-running the failed test subsequently succeeded.
If not for the error log, the only symptom was that the windows test timed out (which is the mystery symptom...).
My memory is 98% clear on this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a bugfix release that fixes inconsistent behaviour between OS platforms in a
bind(); init(); run();orbind(); set_html(); run();call sequence.Depending on platform, the bound script, init script or
<script>tags are never processed, leading to silent failure.Fixed
Changed
Depends on PR's