In some cases JSON values cannot be constructed by C++ typesafe builder. Runtime validator should be generated for such values.
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.