summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/tab.vala14
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;