chore: isolate page in new_context that will be cleaned by ferrum#592
Merged
Conversation
Collaborator
yann120
commented
Jun 17, 2026
|
|
||
| def create_page | ||
| browser.create_page.tap do |page| | ||
| browser.create_page(new_context: true) do |page| |
Collaborator
Author
There was a problem hiding this comment.
https://github.com/rubycdp/ferrum/blob/9fae889c724ab4388bee2c5f54a440e0e095b86a/lib/ferrum/browser.rb#L146
Ici on ouvre maintenant une page dans un contexte isolé.
Et Ferrum s'occupe a la fin de fermer la page et le contexte
Collaborator
Author
There was a problem hiding this comment.
Dans le changelog, on a une meilleur explication :
Ferrum::Browser#create_page accepts now new_context: true which can create a page in incognito context, and yields
a block with this page, after which the page is closed.
https://github.com/rubycdp/ferrum/releases/tag/v0.12
8782ae5 to
cc17f6e
Compare
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.


test avec 5000 puis 10000 sans relancer entre les deux

J'ai remarqué avec la commande suivante que des fenetres ouvertes en popup ne se ferment pas :
Ex avant, le site tarot-ana.fr s'ouvrait et restait ouvert pendant toute la durée de vie du navigateur
Maintenant ces fenetres popup se ferment avec ce fix.
Mais, il y a encore les service worker qui restent ouvert : a voir dans un autre ticket ?
A tester peut etre par la suite : fusion jemalloc + new_context ?