Summary: | Enable DOM class create functions to take parameters in case of JSBuiltinConstructor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||
Component: | WebCore Misc. | Assignee: | youenn fablet <youennf> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | achristensen, cdumez, cgarcia, commit-queue, darin | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 154729 | ||||||||||
Attachments: |
|
Description
youenn fablet
2016-03-04 08:55:12 PST
Created attachment 273002 [details]
Patch
Created attachment 273005 [details]
Fixing DOMWrapper::create(...) case
Comment on attachment 273005 [details] Fixing DOMWrapper::create(...) case View in context: https://bugs.webkit.org/attachment.cgi?id=273005&action=review > Source/WebCore/bindings/js/JSDOMConstructor.h:125 > + JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject&); > + JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject*); > // Usually defined for each specialization class. I don’t think these two should be grouped with the comment below. Consider adding a blank line. > Source/WebCore/bindings/js/JSDOMConstructor.h:261 > + ASSERT(castedThis); Not sure this assertion is valuable. > Source/WebCore/bindings/js/JSDOMWrapper.h:83 > + template<typename T> > + static constexpr auto test(int) -> decltype(T::create(), bool()) { return true; } > + template<typename T> > + static constexpr bool test(...) { return false; } I think the would read better as one liners instead of split into two lines. Created attachment 273137 [details]
Patch for landing
Thanks for the review. Landing patch uploaded according comments. Comment on attachment 273137 [details] Patch for landing Clearing flags on attachment: 273137 Committed r197642: <http://trac.webkit.org/changeset/197642> All reviewed patches have been landed. Closing bug. |