Bug 149406 - Fix warnings in IDLParser.pm
Summary: Fix warnings in IDLParser.pm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-21 07:47 PDT by Csaba Osztrogonác
Modified: 2015-09-28 02:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.30 KB, patch)
2015-09-21 07:49 PDT, Csaba Osztrogonác
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-09-21 07:47:36 PDT
There are many warnings come from IDLParser.pm because of using uninitialized value in regexps:

Use of uninitialized value $type in pattern match (m//) at /home/ossy/WebKit/Source/WebCore/bindings/scripts/IDLParser.pm line 303.
Use of uninitialized value $type in substitution (s///) at /home/ossy/WebKit/Source/WebCore/bindings/scripts/IDLParser.pm line 309.
Comment 1 Csaba Osztrogonác 2015-09-21 07:49:35 PDT
Created attachment 261655 [details]
Patch
Comment 2 Alex Christensen 2015-09-21 16:22:22 PDT
Comment on attachment 261655 [details]
Patch

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

r=me with nit

> Source/WebCore/bindings/scripts/IDLParser.pm:311
> +   }

This needs another space of indentation.
Comment 3 Csaba Osztrogonác 2015-09-22 02:24:25 PDT
(In reply to comment #2)
> Comment on attachment 261655 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=261655&action=review
> 
> r=me with nit
> 
> > Source/WebCore/bindings/scripts/IDLParser.pm:311
> > +   }
> 
> This needs another space of indentation.

Good catch, I'll fix it before landing.
Comment 4 Csaba Osztrogonác 2015-09-22 02:32:34 PDT
Committed r190111: <http://trac.webkit.org/changeset/190111>
Comment 5 Chris Dumez 2015-09-22 18:55:24 PDT
Comment on attachment 261655 [details]
Patch

This looks like this may be papering over a real bug. How can an attribute or parameter not have a type?
Comment 6 Chris Dumez 2015-09-22 19:02:59 PDT
It looks like the parser has trouble parsing:
[Unscopeable, RaisesException, Custom] void prepend((Node or DOMString)... nodes);
[Unscopeable, RaisesException, Custom] void append((Node or DOMString)... nodes);
in ParentNode.idl

and

[Unscopeable, RaisesException, Custom] void before((Node or DOMString)... nodes);
[Unscopeable, RaisesException, Custom] void after((Node or DOMString)... nodes);
[Unscopeable, RaisesException, Custom] void replaceWith((Node or DOMString)... nodes);
in ChildNode.idl

Likely the issue is that our parser does not support unions or variadic arguments.

Thankfully, even though the parser does not parse them properly, it does not cause problems because we use Custom bindings for these.

The proper fix would be to add support for these type of parameters to our IDL parser.
Comment 7 Chris Dumez 2015-09-22 19:05:22 PDT
FYI, the problem is unions (Node or DOMString). Variadic parameters seem to be fine.
Comment 8 Csaba Osztrogonác 2015-09-28 02:51:56 PDT
(In reply to comment #7)
> FYI, the problem is unions (Node or DOMString). Variadic parameters seem to
> be fine.

Could you file a new bug report for this issue?