Skip to content
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

Fixing variable definitions and scoping. Fixes #706. #749

Merged
merged 3 commits into from
May 30, 2018
Merged

Conversation

jakearchibald
Copy link
Collaborator

@jakearchibald jakearchibald commented May 30, 2018

I used this horrible piece of code (run in the console) to identify variables that weren't correctly defined.


Preview | Diff

@jakearchibald jakearchibald requested a review from annevk May 30, 2018 14:14
fetch.bs Outdated
@@ -2857,16 +2857,14 @@ with a <i>CORS flag</i> and <i>recursive flag</i>, run these steps:
<var>noCorsResponse</var>.

<li>
<p>Set <var>corbSanitizedResponse</var> to a new <a for=/>response</a> whose
<p>Return a new <a for=/>response</a> whose
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me fix the wrapping here

fetch.bs Outdated

<li><p>Let <var>storedResponse</var> be null.

<li><p>Let <var>revalidatingFlag</var> be an unset flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original phrasing for this is slightly more correct, or at least consistent with what we're trying to aim for these days... (I'm sorry, I wish we had never done flags and started with booleans.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with the above with consistency with other "let"s, but I'll put it back…

<a for=response>status</a> is <var>noCorsResponse</var>'s <a for=response>status</a>,
<a for=response>HTTPS state</a> is <var>noCorsResponse</var>'s
<a for=response>HTTPS state</a>, and <a for=response>CSP list</a> is
<var>noCorsResponse</var>'s <a for=response>CSP list</a>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@jakearchibald
Copy link
Collaborator Author

Filed speced/bikeshed#1255 in case there's a way to detect this at build time.

@annevk annevk merged commit 3055f13 into master May 30, 2018
@annevk
Copy link
Member

annevk commented May 30, 2018

Thanks, I hope that works out!

@annevk annevk deleted the var-scoping branch May 30, 2018 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants