Summary: | Web Inspector: CodeGeneratorInspector.py: add optional runtime validator | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Peter Rybin <prybin> | ||||||||||||||||||||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||||||||
Severity: | Normal | CC: | apavlov, bweinstein, caseq, joepeck, keishi, loislo, pfeldman, pmuellr, prybin, rik, timothy, yurys | ||||||||||||||||||||||||||||
Priority: | P2 | ||||||||||||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||||||||||
OS: | All | ||||||||||||||||||||||||||||||
Attachments: |
|
Description
Peter Rybin
2012-01-19 17:22:47 PST
Created attachment 123227 [details]
For buildbots
Created attachment 123320 [details]
InspectorFrontend.h base version
Created attachment 123321 [details]
InspectorFrontend.cpp base version
Created attachment 123323 [details]
sample of new InspectorFrontend.h
Created attachment 123324 [details]
sample of new InspectorFrontend.cpp
New InspectorFrontend.cpp
Created attachment 123325 [details]
Diff
Comment on attachment 123227 [details] For buildbots View in context: https://bugs.webkit.org/attachment.cgi?id=123227&action=review Wrong alignment in generated code: if (it != object->end()) { Subtype::assertCorrectValue(RefPtr<InspectorValue>(it->second)); ++count; } > Source/WebCore/inspector/CodeGeneratorInspector.py:180 > +VALIDATOR_IFDEF_NAME = "(!ASSERT_DISABLED)" should be #if !ASSERT_DISABLED (no parenthesis) > Source/WebCore/inspector/CodeGeneratorInspector.py:319 > + return "assertIsString" assertIsString -> assertString > Source/WebCore/inspector/CodeGeneratorInspector.py:347 > + return "assertIsInt" assertInt > Source/WebCore/inspector/CodeGeneratorInspector.py:746 > + validator_writer.newline("void %s%s::assertCorrectValue(PassRefPtr<InspectorValue> value)\n" % (helper.full_name_prefix_for_impl, enum_name)) Parameter type should be raw pointer, not PassRefPtr here as you don't pass ownership here. > Wrong alignment in generated code: > if (it != object->end()) { > Subtype::assertCorrectValue(RefPtr<InspectorValue>(it->second)); > ++count; > } Done > > Source/WebCore/inspector/CodeGeneratorInspector.py:180 > > +VALIDATOR_IFDEF_NAME = "(!ASSERT_DISABLED)" > should be #if !ASSERT_DISABLED (no parenthesis) Done > > Source/WebCore/inspector/CodeGeneratorInspector.py:319 > > + return "assertIsString" > assertIsString -> assertString > > Source/WebCore/inspector/CodeGeneratorInspector.py:347 > > + return "assertIsInt" > assertInt Done > > Source/WebCore/inspector/CodeGeneratorInspector.py:746 > > + validator_writer.newline("void %s%s::assertCorrectValue(PassRefPtr<InspectorValue> value)\n" % (helper.full_name_prefix_for_impl, enum_name)) > Parameter type should be raw pointer, not PassRefPtr here as you don't pass ownership here. Done Created attachment 123601 [details]
Patch
Created attachment 123602 [details]
Sample of new InspectorFrontend.h
Created attachment 123603 [details]
Sample of new InspectorFrontend.cpp
Created attachment 123610 [details]
Patch
Created attachment 123612 [details]
Patch
Comment on attachment 123612 [details]
Patch
Please use static_cast on raw pointers instead of reinterpret cast on RefPtr<>* in cases like this:
*(reinterpret_cast<RefPtr<CallFrame>*>(&object))
Created attachment 123764 [details]
Patch
Created attachment 123766 [details]
Sample of new InspectorFrontend.h
Comment on attachment 123764 [details] Patch Clearing flags on attachment: 123764 Committed r105863: <http://trac.webkit.org/changeset/105863> All reviewed patches have been landed. Closing bug. |