Repository navigation
refactor: be more precise when creating api::WebContents - #23128
Merged
Merged
Conversation
deepak1556
reviewed
Apr 17, 2020
zcbenz
previously requested changes
Apr 27, 2020
zcbenz
left a comment
Contributor
There was a problem hiding this comment.
There are tests failing:
Unhandled exception in main spec runner: AssertionError: expected 9 to equal 10
at Immediate.<anonymous> (/home/builduser/project/src/electron/spec-main/api-app-spec.ts:410:39)
at processImmediate (internal/timers.js:456:21) {
message: 'expected 9 to equal 10',
showDiff: true,
actual: 9,
expected: 10
}
not ok 23 app module BrowserWindow events should emit web-contents-created event when a webContents is created
AssertionError: expected 9 to equal 10
at Immediate.<anonymous> (electron/spec-main/api-app-spec.ts:410:39)
at processImmediate (internal/timers.js:456:21)
nornagon
force-pushed
the
precise-webcontents-wrapper-creation
branch
from
April 21, 2021 21:22
1255241 to
3821a85
Compare
MarshallOfSound
approved these changes
Apr 23, 2021
|
No Release Notes |
5 tasks done
4 tasks done
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.
Description of Change
This removes one usage of
GetWebContentsFromProcessID, which is important as there can potentially be severalWebContentsrelating to a given process ID.Previously, we were using
RenderProcessReadyto be a "backstop" for catching certain unusual paths for creation of WebContents instances. In particular, the WebContents that are created for devtools, and those that are created for guest views (specifically, mime viewer guest views, i.e. for the pdfium pdf viewer).This PR shifts the creation of the
api::WebContentswrapper for devtools to be explicitly created at the same time as the devtoolscontent::WebContents, and similarly for extension background pages and mime view handlers (i.e. pdf viewer guest views).Checklist
npm testpassesRelease Notes
Notes: none