Skip to content

Commit

Permalink
Use multiple WebKit web processes.
Browse files Browse the repository at this point in the history
A new feature for WebKit2GTK+ 2.4, we can now specify to use multiple
webkit web processes rather than all webviews sharing the same
process.

If a tab's web process is not shared with any other's (although
currently unimplemented, this may happen when a tab is opened by
another webview, either through javascript or middle-clicking a
hyperlink), killing or crashing that web process only results in one
broken tab rather than crashing the entire browser (WebKit1) or
breaking every tab (WebKit2GTK+ <= 2.2).
  • Loading branch information
jrick committed Apr 23, 2014
1 parent c42b70a commit 76b96a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xombrero.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
package main

import (
"github.com/conformal/gotk3/gtk"
"runtime"

"github.com/conformal/gotk3/gtk"
"github.com/jrick/go-webkit2/wk2"
)

const HomePage HTMLPageDescription = "https://www.duckduckgo.com/lite"
Expand All @@ -30,8 +32,10 @@ func RunGUI() {
window.SetDefaultGeometry(defaultWinWidth, defaultWinHeight)
window.Show()

session := []PageDescription{HomePage}
wc := wk2.DefaultWebContext()
wc.SetProcessModel(wk2.ProcessModelMultipleSecondaryProcesses)

session := []PageDescription{HomePage}
pm := NewPageManager(session)
window.Add(pm)
pm.Show()
Expand Down

0 comments on commit 76b96a7

Please sign in to comment.