Don't load the URL immediately on :undo
On some pages like Qt's Gerrit, Indiegogo or Telegram Web, this caused a crash with QtWebEngine and Qt 5.10.1 in QtWebEngineCore::WebContentsAdapter::webContents(). I'm not sure what causes the crash exactly, but I'm guessing it's some kind of race condition between loading the URL initially and deserializing the history, which both ends up loading the URL. Since restoring the history means we end up on the given URL anyways, let's just not open the URL beforehand, which seems to fix this. Fixes #3619.
This commit is contained in:
parent
ada15510a7
commit
d44ff5ba01
@ -76,6 +76,7 @@ Fixed
|
||||
- QtWebEngine: Hinting and scrolling now works properly on special
|
||||
`view-source:` pages.
|
||||
- QtWebEngine: Scroll positions are now restored correctly from sessions.
|
||||
- QtWebEngine: Crash with Qt 5.10.1 when using :undo on some tabs.
|
||||
- QtWebKit: `:view-source` now displays a valid URL.
|
||||
- URLs containing ampersands and other special chars are now shown
|
||||
correctly when filtering them in the completion.
|
||||
|
@ -378,12 +378,10 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
|
||||
for entry in reversed(self._undo_stack.pop()):
|
||||
if use_current_tab:
|
||||
self.openurl(entry.url, newtab=False)
|
||||
newtab = self.widget(0)
|
||||
use_current_tab = False
|
||||
else:
|
||||
newtab = self.tabopen(entry.url, background=False,
|
||||
idx=entry.index)
|
||||
newtab = self.tabopen(background=False, idx=entry.index)
|
||||
|
||||
newtab.history.deserialize(entry.history)
|
||||
self.set_tab_pinned(newtab, entry.pinned)
|
||||
|
Loading…
Reference in New Issue
Block a user