[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #29120 [Applications/Tor Browser]: Default value of media.cache_size (0) causes some media to load extremely slowly or become unplayable
#29120: Default value of media.cache_size (0) causes some media to load extremely
slowly or become unplayable
-------------------------------------------------+-------------------------
Reporter: QZw2aBQoPyuEVXYVlBps | Owner: tbb-
| team
Type: defect | Status:
| needs_revision
Priority: High | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-disk-leak, tbb-usability- | Actual Points:
website, TorBrowserTeam201902 |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by cypherpunks):
Replying to [comment:24 QZw2aBQoPyuEVXYVlBps]:
> Replying to [comment:23 cypherpunks]:
> > If you want a more sane solution and not "sane" - do not touch that
Mozilla's `if` code block, it's not broken. Add your own `if
(aIsPrivateBrowsing)` after it. Never use `int64_t` for something with
`size` in its name. Never use `int64_t()` in C++. Use spellchecker. What
happens when you `return nullptr;`?
> We either use their `if` or copy their code to our own if, I think
reusing their `if` is better than code duplication.
That's because you don't see the difference.
> We want the same exact logic to handle either case, so it makes sense to
use that block.
And we don't.
> `int64_t` is what Mozilla uses, I'm just following their code.
Heh.
> I tested what happened on `nullptr` return above, see comment 10.
Exactly. Now think what's wrong.
> The next patch includes the preference changes, I removed the
`media.cache_size` preference override
Good.
> and added one for `media.memory_cache_max_size`, doubling the default
value.
Not good.
If you want to write a more sane code, you can try to pass Mozilla's
review on Bugzilla.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29120#comment:25>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs