[webkit-reviews] review denied: [Bug 129145] [GTK] webkit_dom_range_compare_boundary_points fails when 0 is passed as how parameter : [Attachment 224845] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 21 02:30:34 PST 2014


Carlos Garcia Campos <cgarcia at igalia.com> has denied Tomas Popela
<tpopela at redhat.com>'s request for review:
Bug 129145: [GTK] webkit_dom_range_compare_boundary_points fails when 0 is
passed as how parameter
https://bugs.webkit.org/show_bug.cgi?id=129145

Attachment 224845: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=224845&action=review

------- Additional Comments from Carlos Garcia Campos <cgarcia at igalia.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=224845&action=review


Thanks for the patch. I think we should add a test case for this.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:897
> +	   if ($paramIDLType eq "CompareHow") {
> +	      return "";
> +	   }

This is not correct, this method should not be called for non pointer types. We
are currently checking whether the param type is primitve or not, but we should
actually check that is a pointer type.

my $paramTypeIsPrimitive = $codeGenerator->IsPrimitiveType($paramIDLType);
my $paramIsGDOMType = IsGDOMClassType($paramIDLType);
if (!$paramTypeIsPrimitive) {
    $gReturnMacro = GetGReturnMacro($paramName, $paramIDLType, $returnType,
$functionName);
    push(@cBody, $gReturnMacro);
}

We should use 

my $paramTypeIsPointer = !$codeGenerator->IsNonPointerType($paramIDLType);

You can also remove the paramIsGDOMType that is unused :-)


More information about the webkit-reviews mailing list