WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
199423
Make sure to cross-thread copy in StorageManager when hopping back to the main thread
https://bugs.webkit.org/show_bug.cgi?id=199423
Summary
Make sure to cross-thread copy in StorageManager when hopping back to the mai...
youenn fablet
Reported
2019-07-02 14:46:56 PDT
Make sure to cross-thread copy in StorageManager when hopping back to the main thread
Attachments
Patch
(7.06 KB, patch)
2019-07-02 14:59 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(7.05 KB, patch)
2019-07-02 15:46 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(6.02 KB, patch)
2019-07-02 16:58 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-07-02 14:59:20 PDT
Created
attachment 373364
[details]
Patch
youenn fablet
Comment 2
2019-07-02 15:46:39 PDT
Created
attachment 373367
[details]
Patch
Chris Dumez
Comment 3
2019-07-02 16:37:35 PDT
Comment on
attachment 373367
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=373367&action=review
> Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:132 > +Vector<LocalStorageDatabaseTracker::OriginDetails> LocalStorageDatabaseTracker::originDetailsIsolatedCopy()
What's getting isolatedCopied here? It is not obvious to me from looking at the implementation.
youenn fablet
Comment 4
2019-07-02 16:43:10 PDT
Comment on
attachment 373367
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=373367&action=review
>> Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:132 >> +Vector<LocalStorageDatabaseTracker::OriginDetails> LocalStorageDatabaseTracker::originDetailsIsolatedCopy() > > What's getting isolatedCopied here? It is not obvious to me from looking at the implementation.
There is nothing getting copied but I want to make it clear that this method is generating already isolated strings here. Initially, when reading the code, I thought there might be an issue and was thinking of isolating-copy at call site. Maybe another name might be better or adding an ASSERT at call site?
Chris Dumez
Comment 5
2019-07-02 16:51:49 PDT
Comment on
attachment 373367
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=373367&action=review
>>> Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:132 >>> +Vector<LocalStorageDatabaseTracker::OriginDetails> LocalStorageDatabaseTracker::originDetailsIsolatedCopy() >> >> What's getting isolatedCopied here? It is not obvious to me from looking at the implementation. > > There is nothing getting copied but I want to make it clear that this method is generating already isolated strings here. > Initially, when reading the code, I thought there might be an issue and was thinking of isolating-copy at call site. > Maybe another name might be better or adding an ASSERT at call site?
Why not isolateCopy() at call site? Nothing guarantees that origin.databaseIdentifier() returns a String that is isolated. It might be safe now but no guarantee that origin.databaseIdentifier() does not get updated in the future.
youenn fablet
Comment 6
2019-07-02 16:55:35 PDT
(In reply to Chris Dumez from
comment #5
)
> Comment on
attachment 373367
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=373367&action=review
> > >>> Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:132 > >>> +Vector<LocalStorageDatabaseTracker::OriginDetails> LocalStorageDatabaseTracker::originDetailsIsolatedCopy() > >> > >> What's getting isolatedCopied here? It is not obvious to me from looking at the implementation. > > > > There is nothing getting copied but I want to make it clear that this method is generating already isolated strings here. > > Initially, when reading the code, I thought there might be an issue and was thinking of isolating-copy at call site. > > Maybe another name might be better or adding an ASSERT at call site? > > Why not isolateCopy() at call site? Nothing guarantees that > origin.databaseIdentifier() returns a String that is isolated. It might be > safe now but no guarantee that origin.databaseIdentifier() does not get > updated in the future.
Yeah, this should not be called that often so let's do it.
youenn fablet
Comment 7
2019-07-02 16:58:37 PDT
Created
attachment 373372
[details]
Patch
WebKit Commit Bot
Comment 8
2019-07-03 10:28:59 PDT
Comment on
attachment 373372
[details]
Patch Clearing flags on attachment: 373372 Committed
r247092
: <
https://trac.webkit.org/changeset/247092
>
WebKit Commit Bot
Comment 9
2019-07-03 10:29:00 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2019-07-03 10:29:17 PDT
<
rdar://problem/52596472
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug