Skip to content

Enable Chromium Site Isolation #2967

Description

@amaitland

CEF recently added support for https://bitbucket.org/chromiumembedded/cef/issues/2498/add-support-for-site-per-process

We should now look at properly supporting the process model as it's now the CEF default.

Related issue #2553

Activity

  1. self-assigned this
    on Nov 8, 2019
  2. amaitland commented on Nov 24, 2019

    @amaitland
    MemberAuthor

    WPF version will require disable-site-isolation-trials command line arg until upstream issue #2789 has been resolved

  3. amaitland commented on Dec 3, 2019

    @amaitland
    MemberAuthor

    Site isolation trials disabled for all WPF/WinForms/OffScreen in commit 93336a0 Now using the default process model (chromium site isolation project)

  4. amaitland commented on Jan 8, 2020

    @amaitland
    MemberAuthor

    WPF version will require disable-site-isolation-trials command line arg until upstream issue #2789 has been resolved

    This has been resolved (builds haven't been updated yet)

    https://bitbucket.org/chromiumembedded/cef/issues/2814/process-messages-cant-be-sent-to-all

    Cannot remove disable-site-isolation-trials until this is solved.

  5. amaitland commented on Apr 22, 2020

    @amaitland
    MemberAuthor
  6. amaitland commented on May 19, 2021

    @amaitland
    MemberAuthor

    Issue has been resolved see https://bitbucket.org/chromiumembedded/cef/issues/2849/siteisolation-process-message-from-browser#comment-60550396

    There are potential changes to how frames are handled that need to be evaluated.

  7. added this to the 91.1.x milestone on May 19, 2021
  8. amaitland commented on Jun 4, 2021

    @amaitland
    MemberAuthor

    This means that frame objects (including for the main frame) will now always change after cross-origin navigation, and the old frame object will be invalidated.

    Cross origin navigations now invalidate the main frame.

  9. added a commit that references this issue on Jun 4, 2021
    2366912
  10. amaitland commented on Jun 5, 2021

    @amaitland
    MemberAuthor

    With site isolation enabled many of the tests (pretty much anything that uses the IPC) will fail, so reverting for now and reopening.

  11. removed this from the 91.1.x milestone on Jun 16, 2021
  12. 3 remaining items

  13. amaitland commented on Sep 5, 2021

    @amaitland
    MemberAuthor

    Adding this to the 94 milestone as a reminder to revisit, debugging should be done before Chrome decides to remove disable-site-isolation-trials and we're forced to upgrade.

  14. modified the milestones: 94.3.x, 95.7.x on Sep 28, 2021
  15. StefanoBalzarottiEnnova commented on Oct 13, 2021

    @StefanoBalzarottiEnnova

    When do you plan to fix this issue? There is a workaround to use CEFSharp with site isolation? This feature is critical for my application,

  16. NinjaCross commented on Oct 13, 2021

    @NinjaCross

    This is highly critical fro my company too.
    Is there a release date for this ?

  17. amaitland commented on Oct 13, 2021

    @amaitland
    MemberAuthor

    There is nothing stopping you from using site isolation now, it's simply disabled by default. You can remove the disable-site-isolation-trials command line arg and test your application.

    This isn't really something that I can fix directly, it'll be reporting any problems upstream and waiting for a fix.

  18. changed the title [-]Support Chromium Site Isolation[/-] [+]Enable Chromium Site Isolation[/+] on Oct 13, 2021
  19. added a commit that references this issue on Oct 15, 2021
  20. amaitland commented on Oct 21, 2021

    @amaitland
    MemberAuthor

    Commit 221185b enabled site isolation by default for master

    The CanLoadRequestWithPostData test has been updated in commit fd78c0c to native to a domain of the same origin before attempting to call LoadRequest.

    LoadRequest calls will fail otherwise as discussed at https://magpcss.org/ceforum/viewtopic.php?f=10&t=18672&p=50266#p50249

    Tests are passing with the exception of IntegrationTestFacts.LoadLegacyJavaScriptBindingQunitTestsSuccessfulCompletion. Same test passes when I run it through Visual Studio Test Explorer. A new issue should be created and debugged at some point to determine the cause and evaluate if it's fixable or if upstream changes are required.

    At this point I'll leave Site Isolation enabled by default for version 95 which can be disabled if required.

  21. amaitland commented on Nov 2, 2021

    @amaitland
    MemberAuthor

    Chromium Site Isolation is now enabled by default in 95.7.140-pre which is now available for testing.

    You can still manually disable via the disable-site-isolation-trials command line arg. e.g.

    var settings = new CefSettings()
    {
    	//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
    	CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
    };
    
    settings.CefCommandLineArgs.Add("disable-site-isolation-trials");
    
    Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);

    Tests are passing with the exception of IntegrationTestFacts.LoadLegacyJavaScriptBindingQunitTestsSuccessfulCompletion. Same test passes when I run it through Visual Studio Test Explorer. A new issue should be created and debugged at some point to determine the cause and evaluate if it's fixable or if upstream changes are required.

    Issue #3867 has been created to track investigating the failures. Any problems using Legacy JavaScript Binding then you'll need to disable Chromium Site Isolation


    If you are using CefSharp in a commercial product and not already a sponsor then please consider supporting my efforts. Developing/maintaining/supporting the project takes a considerable amount of time.

  22. amaitland commented on Nov 15, 2021

    @amaitland
    MemberAuthor

    Known behaviour changes in CEF are as follows: - A spare renderer process may be created on initial browser creation or cross- origin navigation. This spare process may be used with a future cross-origin navigation or discarded on application shutdown.

    As per chromiumembedded/cef#2498 (comment).

    With Site Isolation enabled it's expected there is a spare render process is created and will exist until Cef.Shutdown has been called.

  23. added a commit that references this issue on Jan 7, 2025
    9943333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions