Differential D12680 Diff 30510 src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
Show All 15 Lines | $file = id(new PhabricatorFileQuery()) | ||||
->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
->withPHIDs(array($this->phid)) | ->withPHIDs(array($this->phid)) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$file) { | if (!$file) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$data = $file->loadFileData(); | $data = $file->loadFileData(); | ||||
$data = @json_decode($data, true); | try { | ||||
if (!$data) { | $data = phutil_json_decode($data); | ||||
throw new Exception('Failed to unserialize XHProf profile!'); | } catch (PhutilJSONParserException $ex) { | ||||
throw new PhutilProxyException( | |||||
pht('Failed to unserialize XHProf profile!'), | |||||
$ex); | |||||
} | } | ||||
$symbol = $request->getStr('symbol'); | $symbol = $request->getStr('symbol'); | ||||
$is_framed = $request->getBool('frame'); | $is_framed = $request->getBool('frame'); | ||||
if ($symbol) { | if ($symbol) { | ||||
$view = new PhabricatorXHProfProfileSymbolView(); | $view = new PhabricatorXHProfProfileSymbolView(); | ||||
Show All 22 Lines |