Bug 300302
| Summary: | Fix Safer-CPP errors for code generated by generate-inspector-protocol-bindings.py | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | cdumez, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 300309 | ||
| Bug Blocks: | |||
Frédéric Wang (:fredw)
Looking at AutomationProtocolObjects.h, I see three kind of errors:
* UncountedCallArgsCheckerExpectations with m_result at https://searchfox.org/wubkat/rev/dd05eb230972a07f0240b959e6e22ca685ef3445/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py#345 ; It's a RefPtr member but per https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines#mark-data-members-that-are-smart-pointers-as-const-if-they-never-get-reassigned we need either it to be a smart pointer on the stack or to be a const. The latter is not possible because of the function mentioned in the next bullet.
* Unsafe cast from type 'Ref' to an unrelated type 'Ref' for https://searchfox.org/wubkat/rev/dd05eb230972a07f0240b959e6e22ca685ef3445/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py#225
* Unsafe cast from type 'Builder' to an unrelated type 'Builder' for https://searchfox.org/wubkat/rev/dd05eb230972a07f0240b959e6e22ca685ef3445/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py#206
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Frédéric Wang (:fredw)
Pull request: https://github.com/WebKit/WebKit/pull/51926
Radar WebKit Bug Importer
<rdar://problem/162583856>