Commit 5fc6319f authored by estade@chromium.org's avatar estade@chromium.org

settings: fix search

don't reference an element that doesn't exist. A button was removed in r160703, but it was still listed as an "associated control" for search, so that during search NULL was derefed.

BUG=155364

Review URL: https://codereview.chromium.org/11193013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162307 0039d316-1c4b-4281-b951-d872f2087c98
parent 04207809
......@@ -84,8 +84,7 @@ function load() {
$('show-cookies-button')]);
OptionsPage.registerOverlay(CookiesViewApp.getInstance(),
ContentSettings.getInstance(),
[$('privacyContentSettingsButton'),
$('show-app-cookies-button')]);
[$('privacyContentSettingsButton')]);
OptionsPage.registerOverlay(DoNotTrackConfirmOverlay.getInstance(),
BrowserOptions.getInstance());
OptionsPage.registerOverlay(FontSettings.getInstance(),
......
......@@ -500,6 +500,11 @@ cr.define('options', function() {
overlay.associatedSection =
this.findSectionForNode_(associatedControls[0]);
}
// Sanity check.
for (var i = 0; i < associatedControls.length; ++i) {
assert(associatedControls[i], 'Invalid element passed.');
}
}
// Reverse the button strip for views. See the documentation of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment