Bug 180042
Summary: | check-webkit-style should detect missing WTF_MAKE_ISO_ALLOCATED/WTF_MAKE_ISO_ALLOCATED_IMPL macros | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | fpizlo, lforschler, zalan |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=180010 | ||
Bug Depends on: | 178108 | ||
Bug Blocks: |
David Kilzer (:ddkilzer)
In Bug 178108, isolated heaps were introduced for all render tree objects. However, at least one class was missed (fixed by Bug 180010).
It would be really useful to have a check-webkit-style checker that warns when WTF_MAKE_ISO_ALLOCATED or WTF_MAKE_ISO_ALLOCATED_IMPL are missing from a new or existing class.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
One way to do this would be to match on class name (since we want all Render* classes to opt into ISO heaps), but that won't work if other classes start opting in as well.
A better approach may be to figure out how to preprocess the header file (thus pulling in the base class declaration), and then check the base class declaration of the new/modified subclass to see if it's missing the WTF_MAKE_ISO_ALLOCATED macro.
To check for the need for the WTF_MAKE_ISO_ALLOCATED_IMPL macro, we just need to check that the header file contains a WTF_MAKE_ISO_ALLOCATED macro within its class declaration.
Obviously, the checker should check for both conditions: (a) using a macro when it shouldn't be used, and (b) omitting a macro when it should be used.