[Webkit-unassigned] [Bug 43130] Add callback arguments support to binding code generator scripts
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 29 16:18:35 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43130
Dumitru Daniliuc <dumi at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #63004|review? |review+, commit-queue-
Flag| |
--- Comment #6 from Dumitru Daniliuc <dumi at chromium.org> 2010-07-29 16:18:35 PST ---
(From update of attachment 63004)
r=me, but please address the comments below before landing (sorry i forgot to mention them in the first review).
WebCore/bindings/scripts/CodeGeneratorJS.pm:1939
+ push(@implContent, " if (exec->argumentCount() > $argsIndex && !exec->argument($argsIndex).isNull()) {\n");
this code works only if the parameter is Optional. i think it should look more like this:
push(@implContent, " RefPtr<" . $parameter->type . "> $name;\n");
if ($parameter->extendedAttributes->{"Optional"}) {
// push the code that you have now
} else {
push(@implContent, " if ((exec->argumentCount() <= $argsIndex) || !exec->argument($argsIndex).isObject()) {\n");
push(@implContent, " setDOMException(exec, TYPE_MISMATCH_ERR);\n");
push(@implContent, " return jsUndefined();\n");
push(@implContent, " }\n");
push(@implContent, " $name = " . $callbackClassName . "::create(asObject(exec->argument($argsIndex)), castedThis->globalObject());\n");
}
WebCore/bindings/scripts/CodeGeneratorV8.pm:1191
+ push(@implContentDecls, " if (args.Length() > $paramIndex && !isUndefinedOrNull(args[$paramIndex])) {\n");
same thing.
--
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