[webkit-reviews] review denied: [Bug 84232] Add PassThis=* to support the callbacks which requires to pass "this" value. : [Attachment 137669] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 18 04:52:46 PDT 2012


Kentaro Hara <haraken at chromium.org> has denied Vineet Chaudhary (vineetc)
<rgf748 at motorola.com>'s request for review:
Bug 84232: Add PassThis=* to support the callbacks which requires to pass
"this" value.
https://bugs.webkit.org/show_bug.cgi?id=84232

Attachment 137669: Patch
https://bugs.webkit.org/attachment.cgi?id=137669&action=review

------- Additional Comments from Kentaro Hara <haraken at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=137669&action=review


Almost looks good.

For GObject/CPP/ObjC, let's leave it as-is. If it caused a problem when we
actually use [PassThis] in some IDL file, let's add [PassThis] to the Skip()
methods in CodeGenerator{GObject,ObjC,CPP}.pm.

> Source/WebCore/ChangeLog:3
> +	   Add PassThis=* to support the callbacks which requires to pass
"this" value.

Maybe [PassThisToCallback] would be more descriptive. It's up to you though.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2693
>		   push(@args, GetNativeType($param->type) . " " .
$param->name);

Nit: You can use $paramName.

> Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp:154
> +    ASSERT(thisClassParam);
> +    if (!thisClassParam)

Writing both ASSERT() and if(!...) sounds strange. (I know you just copied the
existing code though.)

- If thisClassParam should be always true, just put ASSERT() and remove
if(!...).
- If thisClassParam can be false, just put if(!...) and put ASSERT().

> Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp:199
> +    ASSERT(thisClassParam);
> +    if (!thisClassParam)

Ditto.


More information about the webkit-reviews mailing list