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 Jul 1, 2019
2 parents 5f2f55d + 50019b2 commit 8e18821
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 8e18821

Please sign in to comment.