[Webkit-unassigned] [Bug 45143] V8/JS bindings should not perform type checks if the parameter has Callback attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 2 22:40:24 PDT 2010


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





--- Comment #4 from Kinuko Yasuda <kinuko at chromium.org>  2010-09-02 22:40:24 PST ---
(In reply to comment #2)
> (From update of attachment 66450 [details])
> > WebCore/bindings/scripts/CodeGeneratorJS.pm:1137
> > +        if ($codeGenerator->IsStringType($type)) {
> i think it might be cleaner to format this code as:
> 
> if (IsStringType($type)) {
>   ...
> } elsif ($parameter->extendedAttributes->{"Callback"}) {
>   ...
> } elsif (!IsNativeType($type)) {
>   ...
> }
> 
> same comment for CodeGeneratorV8.pm.

Fixed.

Wasn't very sure if we want to check that for native types... but maybe it would contribute to readability.

> > WebCore/bindings/scripts/test/V8/V8TestObj.cpp:-981
> > -    if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObj::HasInstance(args[0])) && (args[1]->IsNull() || args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject())))
> i believe you need to change JS/JSTestObj.cpp too.

Fixed.  (The update in the previous patch was an error actually - this time I added a new overloaded method with callback arg and updated both {V8,JS}TestObj.cpp.)

-- 
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