Don't send large URI's over IPC with SendVisitURI() if the URI won't be added to history
Categories
(Toolkit :: Places, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: haik, Assigned: haik)
Details
Attachments
(1 file)
Don't send URI's over IPC to the parent with SendVisitURI() if the URI is too large or the wrong scheme (e.g., data:) to be added to the history. Data URI's or URI's over 2000 bytes are not added to the history so we can avoid unnecessary IPC traffic by checking the scheme and size in the content process first. On bug 1609631, the test case calls FileReader.readAsDataURL() on a PDF file input which triggers a call to SendVisitURI() sending the file contents as a data URI.
Assignee | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
This is a good optimization idea, thanks!
Assignee | ||
Comment 2•4 years ago
|
||
Avoid unnecessary IPC traffic by checking if URI's meet the history criteria before sending them to the parent with SendVisitURI.
Assignee | ||
Comment 3•4 years ago
|
||
With this fix, I looked into making nsNavHistory::mHistoryEnabled
static, set once at startup, but the test toolkit/components/places/tests/browser/browser_visituri_nohistory.js
modifies this pref so I did not undertake trying to make nvNavHistory::IsHistoryDisabled()
be called in the child.
Pushed by haftandilian@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0483abbea83d Don't call SendVisitURI() if the URI won't be added to history r=mak
Comment 5•4 years ago
|
||
Backed out for build bustages.
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299690942&repo=autoland&lineNumber=41448
Backout: https://hg.mozilla.org/integration/autoland/rev/f707e3fa32cb45c899eeceff408c81b906333c60
Pushed by haftandilian@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9647b3d42c39 Don't call SendVisitURI() if the URI won't be added to history r=mak
Assignee | ||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Description
•