Bug 170641 - WebAssembly: There is a short window of time where a CodeBlock could be destroyed before all of its async compilation callbacks are called
Summary: WebAssembly: There is a short window of time where a CodeBlock could be destr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-08 03:45 PDT by Saam Barati
Modified: 2017-04-14 13:52 PDT (History)
7 users (show)

See Also:


Attachments
patch (3.12 KB, patch)
2017-04-14 10:13 PDT, Saam Barati
keith_miller: review+
Details | Formatted Diff | Diff
patch for landing (3.88 KB, patch)
2017-04-14 10:24 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2017-04-08 03:45:24 PDT
Thought about this while on the plane. I need to read the code again to prove to myself that this is indeed the case. The race I'm worried about is a failed compilation causing us to create a new CodeBlock before we iterate all the callbacks.
Comment 1 Saam Barati 2017-04-14 10:13:19 PDT
Created attachment 307119 [details]
patch
Comment 2 Keith Miller 2017-04-14 10:17:44 PDT
Comment on attachment 307119 [details]
patch

r=me. Maybe we should also have the plan null out the tasks after it runs them.
Comment 3 Saam Barati 2017-04-14 10:24:08 PDT
Created attachment 307120 [details]
patch for landing
Comment 4 Keith Miller 2017-04-14 10:26:12 PDT
Comment on attachment 307120 [details]
patch for landing

adding the clear lgtm.
Comment 5 WebKit Commit Bot 2017-04-14 11:09:38 PDT
Comment on attachment 307120 [details]
patch for landing

Clearing flags on attachment: 307120

Committed r215368: <http://trac.webkit.org/changeset/215368>
Comment 6 WebKit Commit Bot 2017-04-14 11:09:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alex Christensen 2017-04-14 13:52:44 PDT
http://trac.webkit.org/r215373