Closed Bug 1575335 Opened 5 years ago Closed 5 years ago

Figure out if a script is tracking without copying the script name

Categories

(Core :: Privacy: Anti-Tracking, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mccr8, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

In bug 1574972, I'm making nsJSUtils::GetCallingLocation() more fallible, because it creates a copy of the string, and there are crashes in the wild on Android where the script file name is 300KB or more.

Most places that call these methods are just doing it for error reporting, but Olli pointed out that two places are both doing more than just reporting an error, and don't actually need to keep the string alive, so the copy is unnecessary:
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/dom/xhr/XMLHttpRequestMainThread.cpp#2417,2430,2434
https://searchfox.org/mozilla-central/rev/03853a6e87c4a9405fce1de49e5d03b9e7a7a274/dom/fetch/Fetch.cpp#483-484

Ehsan said he could put a patch together.

Flags: needinfo?(ehsan)
See Also: → 1574972
Assignee: nobody → ehsan
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c98667d7a9a8
Avoid creating an extra copy of the file name URI when checking whether the currently running script is from a tracker; r=smaug
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: