-
Notifications
You must be signed in to change notification settings - Fork 341
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
Simplify HeadersInit #418
Conversation
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.
@bzbarsky @wanderview @domenic thoughts? |
Does this have any change on behavior visible to script? If not, then I I have no objections. |
It does. If you overwrite the iterator of a Headers object that would be invoked instead by the binding layer. |
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. |
Looks good; tests would probably help. |
This is a change for whatwg/fetch#418 and also aligns with the recent IDL change to replace OpenEndedDictionary with record.
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. |
Once that lands I'll land this. |
Tests landed. Waiting with landing this until a Shepherd issue is resolved. |
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.