bugfix(shields): Remove Image.prototype.src getter/setter readonly protections on iOS #27234
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
$()
wrapper on ourImage.prototype.src
getter/setter inTrackingProtectionStats.js
is causing an error that results in a blank screen ondillards.com
and some other sites:[Error] TypeError: Attempted to assign to readonly property.
TrackingProtectionStats.js
is used for us to determine the number of ads/trackers blocked on a page. The potential consequence of removing this protection is the site could manipulate ourImage.prototype.src
override and we may not know if an image was blocked to count in our tracking stats, however the image would still be blocked (it just won't be included in our "Ads and other creepy things blocked" stats / count). This count is considered an estimate; it's better we don't have webcompat issues than a perfectly correct stats count.This same error is also observed on
petsafe.com
, however there is another issue on that site causing a white screen that is not fixed by this PR.typekit.net
css which the page requires to load:[Error] Error: Loading CSS chunk 1869 failed.
petsafe.com
will only display with content blocker (or slimlist disabled) AND this PR's fix to remove$()
wrapper onImage.prototype.src
.Resolves brave/brave-browser#43286
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
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: