| Summary: | Add WTF_MAKE_FAST_ALLOCATED for lots of ScriptWrappable-derived classes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | New Bugs | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | cdumez, Hironori.Fujii, simon.fraser, ysuzuki | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2018-07-09 21:53:06 PDT
Created attachment 344663 [details]
Patch
Why don’t We add it to ScriptWrappable class instead? I'm fuzzy on how it behaves with multiple inheritance. (In reply to Simon Fraser (smfr) from comment #3) > I'm fuzzy on how it behaves with multiple inheritance. It should work since all the implementation have the same code. The allocation size `size_t` will be passed by the C++ runtime, which is calculated at the callsite of `new`. So, multiple inheritance should work. (In reply to Yusuke Suzuki from comment #4) > It should work since all the implementation have the same code. The > allocation size `size_t` will be passed by the C++ runtime, which is > calculated at the callsite of `new`. So, multiple inheritance should work. Is this right? I get "error: request for member 'operator new' is ambiguous". https://godbolt.org/g/Zx38fe It can be solved by adding "using Base1::operator new;". https://godbolt.org/g/u6SEQC |