Summary: | [GTK] webkit_dom_range_compare_boundary_points fails when 0 is passed as how parameter | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tomas Popela <tpopela> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, cgarcia, commit-queue | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Tomas Popela
2014-02-21 01:57:16 PST
Created attachment 224845 [details]
Proposed patch
Comment on attachment 224845 [details] Proposed patch 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 :-) Created attachment 225638 [details]
Proposed patch v2
Comment on attachment 225638 [details]
Proposed patch v2
Thanks!
Comment on attachment 225638 [details] Proposed patch v2 Clearing flags on attachment: 225638 Committed r164980: <http://trac.webkit.org/changeset/164980> All reviewed patches have been landed. Closing bug. |