OLD | NEW |
---|---|
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1901 } | 1901 } |
1902 } | 1902 } |
1903 | 1903 |
1904 my $nativeType = GetNativeType($attribute->type, $attribute->extendedAttribu tes, "parameter"); | 1904 my $nativeType = GetNativeType($attribute->type, $attribute->extendedAttribu tes, "parameter"); |
1905 if ($attribute->type eq "EventHandler") { | 1905 if ($attribute->type eq "EventHandler") { |
1906 if ($interface->name eq "Window") { | 1906 if ($interface->name eq "Window") { |
1907 $code .= " if (!imp->document())\n"; | 1907 $code .= " if (!imp->document())\n"; |
1908 $code .= " return;\n"; | 1908 $code .= " return;\n"; |
1909 } | 1909 } |
1910 } else { | 1910 } else { |
1911 $code .= JSValueToNativeStatement($attribute->type, $attribute->extended Attributes, "jsValue", "cppValue", " ", "info.GetIsolate()"); | 1911 $code .= JSValueToNativeStatement($attribute->type, $attribute->extended Attributes, 0, "jsValue", "cppValue", " ", "info.GetIsolate()"); |
Mike West
2013/10/24 07:08:54
Is this argument 0-based, or 1-based? It looks lik
sof
2013/10/24 21:16:41
This is in the context of a setter; made less magi
| |
1912 } | 1912 } |
1913 | 1913 |
1914 if (IsEnumType($attrType)) { | 1914 if (IsEnumType($attrType)) { |
1915 # setter ignores invalid enumeration values | 1915 # setter ignores invalid enumeration values |
1916 my @enumValues = ValidEnumValues($attrType); | 1916 my @enumValues = ValidEnumValues($attrType); |
1917 my @validEqualities = (); | 1917 my @validEqualities = (); |
1918 foreach my $enumValue (@enumValues) { | 1918 foreach my $enumValue (@enumValues) { |
1919 push(@validEqualities, "string == \"$enumValue\""); | 1919 push(@validEqualities, "string == \"$enumValue\""); |
1920 } | 1920 } |
1921 my $enumValidationExpression = join(" || ", @validEqualities); | 1921 my $enumValidationExpression = join(" || ", @validEqualities); |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2496 } | 2496 } |
2497 } elsif ($nativeType =~ /^V8StringResource/) { | 2497 } elsif ($nativeType =~ /^V8StringResource/) { |
2498 my $default = defined $parameter->extendedAttributes->{"Default"} ? $parameter->extendedAttributes->{"Default"} : ""; | 2498 my $default = defined $parameter->extendedAttributes->{"Default"} ? $parameter->extendedAttributes->{"Default"} : ""; |
2499 my $jsValue = $parameter->isOptional && $default eq "NullString" ? " argumentOrNull(args, $paramIndex)" : "args[$paramIndex]"; | 2499 my $jsValue = $parameter->isOptional && $default eq "NullString" ? " argumentOrNull(args, $paramIndex)" : "args[$paramIndex]"; |
2500 my $stringResourceParameterName = $parameterName; | 2500 my $stringResourceParameterName = $parameterName; |
2501 my $isNullable = $parameter->isNullable && !IsRefPtrType($parameter- >type); | 2501 my $isNullable = $parameter->isNullable && !IsRefPtrType($parameter- >type); |
2502 if ($isNullable) { | 2502 if ($isNullable) { |
2503 $parameterCheckString .= " bool ${parameterName}IsNull = $jsV alue->IsNull();\n"; | 2503 $parameterCheckString .= " bool ${parameterName}IsNull = $jsV alue->IsNull();\n"; |
2504 $stringResourceParameterName .= "StringResource"; | 2504 $stringResourceParameterName .= "StringResource"; |
2505 } | 2505 } |
2506 $parameterCheckString .= JSValueToNativeStatement($parameter->type, $parameter->extendedAttributes, $jsValue, $stringResourceParameterName, " ", "args.GetIsolate()"); | 2506 $parameterCheckString .= JSValueToNativeStatement($parameter->type, $parameter->extendedAttributes, $humanFriendlyIndex, $jsValue, $stringResourcePa rameterName, " ", "args.GetIsolate()"); |
2507 $parameterCheckString .= " String $parameterName = $stringResourc eParameterName;\n" if $isNullable; | 2507 $parameterCheckString .= " String $parameterName = $stringResourc eParameterName;\n" if $isNullable; |
2508 if (IsEnumType($parameter->type)) { | 2508 if (IsEnumType($parameter->type)) { |
2509 my @enumValues = ValidEnumValues($parameter->type); | 2509 my @enumValues = ValidEnumValues($parameter->type); |
2510 my @validEqualities = (); | 2510 my @validEqualities = (); |
2511 foreach my $enumValue (@enumValues) { | 2511 foreach my $enumValue (@enumValues) { |
2512 push(@validEqualities, "string == \"$enumValue\""); | 2512 push(@validEqualities, "string == \"$enumValue\""); |
2513 } | 2513 } |
2514 my $enumValidationExpression = join(" || ", @validEqualities); | 2514 my $enumValidationExpression = join(" || ", @validEqualities); |
2515 $parameterCheckString .= " String string = $parameterName;\n "; | 2515 $parameterCheckString .= " String string = $parameterName;\n "; |
2516 $parameterCheckString .= " if (!($enumValidationExpression)) {\n"; | 2516 $parameterCheckString .= " if (!($enumValidationExpression)) {\n"; |
(...skipping 15 matching lines...) Expand all Loading... | |
2532 $parameterCheckString .= " if (args.Length() > $paramInde x && !isUndefinedOrNull($argValue) && !V8${argType}::HasInstance($argValue, args .GetIsolate(), worldType(args.GetIsolate()))) {\n"; | 2532 $parameterCheckString .= " if (args.Length() > $paramInde x && !isUndefinedOrNull($argValue) && !V8${argType}::HasInstance($argValue, args .GetIsolate(), worldType(args.GetIsolate()))) {\n"; |
2533 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToExecute(\"$functionName\", \"$interfaceName\", \"parameter $huma nFriendlyIndex is not of type \'$argType\'.\"), args.GetIsolate());\n"; | 2533 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToExecute(\"$functionName\", \"$interfaceName\", \"parameter $huma nFriendlyIndex is not of type \'$argType\'.\"), args.GetIsolate());\n"; |
2534 $parameterCheckString .= " return;\n"; | 2534 $parameterCheckString .= " return;\n"; |
2535 $parameterCheckString .= " }\n"; | 2535 $parameterCheckString .= " }\n"; |
2536 } | 2536 } |
2537 } | 2537 } |
2538 my $default = defined $parameter->extendedAttributes->{"Default"} ? $parameter->extendedAttributes->{"Default"} : ""; | 2538 my $default = defined $parameter->extendedAttributes->{"Default"} ? $parameter->extendedAttributes->{"Default"} : ""; |
2539 my $jsValue = $parameter->isOptional && $default eq "NullString" ? " argumentOrNull(args, $paramIndex)" : "args[$paramIndex]"; | 2539 my $jsValue = $parameter->isOptional && $default eq "NullString" ? " argumentOrNull(args, $paramIndex)" : "args[$paramIndex]"; |
2540 my $isNullable = $parameter->isNullable && !IsRefPtrType($parameter- >type); | 2540 my $isNullable = $parameter->isNullable && !IsRefPtrType($parameter- >type); |
2541 $parameterCheckString .= " bool ${parameterName}IsNull = $jsValue ->IsNull();\n" if $isNullable; | 2541 $parameterCheckString .= " bool ${parameterName}IsNull = $jsValue ->IsNull();\n" if $isNullable; |
2542 $parameterCheckString .= JSValueToNativeStatement($parameter->type, $parameter->extendedAttributes, $jsValue, $parameterName, " ", "args.GetIsola te()"); | 2542 $parameterCheckString .= JSValueToNativeStatement($parameter->type, $parameter->extendedAttributes, $humanFriendlyIndex, $jsValue, $parameterName, " ", "args.GetIsolate()"); |
2543 if ($nativeType eq 'Dictionary' or $nativeType eq 'ScriptPromise') { | 2543 if ($nativeType eq 'Dictionary' or $nativeType eq 'ScriptPromise') { |
2544 $parameterCheckString .= " if (!$parameterName.isUndefinedOrN ull() && !$parameterName.isObject()) {\n"; | 2544 $parameterCheckString .= " if (!$parameterName.isUndefinedOrN ull() && !$parameterName.isObject()) {\n"; |
2545 if ($functionName eq "Constructor") { | 2545 if ($functionName eq "Constructor") { |
2546 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToConstruct(\"$interfaceName\", \"parameter ${humanFriendlyIndex} ('${parameterName}') is not an object.\"), args.GetIsolate());\n"; | 2546 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToConstruct(\"$interfaceName\", \"parameter ${humanFriendlyIndex} ('${parameterName}') is not an object.\"), args.GetIsolate());\n"; |
2547 } else { | 2547 } else { |
2548 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToExecute(\"$functionName\", \"$interfaceName\", \"parameter ${hum anFriendlyIndex} ('${parameterName}') is not an object.\"), args.GetIsolate());\ n"; | 2548 $parameterCheckString .= " throwTypeError(ExceptionMe ssages::failedToExecute(\"$functionName\", \"$interfaceName\", \"parameter ${hum anFriendlyIndex} ('${parameterName}') is not an object.\"), args.GetIsolate());\ n"; |
2549 } | 2549 } |
2550 $parameterCheckString .= " return;\n"; | 2550 $parameterCheckString .= " return;\n"; |
2551 $parameterCheckString .= " }\n"; | 2551 $parameterCheckString .= " }\n"; |
2552 } | 2552 } |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3495 my $v8ClassName = GetV8ClassName($interface); | 3495 my $v8ClassName = GetV8ClassName($interface); |
3496 my $methodName = GetImplName($indexedSetterFunction); | 3496 my $methodName = GetImplName($indexedSetterFunction); |
3497 | 3497 |
3498 my $type = $indexedSetterFunction->parameters->[1]->type; | 3498 my $type = $indexedSetterFunction->parameters->[1]->type; |
3499 my $raisesExceptions = $indexedSetterFunction->extendedAttributes->{"RaisesE xception"}; | 3499 my $raisesExceptions = $indexedSetterFunction->extendedAttributes->{"RaisesE xception"}; |
3500 my $treatNullAs = $indexedSetterFunction->parameters->[1]->extendedAttribute s->{"TreatNullAs"}; | 3500 my $treatNullAs = $indexedSetterFunction->parameters->[1]->extendedAttribute s->{"TreatNullAs"}; |
3501 my $treatUndefinedAs = $indexedSetterFunction->parameters->[1]->extendedAttr ibutes->{"TreatUndefinedAs"}; | 3501 my $treatUndefinedAs = $indexedSetterFunction->parameters->[1]->extendedAttr ibutes->{"TreatUndefinedAs"}; |
3502 my $code = "static void indexedPropertySetter(uint32_t index, v8::Local<v8:: Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; | 3502 my $code = "static void indexedPropertySetter(uint32_t index, v8::Local<v8:: Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; |
3503 $code .= "{\n"; | 3503 $code .= "{\n"; |
3504 $code .= " ${implClassName}* collection = ${v8ClassName}::toNative(info.H older());\n"; | 3504 $code .= " ${implClassName}* collection = ${v8ClassName}::toNative(info.H older());\n"; |
3505 $code .= JSValueToNativeStatement($indexedSetterFunction->parameters->[1]->t ype, $indexedSetterFunction->extendedAttributes, "jsValue", "propertyValue", " ", "info.GetIsolate()"); | 3505 $code .= JSValueToNativeStatement($indexedSetterFunction->parameters->[1]->t ype, $indexedSetterFunction->extendedAttributes, 0, "jsValue", "propertyValue", " ", "info.GetIsolate()"); |
3506 | 3506 |
3507 my $extraArguments = ""; | 3507 my $extraArguments = ""; |
3508 if ($raisesExceptions) { | 3508 if ($raisesExceptions) { |
3509 $code .= " ExceptionState es(info.GetIsolate());\n"; | 3509 $code .= " ExceptionState es(info.GetIsolate());\n"; |
3510 $extraArguments = ", es"; | 3510 $extraArguments = ", es"; |
3511 } | 3511 } |
3512 my @conditions = (); | 3512 my @conditions = (); |
3513 my @statements = (); | 3513 my @statements = (); |
3514 if ($treatNullAs && $treatNullAs ne "NullString") { | 3514 if ($treatNullAs && $treatNullAs ne "NullString") { |
3515 push @conditions, "jsValue->IsNull()"; | 3515 push @conditions, "jsValue->IsNull()"; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3806 $code .= "{\n"; | 3806 $code .= "{\n"; |
3807 if (!$namedSetterFunction->extendedAttributes->{"OverrideBuiltins"}) { | 3807 if (!$namedSetterFunction->extendedAttributes->{"OverrideBuiltins"}) { |
3808 $code .= " if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(n ame).IsEmpty())\n"; | 3808 $code .= " if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(n ame).IsEmpty())\n"; |
3809 $code .= " return;\n"; | 3809 $code .= " return;\n"; |
3810 $code .= " if (info.Holder()->HasRealNamedCallbackProperty(name))\n"; | 3810 $code .= " if (info.Holder()->HasRealNamedCallbackProperty(name))\n"; |
3811 $code .= " return;\n"; | 3811 $code .= " return;\n"; |
3812 $code .= " if (info.Holder()->HasRealNamedProperty(name))\n"; | 3812 $code .= " if (info.Holder()->HasRealNamedProperty(name))\n"; |
3813 $code .= " return;\n"; | 3813 $code .= " return;\n"; |
3814 } | 3814 } |
3815 $code .= " ${implClassName}* collection = ${v8ClassName}::toNative(info.H older());\n"; | 3815 $code .= " ${implClassName}* collection = ${v8ClassName}::toNative(info.H older());\n"; |
3816 $code .= JSValueToNativeStatement($namedSetterFunction->parameters->[0]->typ e, $namedSetterFunction->extendedAttributes, "name", "propertyName", " ", "in fo.GetIsolate()"); | 3816 $code .= JSValueToNativeStatement($namedSetterFunction->parameters->[0]->typ e, $namedSetterFunction->extendedAttributes, 0, "name", "propertyName", " ", "info.GetIsolate()"); |
3817 $code .= JSValueToNativeStatement($namedSetterFunction->parameters->[1]->typ e, $namedSetterFunction->extendedAttributes, "jsValue", "propertyValue", " ", "info.GetIsolate()"); | 3817 $code .= JSValueToNativeStatement($namedSetterFunction->parameters->[1]->typ e, $namedSetterFunction->extendedAttributes, 0, "jsValue", "propertyValue", " ", "info.GetIsolate()"); |
3818 my $extraArguments = ""; | 3818 my $extraArguments = ""; |
3819 if ($raisesExceptions) { | 3819 if ($raisesExceptions) { |
3820 $code .= " ExceptionState es(info.GetIsolate());\n"; | 3820 $code .= " ExceptionState es(info.GetIsolate());\n"; |
3821 $extraArguments = ", es"; | 3821 $extraArguments = ", es"; |
3822 } | 3822 } |
3823 | 3823 |
3824 my @conditions = (); | 3824 my @conditions = (); |
3825 my @statements = (); | 3825 my @statements = (); |
3826 if ($treatNullAs && $treatNullAs ne "NullString") { | 3826 if ($treatNullAs && $treatNullAs ne "NullString") { |
3827 push @conditions, "jsValue->IsNull()"; | 3827 push @conditions, "jsValue->IsNull()"; |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5239 # Callbacks use raw pointers, so pass isParameter = 1 | 5239 # Callbacks use raw pointers, so pass isParameter = 1 |
5240 my $nativeType = GetNativeType($type, {}, "parameter"); | 5240 my $nativeType = GetNativeType($type, {}, "parameter"); |
5241 return "const $nativeType&" if $nativeType =~ /^Vector/; | 5241 return "const $nativeType&" if $nativeType =~ /^Vector/; |
5242 return $nativeType; | 5242 return $nativeType; |
5243 } | 5243 } |
5244 | 5244 |
5245 sub JSValueToNativeStatement | 5245 sub JSValueToNativeStatement |
5246 { | 5246 { |
5247 my $type = shift; | 5247 my $type = shift; |
5248 my $extendedAttributes = shift; | 5248 my $extendedAttributes = shift; |
5249 my $argIndex = shift; | |
5249 my $jsValue = shift; | 5250 my $jsValue = shift; |
5250 my $variableName = shift; | 5251 my $variableName = shift; |
5251 my $indent = shift; | 5252 my $indent = shift; |
5252 my $getIsolate = shift; | 5253 my $getIsolate = shift; |
5253 | 5254 |
5254 my $nativeType = GetNativeType($type, $extendedAttributes, "parameter"); | 5255 my $nativeType = GetNativeType($type, $extendedAttributes, "parameter"); |
5255 my $native_value = JSValueToNative($type, $extendedAttributes, $jsValue, $ge tIsolate); | 5256 my $native_value = JSValueToNative($type, $extendedAttributes, $argIndex, $j sValue, $getIsolate); |
5256 my $code = ""; | 5257 my $code = ""; |
5257 if ($type eq "DOMString" || IsEnumType($type)) { | 5258 if ($type eq "DOMString" || IsEnumType($type)) { |
5258 die "Wrong native type passed: $nativeType" unless $nativeType =~ /^V8St ringResource/; | 5259 die "Wrong native type passed: $nativeType" unless $nativeType =~ /^V8St ringResource/; |
5259 if ($type eq "DOMString" or IsEnumType($type)) { | 5260 if ($type eq "DOMString" or IsEnumType($type)) { |
5260 $code .= $indent . "V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID($nativeType , $variableName, $native_value);\n" | 5261 $code .= $indent . "V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID($nativeType , $variableName, $native_value);\n" |
5261 } else { | 5262 } else { |
5262 $code .= $indent . "$nativeType $variableName($native_value, true);\ n"; | 5263 $code .= $indent . "$nativeType $variableName($native_value, true);\ n"; |
5263 } | 5264 } |
5264 } elsif ($extendedAttributes->{"EnforceRange"}) { | 5265 } elsif ($extendedAttributes->{"EnforceRange"}) { |
5265 $code .= $indent . "V8TRYCATCH_WITH_TYPECHECK_VOID($nativeType, $variabl eName, $native_value, $getIsolate);\n"; | 5266 $code .= $indent . "V8TRYCATCH_WITH_TYPECHECK_VOID($nativeType, $variabl eName, $native_value, $getIsolate);\n"; |
5266 } else { | 5267 } else { |
5267 $code .= $indent . "V8TRYCATCH_VOID($nativeType, $variableName, $native_ value);\n"; | 5268 $code .= $indent . "V8TRYCATCH_VOID($nativeType, $variableName, $native_ value);\n"; |
5268 } | 5269 } |
5269 return $code; | 5270 return $code; |
5270 } | 5271 } |
5271 | 5272 |
5272 | 5273 |
5273 sub JSValueToNative | 5274 sub JSValueToNative |
5274 { | 5275 { |
5275 my $type = shift; | 5276 my $type = shift; |
5276 my $extendedAttributes = shift; | 5277 my $extendedAttributes = shift; |
5278 my $argIndex = shift; | |
5277 my $value = shift; | 5279 my $value = shift; |
5278 my $getIsolate = shift; | 5280 my $getIsolate = shift; |
5279 | 5281 |
5280 my $intConversion = $extendedAttributes->{"EnforceRange"} ? "EnforceRange" : "NormalConversion"; | 5282 my $intConversion = $extendedAttributes->{"EnforceRange"} ? "EnforceRange" : "NormalConversion"; |
5281 | 5283 |
5282 return "$value->BooleanValue()" if $type eq "boolean"; | 5284 return "$value->BooleanValue()" if $type eq "boolean"; |
5283 return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $t ype eq "double"; | 5285 return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $t ype eq "double"; |
5284 | 5286 |
5285 if ($intConversion ne "NormalConversion") { | 5287 if ($intConversion ne "NormalConversion") { |
5286 return "toInt8($value, $intConversion, ok)" if $type eq "byte"; | 5288 return "toInt8($value, $intConversion, ok)" if $type eq "byte"; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5345 | 5347 |
5346 if ($type eq "XPathNSResolver") { | 5348 if ($type eq "XPathNSResolver") { |
5347 return "toXPathNSResolver($value, $getIsolate)"; | 5349 return "toXPathNSResolver($value, $getIsolate)"; |
5348 } | 5350 } |
5349 | 5351 |
5350 my $arrayOrSequenceType = GetArrayOrSequenceType($type); | 5352 my $arrayOrSequenceType = GetArrayOrSequenceType($type); |
5351 | 5353 |
5352 if ($arrayOrSequenceType) { | 5354 if ($arrayOrSequenceType) { |
5353 if (IsRefPtrType($arrayOrSequenceType)) { | 5355 if (IsRefPtrType($arrayOrSequenceType)) { |
5354 AddToImplIncludes("V8${arrayOrSequenceType}.h"); | 5356 AddToImplIncludes("V8${arrayOrSequenceType}.h"); |
5355 return "(toRefPtrNativeArray<${arrayOrSequenceType}, V8${arrayOrSequ enceType}>($value, $getIsolate))"; | 5357 return "(toRefPtrNativeArray<${arrayOrSequenceType}, V8${arrayOrSequ enceType}>($value, $argIndex, $getIsolate))"; |
5356 } | 5358 } |
5357 return "toNativeArray<" . GetNativeType($arrayOrSequenceType) . ">($valu e, $getIsolate)"; | 5359 return "toNativeArray<" . GetNativeType($arrayOrSequenceType) . ">($valu e, $argIndex, $getIsolate)"; |
5358 } | 5360 } |
5359 | 5361 |
5360 AddIncludesForType($type); | 5362 AddIncludesForType($type); |
5361 | 5363 |
5362 AddToImplIncludes("V8${type}.h"); | 5364 AddToImplIncludes("V8${type}.h"); |
5363 return "V8${type}::HasInstance($value, $getIsolate, worldType($getIsolate)) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0"; | 5365 return "V8${type}::HasInstance($value, $getIsolate, worldType($getIsolate)) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0"; |
5364 } | 5366 } |
5365 | 5367 |
5366 sub CreateCustomSignature | 5368 sub CreateCustomSignature |
5367 { | 5369 { |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6196 my $interface = shift; | 6198 my $interface = shift; |
6197 | 6199 |
6198 return 1 if $interface->extendedAttributes->{"CustomToV8"}; | 6200 return 1 if $interface->extendedAttributes->{"CustomToV8"}; |
6199 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; | 6201 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; |
6200 return 1 if InheritsInterface($interface, "Document"); | 6202 return 1 if InheritsInterface($interface, "Document"); |
6201 | 6203 |
6202 return 0; | 6204 return 0; |
6203 } | 6205 } |
6204 | 6206 |
6205 1; | 6207 1; |
OLD | NEW |