Skip to content

Commit

Permalink
Merge pull request #2835 from brave/fix/5086-new-tab-dcheck
Browse files Browse the repository at this point in the history
New Tab Page: fix DCHECK
  • Loading branch information
petemill authored and bsclifton committed Jul 2, 2019
1 parent a8b26fb commit 669c4c2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions browser/ui/webui/brave_new_tab_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ BraveNewTabUI::~BraveNewTabUI() {
}

void BraveNewTabUI::UpdateWebUIProperties() {
// TODO(petemill): move all this data to set on loadTimeData
// on the DataSource via the MessageHandler
auto* render_view_host = GetRenderViewHost();
SetStatsWebUIProperties(render_view_host);
SetPrivateWebUIProperties(render_view_host);
SetPreferencesWebUIProperties(render_view_host);
if (IsSafeToSetWebUIProperties()) {
// TODO(petemill): move all this data to set on loadTimeData
// on the DataSource via the MessageHandler
auto* render_view_host = GetRenderViewHost();
SetStatsWebUIProperties(render_view_host);
SetPrivateWebUIProperties(render_view_host);
SetPreferencesWebUIProperties(render_view_host);
}
}

void BraveNewTabUI::SetStatsWebUIProperties(
Expand Down

0 comments on commit 669c4c2

Please sign in to comment.