-
Notifications
You must be signed in to change notification settings - Fork 884
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
Fix unsafe javascript calls in brave://rewards #8740
Conversation
56b295f
to
ceaeef7
Compare
4510a5b
to
18be654
Compare
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.
Code looks good. Have we done a sanity check on the rewards page for both desktop and Android?
No I don't think so. I have checked the page on Android by clicking some buttons though. |
const base::ListValue* args) { | ||
if (!web_ui()->CanCallJavascript()) { | ||
return; | ||
void RewardsDOMHandler::OnJavascriptDisallowed() { |
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.
you also need to call weak_factory_.InvalidateWeakPtrs()
to make sure no callbacks complete after this is called
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.
Fixed.
18be654
to
60ec2da
Compare
CI failures unrelated to the PR. |
Resolves brave/brave-browser/issues/15672.
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: