Ticket #3670: session-bug.patch

File session-bug.patch, 557 bytes (added by manuq, 7 years ago)

Simple script that shows the issue.

Line 
1from gi.repository import Gtk
2from gi.repository import WebKit
3from gi.repository import GObject
4
5WINDOW_WIDTH, WINDOW_HEIGHT = 800, 400
6
7# This gives segfault:
8GObject.threads_init()
9
10def _destroy_cb(widget, data=None):
11    Gtk.main_quit()
12
13window = Gtk.Window()
14window.resize(WINDOW_WIDTH, WINDOW_HEIGHT)
15window.connect("destroy", _destroy_cb)
16window.show()
17
18scroll = Gtk.ScrolledWindow()
19window.add(scroll)
20scroll.show()
21
22session = WebKit.get_default_session()
23
24wv = WebKit.WebView()
25wv.load_uri('http://google.com')
26scroll.add(wv)
27wv.show()
28
29Gtk.main()