Bug 155102 - Web Inspector: It should be possible to initialize generated ObjC protocol types from an NSDictionary payload
Summary: Web Inspector: It should be possible to initialize generated ObjC protocol ty...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-06 22:06 PST by BJ Burg
Modified: 2016-03-07 10:41 PST (History)
12 users (show)

See Also:


Attachments
Proposed Fix (27.74 KB, patch)
2016-03-06 23:30 PST, BJ Burg
no flags Details | Formatted Diff | Diff
For Landing (28.00 KB, patch)
2016-03-07 09:43 PST, BJ Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-03-06 22:06:50 PST
Generate this.
Comment 1 Radar WebKit Bug Importer 2016-03-06 22:07:06 PST
<rdar://problem/25002015>
Comment 2 BJ Burg 2016-03-06 23:30:34 PST
Created attachment 273163 [details]
Proposed Fix
Comment 3 WebKit Commit Bot 2016-03-06 23:31:36 PST
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Comment 4 Timothy Hatcher 2016-03-07 09:04:09 PST
Comment on attachment 273163 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=273163&action=review

> Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:124
> +        lines.append('')

You should drop this. It leads to two newlines in a row.

> Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:1462
> +
> +

This should be one newline. See above.
Comment 5 BJ Burg 2016-03-07 09:43:47 PST
Created attachment 273187 [details]
For Landing
Comment 6 BJ Burg 2016-03-07 09:45:19 PST
(In reply to comment #4)
> Comment on attachment 273163 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273163&action=review
> 
> > Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:124
> > +        lines.append('')
> 
> You should drop this. It leads to two newlines in a row.
> 
> > Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:1462
> > +
> > +
> 
> This should be one newline. See above.

Ok. I also guarded this new method so it's only generated when we pass '--frontend' to the generator, and rebaselined.
Comment 7 WebKit Commit Bot 2016-03-07 09:46:05 PST
Attachment 273187 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py:164:  [ObjCHeaderGenerator._generate_type_interface] Instance of 'ObjCHeaderGenerator' has no 'get_generator_setting' member  [pylint/E1101] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:94:  [ObjCProtocolTypesImplementationGenerator.generate_type_implementation] Instance of 'ObjCProtocolTypesImplementationGenerator' has no 'get_generator_setting' member  [pylint/E1101] [5]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2016-03-07 10:41:20 PST
Comment on attachment 273187 [details]
For Landing

Clearing flags on attachment: 273187

Committed r197689: <http://trac.webkit.org/changeset/197689>
Comment 9 WebKit Commit Bot 2016-03-07 10:41:25 PST
All reviewed patches have been landed.  Closing bug.