diff options
author | Christian Dywan <christian@twotoasts.de> | 2018-08-26 15:27:26 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2018-08-26 15:27:26 +0200 |
commit | 52051c650371ef8ea0c0ca4ace104573b44a80da (patch) | |
tree | fc5872c161f0df57d662a3223d50732c623b502c | |
parent | 57fa97773fc1f708fe572e8ed9fd9bf7a2c8f740 (diff) | |
download | midori-git-unholy_trinity.tar.gz |
Apply the unholy trinity of errorsunholy_trinity
-rw-r--r-- | core/tab.vala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/tab.vala b/core/tab.vala index 1592e719..b7ffa088 100644 --- a/core/tab.vala +++ b/core/tab.vala @@ -126,6 +126,20 @@ namespace Midori { } public override bool load_failed (WebKit.LoadEvent load_event, string uri, Error load_error) { + // The unholy trinity; also ignored in Webkit's default error handler: + // A plugin will take over. That's expected, it's not fatal. + if (load_error is WebKit.PluginError.WILL_HANDLE_LOAD) { + return false; + } + // Mostly initiated by JS redirects. + if (load_error is WebKit.NetworkError.CANCELLED) { + return false; + } + // A frame load is cancelled because of a download. + if (load_error is WebKit.PolicyError.FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE) { + return false; + } + var monitor = NetworkMonitor.get_default (); string hostname = new Soup.URI (uri).host; string? title = null; |