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

Simplify HeadersInit #418

Merged
merged 2 commits into from
Nov 30, 2016
Merged

Simplify HeadersInit #418

merged 2 commits into from
Nov 30, 2016

Conversation

annevk
Copy link
Member

@annevk annevk commented Nov 23, 2016

Since Headers has an iterator now through its iterable<> declaration
there’s no real need to special case.

It might be slightly faster to have it there, but this is not
performance-critical code and I’d rather have it be simple.

Since Headers has an iterator now through its iterable<> declaration
there’s no real need to special case.

It might be slightly faster to have it there, but this is not
performance-critical code and I’d rather have it be simple.
@annevk
Copy link
Member Author

annevk commented Nov 23, 2016

@bzbarsky @wanderview @domenic thoughts?

@wanderview
Copy link
Member

Does this have any change on behavior visible to script? If not, then I I have no objections.

@annevk
Copy link
Member Author

annevk commented Nov 23, 2016

It does. If you overwrite the iterator of a Headers object that would be invoked instead by the binding layer.

@bzbarsky
Copy link

Right, the behavior also changes if people have messed with array iterators (so the inner sequence produces unexpected values).

It's probably OK to not worry about those edge cases.

@domenic
Copy link
Member

domenic commented Nov 23, 2016

Looks good; tests would probably help.

annevk added a commit to web-platform-tests/wpt that referenced this pull request Nov 23, 2016
This is a change for whatwg/fetch#418 and also
aligns with the recent IDL change to replace OpenEndedDictionary with
record.
@annevk
Copy link
Member Author

annevk commented Nov 23, 2016

I created web-platform-tests/wpt#4240. It seems we already had many tests for IDL records since everyone implemented that somehow before IDL got them.

@annevk
Copy link
Member Author

annevk commented Nov 23, 2016

Once that lands I'll land this.

@annevk
Copy link
Member Author

annevk commented Nov 24, 2016

Tests landed. Waiting with landing this until a Shepherd issue is resolved.

@annevk annevk merged commit 00fce0d into master Nov 30, 2016
@annevk annevk deleted the annevk/simplify-HeadersInit branch November 30, 2016 05:54
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.

4 participants