Summary: | [WebIDL] Do a pass of cleanup in the bindings generator | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Sam Weinig
2017-05-24 17:45:24 PDT
Created attachment 311228 [details]
Patch
Comment on attachment 311228 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311228&action=review > Source/WebCore/bindings/js/JSReadableStreamSourceCustom.cpp:42 > + // FIXME: Why is it ok to ASSERT the argument count here? I don't think it is OK :S Committed r217433: <http://trac.webkit.org/changeset/217433> (In reply to Chris Dumez from comment #2) > Comment on attachment 311228 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=311228&action=review > > > Source/WebCore/bindings/js/JSReadableStreamSourceCustom.cpp:42 > > + // FIXME: Why is it ok to ASSERT the argument count here? > > I don't think it is OK :S Youenn says it is "safe" because this API is only called from internal JS, not exposed to the Web. Either way, I still think this is very unnecessarily fragile and we should do an arg count check. Right now, it is calling uncheckedArgument() and would likely crash. JSReadableStreamSourceCustom start/pull is only to be called by ReadableStream implementation which will always pass a controller. It is safe to do so and all fetch API+body as stream tests would crash if we were to have an issue there. If you want more safety here, removing uncheckedArgument and ensuring we got a controller would be needed. |