Bug 172021 - Cleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
Summary: Cleanup: Make QueueTaskToEventLoopFunctionPtr take JSGlobalObject&
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-11 22:31 PDT by Daniel Bates
Modified: 2017-05-12 10:53 PDT (History)
7 users (show)

See Also:


Attachments
Patch (13.45 KB, patch)
2017-05-11 23:49 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-05-11 22:31:58 PDT
Currently JSGlobalObject::queueTaskToEventLoop() takes a const JSGlobalObject* whose constness is removed in the implementation of this method in all derived classes. We should have JSGlobalObject::queueTaskToEventLoop() take a non-const JSGlobalObject* and remove the need to effectively const_cast<> it. This will also make the data types of the arguments to JSGlobalObject::queueTaskToEventLoop() match the data types for the same arguments passed to the analogous VM::queueMicrotask().
Comment 1 Daniel Bates 2017-05-11 23:46:08 PDT
s/QueueTaskToEventLoopFunctionPtr/JSGlobalObject::queueTaskToEventLoop()
Comment 2 Daniel Bates 2017-05-11 23:47:00 PDT
Actually, we should make QueueTaskToEventLoopFunctionPtr take JSGlobalObject& as all existing callers expect a non-const, non-null JSGlobalObject object.
Comment 3 Daniel Bates 2017-05-11 23:49:05 PDT
Created attachment 309876 [details]
Patch
Comment 4 Mark Lam 2017-05-12 10:38:49 PDT
Comment on attachment 309876 [details]
Patch

r=me
Comment 5 Daniel Bates 2017-05-12 10:53:22 PDT
Comment on attachment 309876 [details]
Patch

Clearing flags on attachment: 309876

Committed r216768: <http://trac.webkit.org/changeset/216768>
Comment 6 Daniel Bates 2017-05-12 10:53:24 PDT
All reviewed patches have been landed.  Closing bug.