|
Lines 3088-3094
sub ReturnNativeToJSValue
a/WebCore/bindings/scripts/CodeGeneratorV8.pm_sec1
|
| 3088 |
my $indent = shift; |
3088 |
my $indent = shift; |
| 3089 |
my $type = GetTypeFromSignature($signature); |
3089 |
my $type = GetTypeFromSignature($signature); |
| 3090 |
|
3090 |
|
| 3091 |
return "return v8::Date::New(static_cast<double>($value))" if $type eq "DOMTimeStamp"; |
|
|
| 3092 |
return "return v8Boolean($value)" if $type eq "boolean"; |
3091 |
return "return v8Boolean($value)" if $type eq "boolean"; |
| 3093 |
return "return v8::Handle<v8::Value>()" if $type eq "void"; # equivalent to v8::Undefined() |
3092 |
return "return v8::Handle<v8::Value>()" if $type eq "void"; # equivalent to v8::Undefined() |
| 3094 |
|
3093 |
|
|
Lines 3100-3106
sub ReturnNativeToJSValue
a/WebCore/bindings/scripts/CodeGeneratorV8.pm_sec2
|
| 3100 |
|
3099 |
|
| 3101 |
return "return v8DateOrNull($value)" if $type eq "Date"; |
3100 |
return "return v8DateOrNull($value)" if $type eq "Date"; |
| 3102 |
# long long and unsigned long long are not representable in ECMAScript. |
3101 |
# long long and unsigned long long are not representable in ECMAScript. |
| 3103 |
return "return v8::Number::New(static_cast<double>($value))" if $type eq "long long" or $type eq "unsigned long long"; |
3102 |
return "return v8::Number::New(static_cast<double>($value))" if $type eq "long long" or $type eq "unsigned long long" or $type eq "DOMTimeStamp"; |
| 3104 |
return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType"; |
3103 |
return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType"; |
| 3105 |
return "return $value.v8Value()" if $nativeType eq "ScriptValue"; |
3104 |
return "return $value.v8Value()" if $nativeType eq "ScriptValue"; |
| 3106 |
|
3105 |
|