You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split ScriptMsg into common and unique messages for main-thread and worker event loops #3734
A-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.
Enums like CommonScriptMsg, WorkerScriptMsg, and MainThreadScriptMsg, where the latter two have a variant for CommonScriptMsg, would make a lot of sense. Conflating messages that both event loops need to handle with ones that should never be dispatched to one or the other is unnecessary and confusing.
My idea was to have three enums CommonScriptMsg, WorkerScriptMsg and MainThreadScriptMsg as separate enums. Things that are dispatched to both dedicatedworkerglobalscope and ScriptTask should are present in the CommonScriptMsg.
@jdm Sorry about that. I am presently not working on this. Can you remove the C-assigned tag? I should have updated the issue long back. Sorry again :).
I'll take a stab at this issue @jdm, could you just give me some guidance as to what attributes of the ScriptMsg enum should be part of each of the others?
Thanks @wldcordeiro! Any event that is processed only by the worker event loop in dedicatedworkerglobal.rs (handle_event) belongs in one enum, while any event that is only processed by the event loop in script_task.rs (handle_msgs) belongs in another. Any event that is processed by both of them belongs in a common enum. Does that make sense?
@jdm that does make sense, but would it also make sense to move the enums to different modules? Or would it be fine if they all were in script_task.rs?
This isn't valid, since the arguments to the Common variant are not types, they are values. Enum variants are only allowed to contain types (such as WorkerScriptMsg, or CommonScriptMsg). Does that make more sense?
Yep, my mistake. I'll make sure to think through the ramifications of such changes more thoroughly in the future before proposing them to eager new contributors.
A-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.
Activity
catchmrbharath commentedon Jan 5, 2015
@jdm What do you mean by "latter two have a variant for CommonScriptMessage" ?
If that is cleared up, I would like to have at go at this issue.
catchmrbharath commentedon Jan 5, 2015
My idea was to have three enums
CommonScriptMsg,WorkerScriptMsgandMainThreadScriptMsgas separate enums. Things that are dispatched to both dedicatedworkerglobalscope andScriptTaskshould are present in theCommonScriptMsg.jdm commentedon Jan 5, 2015
@catchmrbharath I mean that we'll have something like
enum WorkerScriptMsg { A(whatever), Common(CommonScriptMsg) }.jdm commentedon Feb 20, 2015
Still working on this, @catchmrbharath?
catchmrbharath commentedon Feb 22, 2015
@jdm Sorry about that. I am presently not working on this. Can you remove the C-assigned tag? I should have updated the issue long back. Sorry again :).
jdm commentedon Feb 22, 2015
No problem!
wldcordeiro commentedon Mar 5, 2015
I'll take a stab at this issue @jdm, could you just give me some guidance as to what attributes of the ScriptMsg enum should be part of each of the others?
jdm commentedon Mar 5, 2015
Thanks @wldcordeiro! Any event that is processed only by the worker event loop in dedicatedworkerglobal.rs (handle_event) belongs in one enum, while any event that is only processed by the event loop in script_task.rs (handle_msgs) belongs in another. Any event that is processed by both of them belongs in a common enum. Does that make sense?
wldcordeiro commentedon Mar 5, 2015
@jdm that does make sense, but would it also make sense to move the enums to different modules? Or would it be fine if they all were in script_task.rs?
8 remaining items
jdm commentedon Mar 8, 2015
This isn't valid, since the arguments to the
Commonvariant are not types, they are values. Enum variants are only allowed to contain types (such asWorkerScriptMsg, orCommonScriptMsg). Does that make more sense?jdm commentedon Mar 8, 2015
Oh, I guess you sorted that out on your own. I guess the PR builds now? :)
wldcordeiro commentedon Mar 9, 2015
@jdm PR is building! Looks like it's working. 😄
wldcordeiro commentedon Apr 8, 2015
@jdm You can remove the assigned tag. I've been too busy lately to work on this.
wldcordeiro commentedon Aug 14, 2015
@Wafflespeanut That's kind of what I was running into. It was definitely more complex than the description suggests.
jdm commentedon Aug 14, 2015
Yep, my mistake. I'll make sure to think through the ramifications of such changes more thoroughly in the future before proposing them to eager new contributors.
Auto merge of #7006 - Wafflespeanut:script_cleanup, r=jdm
Auto merge of #7006 - Wafflespeanut:script_cleanup, r=jdm
waddlesplash commentedon Aug 15, 2015
PR was merged, this should be closed now.
build: bump urllib3 from 2.5.0 to 2.6.3 in /etc/ci/scenario (#41945)