-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix regression in setting up SharedWorkerGlobalScope #1858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<ol> | ||
<li><p>Set <var>worker global scope</var>'s <span | ||
data-x="concept-SharedWorkerGlobalScope-constructor-url">constructor url</span> to | ||
<var>url</var>.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, it needs to be a string, not a URL. (Or we should change the comparison operation elsewhere.)
<var>options</var>, it must run the following steps:</p> | ||
<code>MessagePort</code> <var>outside port</var>, a <code>WorkerOptions</code> dictionary | ||
<var>options</var>, and an optional string <var>name</var>, it must run the following steps. | ||
(<var>name</var> must always be provided if <var>worker</var> is a <code>SharedWorker</code>.)</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the parenthesis is not a requirement on implementations and seems more like a statement of fact, I'd use "is" rather than "must be" I think.
8445883
to
9ab2891
Compare
Rebased and fixed; good catches both. I switched to using a URL record throughout for consistency with other URLs in the spec. |
<var>options</var>, it must run the following steps:</p> | ||
<code>MessagePort</code> <var>outside port</var>, a <code>WorkerOptions</code> dictionary | ||
<var>options</var>, and an optional string <var>name</var>, it must run the following steps. | ||
(<var>name</var> is always be provided when <var>worker</var> is a <code>SharedWorker</code>.)</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/be// (I tried to hint at this by saying "must be", but I should have been more explicit. Sorry.)
LGTM with that fixed. |
cf0355d regressed setting up a SharedWorkerGlobalScope by removing the steps that set its constructor url and name. This was noticed in #1782 (comment). This also changes the constructor url from a string to a URL record, for consistency with other URLs stored on objects throughout the spec.
9ab2891
to
1752559
Compare
cf0355d regressed setting up a SharedWorkerGlobalScope by removing the steps that set its constructor url and name. This was noticed in #1782 (comment).
No tests for a spec regression fix that shouldn't have impacted implementations.