Summary: | CacheQueryOptions::isolatedCopy() copies the cache name twice | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||
Component: | WebCore Misc. | Assignee: | Daniel Bates <dbates> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Local Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Daniel Bates
2017-08-24 19:01:15 PDT
Created attachment 319054 [details]
Patch
I do not understand how we can came to the decision to have a user-defined constructor for CacheQueryOptions that makes an isolated copy of the passed string. I mean it seems weird that the constructor would charge for an isolated copy when a caller may not pass CacheQueryOptions to another thread. Or is the design that CacheQueryOptions is always passed to another thread? Comment on attachment 319054 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319054&action=review > Source/WebCore/Modules/cache/CacheQueryOptions.h:-47 > - , cacheName(cacheName.isolatedCopy()) Wouh, that is a strange constructor! This constructor might be needed for some platforms since CacheQueryOptions is initializing some variables. If this patch compiles on win, this patch is fine. Otherwise, the constructor should be kept and take a String&&. r=me, waiting for win bot (In reply to Daniel Bates from comment #2) > I do not understand how we can came to the decision to have a user-defined > constructor for CacheQueryOptions that makes an isolated copy of the passed > string. I mean it seems weird that the constructor would charge for an > isolated copy when a caller may not pass CacheQueryOptions to another > thread. Or is the design that CacheQueryOptions is always passed to another > thread? It is definitely a mistake. Created attachment 319061 [details]
Patch
Committed r221306: <http://trac.webkit.org/changeset/221306> |