RESOLVED FIXED 157559
preprocess-idls.pl not ignoring comments during processing
https://bugs.webkit.org/show_bug.cgi?id=157559
Summary preprocess-idls.pl not ignoring comments during processing
Rawinder Singh
Reported 2016-05-10 21:47:52 PDT
Created attachment 278580 [details] TestPreprocessIssue.idl During processing of an IDL file with comments in the IDL interface attribute section, I encountered the problem that Source/WebCore/bindings/scripts/preprocess-idls.pl was not ignoring the comments in the attribute section. According to the Web IDL specification, http://www.w3.org/TR/WebIDL/#idl-grammar, comments should be ignored during processing. This patch addresses the issue described above. Steps to reproduce the problem: 1. List test file TestPreprocessIssue.idl in idl_files.tmp: > [ > NoInterfaceObject > // This is a comment >] interface TestPreprocessIssue >}; This test file specifies that the TestPreprocessIssue interface has the 'NoInterfaceObject' attribute. 2. Run preprocess-idls.pl: > perl -I WebCore/bindings/scripts/ WebCore/bindings/scripts/preprocess-idls.pl --defines "" --idlFilesList ./idl_files.tmp --supplementalDependencyFile ./SupplementalDependencies.txt --windowConstructorsFile ./DOMWindowConstructors.idl --workerGlobalScopeConstructorsFile ./WorkerGlobalScopeConstructors.idl --dedicatedWorkerGlobalScopeConstructorsFile ./DedicatedWorkerGlobalScopeConstructors.idl --supplementalMakefileDeps SupplementalDependencies.dep 3. The script produces the following DOMWindowConstructors.idl (that is, a constructor is incorrectly created for interface with 'NoInterfaceObject' attribute): > partial interface DOMWindow { > attribute TestPreprocessIssueConstructor TestPreprocessIssue; > }; * The correct output is: > partial interface DOMWindow { > }; This is caused by preprocess-idls.pl getInterfaceExtendedAttributesFromIDL reading in the key as: 'NoInterfaceObject // This is a comment' and therefore not picking up the 'NoInterfaceObject' interface attribute.
Attachments
TestPreprocessIssue.idl (1.58 KB, application/octet-stream)
2016-05-10 21:47 PDT, Rawinder Singh
no flags
Patch (1.69 KB, patch)
2016-05-10 21:55 PDT, Rawinder Singh
no flags
Patch (1.63 KB, patch)
2016-05-11 00:03 PDT, Rawinder Singh
no flags
Rawinder Singh
Comment 1 2016-05-10 21:55:56 PDT
Rawinder Singh
Comment 2 2016-05-11 00:03:23 PDT
WebKit Commit Bot
Comment 3 2016-05-11 09:23:41 PDT
Comment on attachment 278599 [details] Patch Clearing flags on attachment: 278599 Committed r200689: <http://trac.webkit.org/changeset/200689>
WebKit Commit Bot
Comment 4 2016-05-11 09:23:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.