<?php

abstract class PhabricatorXHProfController extends PhabricatorController {

  public function buildStandardPageResponse($view, array $data) {
    $page = $this->buildStandardPageView();

    $page->setApplicationName('XHProf');
    $page->setBaseURI('/xhprof/');
    $page->setTitle(idx($data, 'title'));
    $page->setGlyph("\xE2\x98\x84");
    $page->appendChild($view);

    $response = new AphrontWebpageResponse();

    if (isset($data['frame'])) {
      $response->setFrameable(true);
      $page->setFrameable(true);
      $page->setShowChrome(false);
      $page->setDisableConsole(true);
    }

    return $response->setContent($page->render());
  }

}

<?php

abstract class PhabricatorXHProfController extends PhabricatorController {

  public function buildStandardPageResponse($view, array $data) {
    $page = $this->buildStandardPageView();

    $page->setApplicationName('XHProf');
    $page->setBaseURI('/xhprof/');
    $page->setTitle(idx($data, 'title'));
    $page->setGlyph("\xE2\x98\x84");
    $page->appendChild($view);
    $page->setDeviceReady(true);

    $response = new AphrontWebpageResponse();

    if (isset($data['frame'])) {
      $response->setFrameable(true);
      $page->setFrameable(true);
      $page->setShowChrome(false);
      $page->setDisableConsole(true);
    }

    return $response->setContent($page->render());
  }

}

Set device true on all XHProf pages
Set device true on all XHProf pages

Summary: Pass this as true when building XHProf pages

Test Plan: Verify setDeviceReady exists in class PhabricatorBarePageView

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11980
