RESOLVED FIXED 172566
[WebIDL] Do a pass of cleanup in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=172566
Summary [WebIDL] Do a pass of cleanup in the bindings generator
Sam Weinig
Reported 2017-05-24 17:45:24 PDT
[WebIDL] Do a pass of cleanup in the bindings generator
Attachments
Patch (579.39 KB, patch)
2017-05-25 09:27 PDT, Sam Weinig
cdumez: review+
Sam Weinig
Comment 1 2017-05-25 09:27:30 PDT
Chris Dumez
Comment 2 2017-05-25 10:35:50 PDT
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
Sam Weinig
Comment 3 2017-05-25 10:40:00 PDT
Chris Dumez
Comment 4 2017-05-25 10:47:53 PDT
(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.
youenn fablet
Comment 5 2017-05-25 10:55:44 PDT
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.
Radar WebKit Bug Importer
Comment 6 2017-05-30 20:25:11 PDT
Note You need to log in before you can comment on or make changes to this bug.