-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes application crashes when calculating the winning page classification category #4770
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
@@ -872,6 +879,7 @@ std::vector<std::string> AdsImpl::GetWinningCategories() { | |||
|
|||
for (const auto& page_score : page_score_history) { | |||
DCHECK(page_score.size() == count); | |||
DCHECK(user_model_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we don't need a check on a null pointer for user_model_
? As that is the reason of the crash. Maybe we should fail with empty winning_categories
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've discussed this on a call, the place should never be reached when the pointer is null. Let's
apply the fix and reopen the issue if we still see it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
CI failed on Linux, restarting CI for Linux |
CI failing on Linux for unrelated issues, merging |
checked CI with @tmancey, linux looks unrelated |
Reproduced the original issue on
Using the STR from #4770 (comment), ran into the following crash/error:
Verification PASSED on
|
Resolves brave/brave-browser#7866
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
See brave/brave-browser#7866
Reviewer Checklist:
After-merge Checklist:
changes has landed on.