Bug 199516

Summary: Add threading assertion to WTF::CompletionHandler
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, benjamin, cmarcelo, commit-queue, dbates, esprehn+autocc, ews-watchlist, Hironori.Fujii, kangil.han, mcatanzaro, rniwa, webkit-bug-importer, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186171
Attachments:
Description Flags
WIP Patch
none
WIP Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews102 for mac-highsierra
none
Archive of layout-test-results from ews107 for mac-highsierra-wk2
none
Archive of layout-test-results from ews112 for mac-highsierra
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews211 for win-future
none
Archive of layout-test-results from ews210 for win-future
none
WIP Patch
none
Patch
none
Patch none

Description Chris Dumez 2019-07-05 08:20:46 PDT
Add threading assertion to WTF::CompletionHandler to make sure it is constructed and called on the same thread.
Comment 1 Chris Dumez 2019-07-05 08:21:22 PDT
Created attachment 373493 [details]
WIP Patch
Comment 2 Chris Dumez 2019-07-05 08:37:14 PDT
Created attachment 373497 [details]
WIP Patch
Comment 3 EWS Watchlist 2019-07-05 09:52:11 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2019-07-05 09:52:13 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2019-07-05 10:10:22 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2019-07-05 10:10:24 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2019-07-05 10:42:51 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2019-07-05 10:42:53 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2019-07-05 10:56:38 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2019-07-05 10:56:40 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 2019-07-05 13:07:39 PDT Comment hidden (obsolete)
Comment 12 EWS Watchlist 2019-07-05 13:07:42 PDT Comment hidden (obsolete)
Comment 13 EWS Watchlist 2019-07-05 13:48:27 PDT Comment hidden (obsolete)
Comment 14 EWS Watchlist 2019-07-05 13:48:30 PDT Comment hidden (obsolete)
Comment 15 Chris Dumez 2019-07-05 14:17:12 PDT
Created attachment 373536 [details]
WIP Patch
Comment 16 Chris Dumez 2019-07-05 15:57:10 PDT
Created attachment 373549 [details]
Patch
Comment 17 Michael Catanzaro 2019-07-07 09:09:05 PDT
As Fujii discovered, this is a duplicate of bug #186171 and we have existing good discussion there, so I recommend using that bug instead.

FWIW: I think it's very important to add this assertion, but in the other bug you had found a problem....
Comment 18 Chris Dumez 2019-07-07 09:42:01 PDT
(In reply to Michael Catanzaro from comment #17)
> As Fujii discovered, this is a duplicate of bug #186171 and we have existing
> good discussion there, so I recommend using that bug instead.
> 
> FWIW: I think it's very important to add this assertion, but in the other
> bug you had found a problem....

The check in this patch is less strict and is compatible with work queues.
Comment 19 Chris Dumez 2019-07-07 09:42:50 PDT
(In reply to Michael Catanzaro from comment #17)
> As Fujii discovered, this is a duplicate of bug #186171 and we have existing
> good discussion there, so I recommend using that bug instead.
> 
> FWIW: I think it's very important to add this assertion, but in the other
> bug you had found a problem....

We can dupe the other one to this once it lands (less work).
Comment 20 Alex Christensen 2019-07-08 10:26:06 PDT
Comment on attachment 373549 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=373549&action=review

> Source/WebKit/ChangeLog:11
> +        worker thread. Ideally, this code would be refactored so that the callback gets called on
> +        the worker thread directly.

Should we add a FIXME comment?  This ChangeLog entry will probably never get looked at again.
Comment 21 Chris Dumez 2019-07-08 10:31:18 PDT
Created attachment 373641 [details]
Patch
Comment 22 WebKit Commit Bot 2019-07-08 11:26:55 PDT
Comment on attachment 373641 [details]
Patch

Clearing flags on attachment: 373641

Committed r247218: <https://trac.webkit.org/changeset/247218>
Comment 23 WebKit Commit Bot 2019-07-08 11:26:57 PDT
All reviewed patches have been landed.  Closing bug.