|
Lines 3185-3195
sub GenerateFunctionCallString()
a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm_sec1
|
| 3185 |
$name = $function->signature->extendedAttributes->{"ImplementationFunction"}; |
3185 |
$name = $function->signature->extendedAttributes->{"ImplementationFunction"}; |
| 3186 |
} |
3186 |
} |
| 3187 |
|
3187 |
|
| 3188 |
my $functionString = "imp->${name}("; |
3188 |
my @arguments; |
| 3189 |
if ($function->isStatic) { |
|
|
| 3190 |
$functionString = "${implClassName}::${name}("; |
| 3191 |
} |
| 3192 |
|
| 3193 |
my $index = 0; |
3189 |
my $index = 0; |
| 3194 |
my $hasScriptState = 0; |
3190 |
my $hasScriptState = 0; |
| 3195 |
|
3191 |
|
|
Lines 3206-3213
sub GenerateFunctionCallString()
a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm_sec2
|
| 3206 |
$result .= $indent . " return v8::Undefined();\n"; |
3202 |
$result .= $indent . " return v8::Undefined();\n"; |
| 3207 |
$callWithArg = "scriptContext"; |
3203 |
$callWithArg = "scriptContext"; |
| 3208 |
} |
3204 |
} |
| 3209 |
$functionString .= ", " if $index; |
3205 |
push @arguments, $callWithArg; |
| 3210 |
$functionString .= $callWithArg; |
|
|
| 3211 |
$index++; |
3206 |
$index++; |
| 3212 |
$numberOfParameters++ |
3207 |
$numberOfParameters++ |
| 3213 |
} |
3208 |
} |
|
Lines 3216-3253
sub GenerateFunctionCallString()
a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm_sec3
|
| 3216 |
if ($index eq $numberOfParameters) { |
3211 |
if ($index eq $numberOfParameters) { |
| 3217 |
last; |
3212 |
last; |
| 3218 |
} |
3213 |
} |
| 3219 |
$functionString .= ", " if $index; |
|
|
| 3220 |
my $paramName = $parameter->name; |
3214 |
my $paramName = $parameter->name; |
| 3221 |
my $paramType = $parameter->type; |
3215 |
my $paramType = $parameter->type; |
| 3222 |
|
3216 |
|
| 3223 |
if ($parameter->type eq "NodeFilter" || $parameter->type eq "XPathNSResolver") { |
3217 |
if ($parameter->type eq "NodeFilter" || $parameter->type eq "XPathNSResolver") { |
| 3224 |
$functionString .= "$paramName.get()"; |
3218 |
push @arguments, "$paramName.get()"; |
| 3225 |
} elsif ($codeGenerator->IsSVGTypeNeedingTearOff($parameter->type) and not $implClassName =~ /List$/) { |
3219 |
} elsif ($codeGenerator->IsSVGTypeNeedingTearOff($parameter->type) and not $implClassName =~ /List$/) { |
| 3226 |
$functionString .= "$paramName->propertyReference()"; |
3220 |
push @arguments, "$paramName->propertyReference()"; |
| 3227 |
$result .= $indent . "if (!$paramName) {\n"; |
3221 |
$result .= $indent . "if (!$paramName) {\n"; |
| 3228 |
$result .= $indent . " V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR);\n"; |
3222 |
$result .= $indent . " V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR);\n"; |
| 3229 |
$result .= $indent . " return v8::Handle<v8::Value>();\n"; |
3223 |
$result .= $indent . " return v8::Handle<v8::Value>();\n"; |
| 3230 |
$result .= $indent . "}\n"; |
3224 |
$result .= $indent . "}\n"; |
| 3231 |
} elsif ($parameter->type eq "SVGMatrix" and $implClassName eq "SVGTransformList") { |
3225 |
} elsif ($parameter->type eq "SVGMatrix" and $implClassName eq "SVGTransformList") { |
| 3232 |
$functionString .= "$paramName.get()"; |
3226 |
push @arguments, "$paramName.get()"; |
| 3233 |
} else { |
3227 |
} else { |
| 3234 |
$functionString .= $paramName; |
3228 |
push @arguments, $paramName; |
| 3235 |
} |
3229 |
} |
| 3236 |
$index++; |
3230 |
$index++; |
| 3237 |
} |
3231 |
} |
| 3238 |
|
3232 |
|
| 3239 |
if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) { |
3233 |
if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) { |
| 3240 |
$functionString .= ", " if $index; |
3234 |
push @arguments, "scriptArguments, callStack"; |
| 3241 |
$functionString .= "scriptArguments, callStack"; |
|
|
| 3242 |
$index += 2; |
| 3243 |
} |
3235 |
} |
| 3244 |
|
3236 |
|
| 3245 |
if (@{$function->raisesExceptions}) { |
3237 |
if (@{$function->raisesExceptions}) { |
| 3246 |
$functionString .= ", " if $index; |
3238 |
push @arguments, "ec"; |
| 3247 |
$functionString .= "ec"; |
|
|
| 3248 |
$index++; |
| 3249 |
} |
3239 |
} |
| 3250 |
$functionString .= ")"; |
3240 |
|
|
|
3241 |
my $functionString = ($function->isStatic ? "${implClassName}::${name}(" : "imp->${name}(") . join(", ", @arguments) . ")"; |
| 3251 |
|
3242 |
|
| 3252 |
my $return = "result"; |
3243 |
my $return = "result"; |
| 3253 |
my $returnIsRef = IsRefPtrType($returnType); |
3244 |
my $returnIsRef = IsRefPtrType($returnType); |