[Webkit-unassigned] [Bug 78877] New: [GObject IDL Parser] passing string instead of HASH reference

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 16 21:55:38 PST 2012


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

           Summary: [GObject IDL Parser] passing string instead of HASH
                    reference
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: anthony at xtfx.me


i am admittedly not adept with perl, but i believe a mistake was made at one point to "correct" some warnings emitted during `generate-bindings.pl`, specifically `CodeGeneratorGObject.pm`.

emitted error:

Unquoted string "attributes" may clash with future reserved word at ../Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm line 1065.

------- previous (eg, WebKitGTK+ 1.6.3):

[...]
 1059   $function->signature->extendedAttributes($attribute->signature->extendedAttributes);
 1060 
 1061   my $param = new domSignature();
 1062   $param->name("value");
 1063   $param->type($attribute->signature->type);
 1064   my %attributes = ();
 1065   $param->extendedAttributes(attributes);
[...]

------- trunk:

[...]
 1090   $function->signature->extendedAttributes($attribute->signature->extendedAttributes);
 1091 
 1092   my $param = new domSignature();
 1093   $param->name("value");
 1094   $param->type($attribute->signature->type);
 1095   my %attributes = ();
 1096   $param->extendedAttributes("attributes");
[...]

-------

notice how quotes were added to "attributes"?  IIUC this is now passing `attributes` as a simple string instead of a HASHREF.  i included the first line (1059 and 1060, resp.) to show how it's used elsewhere ... if i add a simple:

print "ATTR: ", $attribute->signature->extendedAttributes;

------- i get:

[...]
ATTR: HASH(0xf74f78)
ATTR: HASH(0xf814e8)
ATTR: HASH(0xf81a88)
[...]

-------

... suggesting the unused my `%attributes = ();` is the intended type.  seems to still build/etc just fine -- no idea what it's affecting, if anything.

RESOLUTION:

pass "attributes" as \%attributes

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