summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Sentry.pm5
-rw-r--r--Bugzilla/Template.pm3
2 files changed, 5 insertions, 3 deletions
diff --git a/Bugzilla/Sentry.pm b/Bugzilla/Sentry.pm
index 8020ef56f..0d7a9c980 100644
--- a/Bugzilla/Sentry.pm
+++ b/Bugzilla/Sentry.pm
@@ -358,9 +358,8 @@ sub _sentry_die_handler {
}
sub install_sentry_handler {
- require CGI::Carp;
- CGI::Carp::set_die_handler(\&_sentry_die_handler);
- $main::SIG{__WARN__} = sub {
+ $SIG{__DIE__} = \&sentry_die_handler;
+ $SIG{__WARN__} = sub {
return if _in_eval();
sentry_handle_error('warning', shift);
};
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 90d9f59f7..f93b025bf 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -529,6 +529,9 @@ sub process {
my $current_langs = Bugzilla->request_cache->{template_current_lang} ||= [];
unshift(@$current_langs, $self->context->{bz_language});
local $is_processing = 1;
+ local $SIG{__DIE__};
+ delete $SIG{__DIE__};
+ warn "WARNING: CGI::Carp makes templates slow" if $INC{"CGI/Carp.pm"};
my $retval = $self->SUPER::process(@_);
shift @$current_langs;
return $retval;