Skip to content

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

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

domenic
Copy link
Member

@domenic domenic commented Oct 4, 2016

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.

<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>
Copy link
Member

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>
Copy link
Member

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.

@domenic domenic force-pushed the fix-swgs-name-and-url branch from 8445883 to 9ab2891 Compare October 5, 2016 15:45
@domenic
Copy link
Member Author

domenic commented Oct 5, 2016

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>
Copy link
Member

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.)

@annevk
Copy link
Member

annevk commented Oct 6, 2016

LGTM with that fixed.

@annevk annevk assigned domenic and unassigned annevk Oct 6, 2016
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.
@domenic domenic force-pushed the fix-swgs-name-and-url branch from 9ab2891 to 1752559 Compare October 6, 2016 16:50
@domenic domenic merged commit 1752559 into master Oct 6, 2016
@domenic domenic deleted the fix-swgs-name-and-url branch October 6, 2016 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants