Chromium Code Reviews| Index: Source/bindings/scripts/CodeGeneratorV8.pm |
| diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
| index d711c309313ead57d573d39e3353f803137e3f7a..34f43f4ac94b5882d79063c97fcc0ec90b831e2e 100644 |
| --- a/Source/bindings/scripts/CodeGeneratorV8.pm |
| +++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
| @@ -3351,9 +3351,6 @@ sub GenerateImplementationIndexedPropertySetter |
| $code .= " ExceptionCode ec = 0;\n"; |
| $extraArguments = ", ec"; |
| } |
| - my $passNativeValue = "propertyValue"; |
| - $passNativeValue .= ".release()" if (IsRefPtrType($type)); |
|
haraken
2013/07/04 08:22:38
Why can you remove this?
kojih
2013/07/04 08:30:42
Since this patch changes propertyValue type from R
|
| - |
| my @conditions = (); |
| my @statements = (); |
| if ($treatNullAs && $treatNullAs ne "NullString") { |
| @@ -3365,7 +3362,7 @@ sub GenerateImplementationIndexedPropertySetter |
| push @statements, "collection->${treatUndefinedAs}(index$extraArguments);"; |
| } |
| push @conditions, ""; |
| - push @statements, "collection->${methodName}(index, $passNativeValue$extraArguments);"; |
| + push @statements, "collection->${methodName}(index, propertyValue$extraArguments);"; |
| $code .= GenerateIfElseStatement("bool", "result", \@conditions, \@statements); |
| $code .= " if (!result)\n"; |
| @@ -3650,7 +3647,7 @@ sub GenerateNativeValueDefinition |
| my $treatNullAs = $parameter->extendedAttributes->{"TreatNullAs"} || ""; |
| my $treatUndefinedAs = $parameter->extendedAttributes->{"TreatUndefinedAs"} || ""; |
| my $code = ""; |
| - my $nativeType = GetNativeType($parameter->type); |
| + my $nativeType = GetNativeType($parameter->type, 1); |
|
haraken
2013/07/04 08:22:38
I hope this could be "parameter" instead of myster
kojih
2013/07/04 08:30:42
OK, in python generator, this will be named parame
|
| my $nativeValue = JSValueToNative($parameter->type, $function->extendedAttributes, $jsValue, $getIsolate); |
| if ($parameter->type eq "DOMString") { |
| my $nullCheck = ""; |
| @@ -3662,7 +3659,7 @@ sub GenerateNativeValueDefinition |
| } |
| $code .= " V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<${nullCheck}>, ${nativeValueName}, ${jsValue});\n"; |
| } else { |
| - $code .= " ${nativeType} ${nativeValueName} = ${nativeValue};\n"; |
| + $code .= " V8TRYCATCH_VOID(${nativeType}, ${nativeValueName}, ${nativeValue});\n"; |
|
haraken
2013/07/04 08:22:38
Looks correct but this might affect performance du
kojih
2013/07/04 08:30:42
OK.
|
| } |
| return $code; |
| } |