CrashTest.pl
changeset 42 604ffca3aec1
parent 41 f2292404519a
child 47 b8a7a5ec6461
equal deleted inserted replaced
41:f2292404519a 42:604ffca3aec1
    10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11 # GNU General Public License for more details.
    11 # GNU General Public License for more details.
    12 #
    12 #
    13 # You should have received a copy of the GNU General Public License
    13 # You should have received a copy of the GNU General Public License
    14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
       
    15 
       
    16 # ABSTRACT: Web interface for breakpad
    15 
    17 
    16 use Mojolicious::Lite;
    18 use Mojolicious::Lite;
    17 use UUID;
    19 use UUID;
    18 use lib 'lib';
    20 use lib 'lib';
    19 
    21 
    78 
    80 
    79     my $crashing_thread = CrashTest::Models::Thread->new($data->{crashing_thread});
    81     my $crashing_thread = CrashTest::Models::Thread->new($data->{crashing_thread});
    80     $crashing_thread = $stackfilter->apply($crashing_thread);
    82     $crashing_thread = $stackfilter->apply($crashing_thread);
    81     $self->stash(crashing_thread => $crashing_thread);
    83     $self->stash(crashing_thread => $crashing_thread);
    82 
    84 
    83     my $threads = [];
    85     my @threads = ();
    84     foreach my $raw_thread(@{$data->{threads}}) {
    86     foreach my $raw_thread(@{$data->{threads}}) {
    85         my $thread = CrashTest::Models::Thread->new($raw_thread);
    87         my $thread = CrashTest::Models::Thread->new($raw_thread);
    86         $thread = $stackfilter->apply($thread);
    88         $thread = $stackfilter->apply($thread);
    87         push $threads, $thread;
    89         push @threads, $thread;
    88     }
    90     }
    89     $self->stash(threads => $threads);
    91     $self->stash(threads => \@threads);
    90 
    92 
    91     $self->render('report/crash');
    93     $self->render('report/crash');
    92 } => 'report';
    94 } => 'report';
    93 
    95 
    94 post '/submit' => sub {
    96 post '/submit' => sub {