@@ -55,7 +55,7 @@ use XSLoader;
5555use English ' -no_match_vars' ;
5656use POSIX qw< F_SETFD F_GETFD FD_CLOEXEC> ;
5757
58- our $VERSION = ' 0.124 ' ;
58+ our $VERSION = ' 0.125 ' ;
5959
6060use constant DOM_TYPE_ELEMENT => 1;
6161use constant ORDERED_NODE_SNAPSHOT_TYPE => 7;
@@ -268,6 +268,11 @@ has 'active_navigation_action' => (
268268 default => 0,
269269);
270270
271+ has ' concurrent_active_navigation_warning' => (
272+ is => ' ro' ,
273+ default => 0,
274+ );
275+
271276=head2 METHODS
272277
273278=head3 init
@@ -352,13 +357,20 @@ sub init_webkit {
352357 my ($view , $decision , $type ) = @_ ;
353358 if ($type eq ' navigation-action' ) {
354359 my $action = $decision -> get_navigation_action;
355- die " Already running a navigation action to " .
356- $self -> active_navigation_action
357- . " when requested "
358- . $action -> get_navigation_type . ' ' . $action -> get_request-> get_uri
359- if $self -> active_navigation_action and not $action -> is_redirect;
360+
361+ if ($self -> concurrent_active_navigation_warning
362+ and $self -> active_navigation_action and not $action -> is_redirect) {
363+
364+ warn " Already running a navigation action to " .
365+ $self -> active_navigation_action
366+ . " when requested "
367+ . $action -> get_navigation_type . ' ' . $action -> get_request-> get_uri;
368+ }
369+
360370 $self -> active_navigation_action($action -> get_request-> get_uri)
361- if ($self -> view-> get_uri =~ s / #.*// r ) ne ($action -> get_request-> get_uri =~ s / #.*// r );
371+ if ($self -> view-> get_uri =~ s / #.*// r ) ne ($action -> get_request-> get_uri =~ s / #.*// r )
372+ and not $action -> is_redirect;
373+
362374 }
363375 $decision -> use;
364376 return 0;
0 commit comments