[Webkit-unassigned] [Bug 26398] Make IDLParser.pm conform to the WebIDL spec

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 20 22:48:40 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=26398





--- Comment #59 from Takashi Sakamoto <tasak at google.com>  2012-09-20 22:49:06 PST ---
I'm sorry. I forgot to remove "// JS,V8" comment line. I uploaded a new patch for fixing the issue.

(In reply to comment #57)
> Thanks for all the clarification.
> 
> > >> Source/WebCore/bindings/scripts/test/TestObj.idl:232
> > >> +        void convert5(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] e value);
> > > 
> > > 'a', 'b', 'd', 'e' are not valid type names. Shall we change them to DOMString or something?
> > 
> > I think, 'a', 'b', 'd', 'e' are for checking the case where some user-defined class is specified. WebIDL allows users to use any identifier as NonAnyType.
> 
> OK. Then let's change them to 'UserDefinedType' or something like that. You can do it in a follow-up patch.
> 
> 
> > >> Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp:168
> > >> +    return v8Integer(imp->longAttr(), info.GetIsolate());
> > > 
> > > I know that this code is conformed to the spec. But isn't there any compatibility concern to change a double to an integer?
> > 
> > This double is a bug of old IDLParser.pm. TestObj.idl has "attribute long longAttr;". The old IDLParser.pm cannot parse the line correctly. So the parser generates the code for "long long" + "Attr". But the correct result should be "long" + "longAttr".
> > 
> > >> Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp:454
> > >> +    imp->setAttrWithGetterException(v);
> > > 
> > > Where does this change come from? Is it correct?
> > 
> > The code is generated from "attribute long attrWithGetterException getter raises(DOMException);". So 2 methods are generated, one is attrWithGetterExceptionAttrGetter and the other is attrWithGetterExceptionAttrSetter.
> > Since only "getter raises" is specified, "setter" should not raise any exception. Does this make sense?
> 
> Makes sense.
> 
> I'd like to confirm one thing: There are changes in the generated code for bindings/scripts/tests/*.idl, but there is no meaningful change in the generated code for real idl files for JSC/V8/ObjC/GObject/CPP, right?

Yes. 
The problem is caused by a pair of "long"(return type or attribute type) and "longXXX"(method or attribute name). 
So I checked real idl files by using the following:
   find . -name \*.idl -exec grep -H -G "long long[A-Za-z_]" {} \;

I saw only TestObj.idl.



> 
> If it is right, I'm happy to r+ the patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list