Repository navigation
fix: promise resolved to early when browser initiated in-page navigation - #39260
Conversation
|
@nornagon can you review this fix/change ? Thanks. |
zcbenz
left a comment
There was a problem hiding this comment.
Can you fix the lint warnings?
/home/builduser/project/src/electron/lib/browser/api/web-contents.ts
450:9 error Identifier 'browser_intendent_in_page_navigation' is not in camel case camelcase
465:9 error Identifier 'browser_intendent_in_page_navigation' is not in camel case camelcase
481:12 error Identifier 'browser_intendent_in_page_navigation' is not in camel case camelcase
/home/builduser/project/src/electron/spec/api-web-contents-spec.ts
380:51 error Missing space before function parentheses space-before-function-paren
381:1 error Expected indentation of 8 spaces but found 10 indent
The code looks good to me.
Warnings fixed. |
|
@TomaszMa can you clarify what is meant by "browser intendent navigation"? I'm not sure I understand what that term refers to and haven't seen it before. |
browser intendent navigation - navigation triggered by browser, e.g.: loading resources like images . Navigation indirectly caused by user. Some of the browser intendent navigation can trigger 'did-navigate-in-page' event, e.g.: user intendent navigation - navigation triggered by user, e.g.: Problem is that when we call |
codebytere
left a comment
There was a problem hiding this comment.
@TomaszMa ok thanks. I was asking mostly because "intendent" isn't really a term that's used. We should something that more clearly conveys what's going on - browserInitiated and userInitiated are clearer. Let's instead say browserInitiatedInPageNavigation and finishListenerWhenUserIntendentNavigation.
|
@codebytere changed :) |
|
Release Notes Persisted
|
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
I have automatically backported this PR to "24-x-y", please check out #39432 |
|
I have automatically backported this PR to "26-x-y", please check out #39433 |
|
I have automatically backported this PR to "25-x-y", please check out #39434 |
|
I think we should revert this - it's causing consistent failures on Linux cc @zcbenz |
Test during integration passed, so or added test on linux is unstable, or something else break the test. |
Description of Change
After this fix #36129 promise returned by
loadURLfunction can be resolved before page finish loading. While page is loading it can trigger browser intendent in page navigation (e.g.:window.history.replaceState). This PR fixes this problem.Checklist
npm testpassesRelease Notes
Notes: Fix problem with promise resolved to early when browser intendent in-page navigation