Bug 199516 - Add threading assertion to WTF::CompletionHandler
Summary: Add threading assertion to WTF::CompletionHandler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-05 08:20 PDT by Chris Dumez
Modified: 2019-07-08 11:27 PDT (History)
14 users (show)

See Also:


Attachments
WIP Patch (993 bytes, patch)
2019-07-05 08:21 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (1.08 KB, patch)
2019-07-05 08:37 PDT, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-highsierra (3.67 MB, application/zip)
2019-07-05 09:52 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (3.37 MB, application/zip)
2019-07-05 10:10 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews112 for mac-highsierra (3.55 MB, application/zip)
2019-07-05 10:42 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (3.22 MB, application/zip)
2019-07-05 10:56 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews211 for win-future (13.45 MB, application/zip)
2019-07-05 13:07 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews210 for win-future (13.87 MB, application/zip)
2019-07-05 13:48 PDT, EWS Watchlist
no flags Details
WIP Patch (13.18 KB, patch)
2019-07-05 14:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.46 KB, patch)
2019-07-05 15:57 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (18.38 KB, patch)
2019-07-08 10:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.