| 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 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 | 1271 |
| 1272 v8SetReturnValue(info, privateTemplate->GetFunction()); | 1272 v8SetReturnValue(info, privateTemplate->GetFunction()); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 END | 1275 END |
| 1276 $implementation{nameSpaceInternal}->add(<<END); | 1276 $implementation{nameSpaceInternal}->add(<<END); |
| 1277 static void ${funcName}OriginSafeMethodGetterCallback${forMainWorldSuffix}(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1277 static void ${funcName}OriginSafeMethodGetterCallback${forMainWorldSuffix}(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1278 { | 1278 { |
| 1279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1280 ${implClassName}V8Internal::${funcName}OriginSafeMethodGetter${forMainWorldS
uffix}(info); | 1280 ${implClassName}V8Internal::${funcName}OriginSafeMethodGetter${forMainWorldS
uffix}(info); |
| 1281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 END | 1284 END |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 sub GenerateDomainSafeFunctionSetter | 1287 sub GenerateDomainSafeFunctionSetter |
| 1288 { | 1288 { |
| 1289 my $interface = shift; | 1289 my $interface = shift; |
| 1290 | 1290 |
| 1291 my $interfaceName = $interface->name(); | 1291 my $interfaceName = $interface->name(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1307 return; | 1307 return; |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 info.This()->SetHiddenValue(name, jsValue); | 1310 info.This()->SetHiddenValue(name, jsValue); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 static void ${implClassName}OriginSafeMethodSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1313 static void ${implClassName}OriginSafeMethodSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 1314 { | 1314 { |
| 1315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1316 ${implClassName}V8Internal::${implClassName}OriginSafeMethodSetter(name, jsV
alue, info); | 1316 ${implClassName}V8Internal::${implClassName}OriginSafeMethodSetter(name, jsV
alue, info); |
| 1317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 END | 1320 END |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 sub GenerateConstructorGetter | 1323 sub GenerateConstructorGetter |
| 1324 { | 1324 { |
| 1325 my $interface = shift; | 1325 my $interface = shift; |
| 1326 my $implClassName = GetImplName($interface); | 1326 my $implClassName = GetImplName($interface); |
| 1327 | 1327 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 $code .= GenerateFeatureObservation($attrExt->{"MeasureAs"}); | 1427 $code .= GenerateFeatureObservation($attrExt->{"MeasureAs"}); |
| 1428 $code .= GenerateDeprecationNotification($attrExt->{"DeprecateAs"}); | 1428 $code .= GenerateDeprecationNotification($attrExt->{"DeprecateAs"}); |
| 1429 if (HasActivityLogging($forMainWorldSuffix, $attrExt, "Getter")) { | 1429 if (HasActivityLogging($forMainWorldSuffix, $attrExt, "Getter")) { |
| 1430 $code .= GenerateActivityLogging("Getter", $interface, "${attrName}"); | 1430 $code .= GenerateActivityLogging("Getter", $interface, "${attrName}"); |
| 1431 } | 1431 } |
| 1432 if (HasCustomGetter($attrExt)) { | 1432 if (HasCustomGetter($attrExt)) { |
| 1433 $code .= " ${v8ClassName}::${attrName}AttributeGetterCustom(info);\n"
; | 1433 $code .= " ${v8ClassName}::${attrName}AttributeGetterCustom(info);\n"
; |
| 1434 } else { | 1434 } else { |
| 1435 $code .= " ${implClassName}V8Internal::${attrName}AttributeGetter${fo
rMainWorldSuffix}(info);\n"; | 1435 $code .= " ${implClassName}V8Internal::${attrName}AttributeGetter${fo
rMainWorldSuffix}(info);\n"; |
| 1436 } | 1436 } |
| 1437 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 1437 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 1438 $code .= "}\n"; | 1438 $code .= "}\n"; |
| 1439 $code .= "#endif // ${conditionalString}\n" if $conditionalString; | 1439 $code .= "#endif // ${conditionalString}\n" if $conditionalString; |
| 1440 $code .= "\n"; | 1440 $code .= "\n"; |
| 1441 | 1441 |
| 1442 $implementation{nameSpaceInternal}->add($code); | 1442 $implementation{nameSpaceInternal}->add($code); |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 sub GetCachedAttribute | 1445 sub GetCachedAttribute |
| 1446 { | 1446 { |
| 1447 my $attribute = shift; | 1447 my $attribute = shift; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 $code .= GenerateDeprecationNotification($attrExt->{"DeprecateAs"}); | 1890 $code .= GenerateDeprecationNotification($attrExt->{"DeprecateAs"}); |
| 1891 if (HasActivityLogging($forMainWorldSuffix, $attrExt, "Setter")) { | 1891 if (HasActivityLogging($forMainWorldSuffix, $attrExt, "Setter")) { |
| 1892 $code .= GenerateActivityLogging("Setter", $interface, "${attrName}"); | 1892 $code .= GenerateActivityLogging("Setter", $interface, "${attrName}"); |
| 1893 } | 1893 } |
| 1894 $code .= GenerateCustomElementInvocationScopeIfNeeded($attrExt); | 1894 $code .= GenerateCustomElementInvocationScopeIfNeeded($attrExt); |
| 1895 if (HasCustomSetter($attribute)) { | 1895 if (HasCustomSetter($attribute)) { |
| 1896 $code .= " ${v8ClassName}::${attrName}AttributeSetterCustom(jsValue,
info);\n"; | 1896 $code .= " ${v8ClassName}::${attrName}AttributeSetterCustom(jsValue,
info);\n"; |
| 1897 } else { | 1897 } else { |
| 1898 $code .= " ${implClassName}V8Internal::${attrName}AttributeSetter${fo
rMainWorldSuffix}(jsValue, info);\n"; | 1898 $code .= " ${implClassName}V8Internal::${attrName}AttributeSetter${fo
rMainWorldSuffix}(jsValue, info);\n"; |
| 1899 } | 1899 } |
| 1900 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 1900 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 1901 $code .= "}\n"; | 1901 $code .= "}\n"; |
| 1902 $code .= "#endif // ${conditionalString}\n" if $conditionalString; | 1902 $code .= "#endif // ${conditionalString}\n" if $conditionalString; |
| 1903 $code .= "\n"; | 1903 $code .= "\n"; |
| 1904 $implementation{nameSpaceInternal}->add($code); | 1904 $implementation{nameSpaceInternal}->add($code); |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 sub FindAttributeWithName | 1907 sub FindAttributeWithName |
| 1908 { | 1908 { |
| 1909 my $interface = shift; | 1909 my $interface = shift; |
| 1910 my $attrName = shift; | 1910 my $attrName = shift; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2340 $code .= GenerateFeatureObservation($function->extendedAttributes->{"Measure
As"}); | 2340 $code .= GenerateFeatureObservation($function->extendedAttributes->{"Measure
As"}); |
| 2341 $code .= GenerateDeprecationNotification($function->extendedAttributes->{"De
precateAs"}); | 2341 $code .= GenerateDeprecationNotification($function->extendedAttributes->{"De
precateAs"}); |
| 2342 if (HasActivityLogging($forMainWorldSuffix, $function->extendedAttributes, "
Access")) { | 2342 if (HasActivityLogging($forMainWorldSuffix, $function->extendedAttributes, "
Access")) { |
| 2343 $code .= GenerateActivityLogging("Method", $interface, "${name}"); | 2343 $code .= GenerateActivityLogging("Method", $interface, "${name}"); |
| 2344 } | 2344 } |
| 2345 if (HasCustomMethod($function->extendedAttributes)) { | 2345 if (HasCustomMethod($function->extendedAttributes)) { |
| 2346 $code .= " ${v8ClassName}::${name}MethodCustom(info);\n"; | 2346 $code .= " ${v8ClassName}::${name}MethodCustom(info);\n"; |
| 2347 } else { | 2347 } else { |
| 2348 $code .= " ${implClassName}V8Internal::${name}Method${forMainWorldSuf
fix}(info);\n"; | 2348 $code .= " ${implClassName}V8Internal::${name}Method${forMainWorldSuf
fix}(info);\n"; |
| 2349 } | 2349 } |
| 2350 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 2350 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 2351 $code .= "}\n"; | 2351 $code .= "}\n"; |
| 2352 $code .= "#endif // ${conditionalString}\n" if $conditionalString; | 2352 $code .= "#endif // ${conditionalString}\n" if $conditionalString; |
| 2353 $code .= "\n"; | 2353 $code .= "\n"; |
| 2354 $implementation{nameSpaceInternal}->add($code); | 2354 $implementation{nameSpaceInternal}->add($code); |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 sub GenerateFunction | 2357 sub GenerateFunction |
| 2358 { | 2358 { |
| 2359 my $function = shift; | 2359 my $function = shift; |
| 2360 my $interface = shift; | 2360 my $interface = shift; |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3667 my $v8ClassName = GetV8ClassName($interface); | 3667 my $v8ClassName = GetV8ClassName($interface); |
| 3668 | 3668 |
| 3669 my $code = "static void indexedPropertyGetterCallback(uint32_t index, const
v8::PropertyCallbackInfo<v8::Value>& info)\n"; | 3669 my $code = "static void indexedPropertyGetterCallback(uint32_t index, const
v8::PropertyCallbackInfo<v8::Value>& info)\n"; |
| 3670 $code .= "{\n"; | 3670 $code .= "{\n"; |
| 3671 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; | 3671 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; |
| 3672 if ($hasCustom) { | 3672 if ($hasCustom) { |
| 3673 $code .= " ${v8ClassName}::indexedPropertyGetterCustom(index, info);\
n"; | 3673 $code .= " ${v8ClassName}::indexedPropertyGetterCustom(index, info);\
n"; |
| 3674 } else { | 3674 } else { |
| 3675 $code .= " ${implClassName}V8Internal::indexedPropertyGetter(index, i
nfo);\n"; | 3675 $code .= " ${implClassName}V8Internal::indexedPropertyGetter(index, i
nfo);\n"; |
| 3676 } | 3676 } |
| 3677 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3677 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3678 $code .= "}\n\n"; | 3678 $code .= "}\n\n"; |
| 3679 $implementation{nameSpaceInternal}->add($code); | 3679 $implementation{nameSpaceInternal}->add($code); |
| 3680 } | 3680 } |
| 3681 | 3681 |
| 3682 sub GenerateImplementationIndexedPropertySetterCallback | 3682 sub GenerateImplementationIndexedPropertySetterCallback |
| 3683 { | 3683 { |
| 3684 my $interface = shift; | 3684 my $interface = shift; |
| 3685 my $hasCustom = shift; | 3685 my $hasCustom = shift; |
| 3686 my $implClassName = GetImplName($interface); | 3686 my $implClassName = GetImplName($interface); |
| 3687 my $v8ClassName = GetV8ClassName($interface); | 3687 my $v8ClassName = GetV8ClassName($interface); |
| 3688 | 3688 |
| 3689 my $code = "static void indexedPropertySetterCallback(uint32_t index, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; | 3689 my $code = "static void indexedPropertySetterCallback(uint32_t index, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; |
| 3690 $code .= "{\n"; | 3690 $code .= "{\n"; |
| 3691 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; | 3691 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; |
| 3692 if ($hasCustom) { | 3692 if ($hasCustom) { |
| 3693 $code .= " ${v8ClassName}::indexedPropertySetterCustom(index, jsValue
, info);\n"; | 3693 $code .= " ${v8ClassName}::indexedPropertySetterCustom(index, jsValue
, info);\n"; |
| 3694 } else { | 3694 } else { |
| 3695 $code .= " ${implClassName}V8Internal::indexedPropertySetter(index, j
sValue, info);\n"; | 3695 $code .= " ${implClassName}V8Internal::indexedPropertySetter(index, j
sValue, info);\n"; |
| 3696 } | 3696 } |
| 3697 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3697 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3698 $code .= "}\n\n"; | 3698 $code .= "}\n\n"; |
| 3699 $implementation{nameSpaceInternal}->add($code); | 3699 $implementation{nameSpaceInternal}->add($code); |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 sub GenerateImplementationIndexedPropertyDeleterCallback | 3702 sub GenerateImplementationIndexedPropertyDeleterCallback |
| 3703 { | 3703 { |
| 3704 my $interface = shift; | 3704 my $interface = shift; |
| 3705 my $hasCustom = shift; | 3705 my $hasCustom = shift; |
| 3706 my $implClassName = GetImplName($interface); | 3706 my $implClassName = GetImplName($interface); |
| 3707 my $v8ClassName = GetV8ClassName($interface); | 3707 my $v8ClassName = GetV8ClassName($interface); |
| 3708 | 3708 |
| 3709 my $code = "static void indexedPropertyDeleterCallback(uint32_t index, const
v8::PropertyCallbackInfo<v8::Boolean>& info)\n"; | 3709 my $code = "static void indexedPropertyDeleterCallback(uint32_t index, const
v8::PropertyCallbackInfo<v8::Boolean>& info)\n"; |
| 3710 $code .= "{\n"; | 3710 $code .= "{\n"; |
| 3711 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; | 3711 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMIndexedProperty
\");\n"; |
| 3712 if ($hasCustom) { | 3712 if ($hasCustom) { |
| 3713 $code .= " ${v8ClassName}::indexedPropertyDeleterCustom(index, info);
\n"; | 3713 $code .= " ${v8ClassName}::indexedPropertyDeleterCustom(index, info);
\n"; |
| 3714 } else { | 3714 } else { |
| 3715 $code .= " ${implClassName}V8Internal::indexedPropertyDeleter(index,
info);\n"; | 3715 $code .= " ${implClassName}V8Internal::indexedPropertyDeleter(index,
info);\n"; |
| 3716 } | 3716 } |
| 3717 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3717 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3718 $code .= "}\n\n"; | 3718 $code .= "}\n\n"; |
| 3719 $implementation{nameSpaceInternal}->add($code); | 3719 $implementation{nameSpaceInternal}->add($code); |
| 3720 } | 3720 } |
| 3721 | 3721 |
| 3722 sub GenerateImplementationIndexedPropertySetter | 3722 sub GenerateImplementationIndexedPropertySetter |
| 3723 { | 3723 { |
| 3724 my $interface = shift; | 3724 my $interface = shift; |
| 3725 my $indexedSetterFunction = shift; | 3725 my $indexedSetterFunction = shift; |
| 3726 my $implClassName = GetImplName($interface); | 3726 my $implClassName = GetImplName($interface); |
| 3727 my $v8ClassName = GetV8ClassName($interface); | 3727 my $v8ClassName = GetV8ClassName($interface); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3851 my $v8ClassName = GetV8ClassName($interface); | 3851 my $v8ClassName = GetV8ClassName($interface); |
| 3852 | 3852 |
| 3853 my $code = "static void namedPropertyGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; | 3853 my $code = "static void namedPropertyGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info)\n"; |
| 3854 $code .= "{\n"; | 3854 $code .= "{\n"; |
| 3855 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; | 3855 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; |
| 3856 if ($hasCustom) { | 3856 if ($hasCustom) { |
| 3857 $code .= " ${v8ClassName}::namedPropertyGetterCustom(name, info);\n"; | 3857 $code .= " ${v8ClassName}::namedPropertyGetterCustom(name, info);\n"; |
| 3858 } else { | 3858 } else { |
| 3859 $code .= " ${implClassName}V8Internal::namedPropertyGetter(name, info
);\n"; | 3859 $code .= " ${implClassName}V8Internal::namedPropertyGetter(name, info
);\n"; |
| 3860 } | 3860 } |
| 3861 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3861 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3862 $code .= "}\n\n"; | 3862 $code .= "}\n\n"; |
| 3863 $implementation{nameSpaceInternal}->add($code); | 3863 $implementation{nameSpaceInternal}->add($code); |
| 3864 } | 3864 } |
| 3865 | 3865 |
| 3866 sub GenerateImplementationNamedPropertySetterCallback | 3866 sub GenerateImplementationNamedPropertySetterCallback |
| 3867 { | 3867 { |
| 3868 my $interface = shift; | 3868 my $interface = shift; |
| 3869 my $hasCustom = shift; | 3869 my $hasCustom = shift; |
| 3870 my $implClassName = GetImplName($interface); | 3870 my $implClassName = GetImplName($interface); |
| 3871 my $v8ClassName = GetV8ClassName($interface); | 3871 my $v8ClassName = GetV8ClassName($interface); |
| 3872 | 3872 |
| 3873 my $code = "static void namedPropertySetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& inf
o)\n"; | 3873 my $code = "static void namedPropertySetterCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& inf
o)\n"; |
| 3874 $code .= "{\n"; | 3874 $code .= "{\n"; |
| 3875 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; | 3875 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; |
| 3876 if ($hasCustom) { | 3876 if ($hasCustom) { |
| 3877 $code .= " ${v8ClassName}::namedPropertySetterCustom(name, jsValue, i
nfo);\n"; | 3877 $code .= " ${v8ClassName}::namedPropertySetterCustom(name, jsValue, i
nfo);\n"; |
| 3878 } else { | 3878 } else { |
| 3879 $code .= " ${implClassName}V8Internal::namedPropertySetter(name, jsVa
lue, info);\n"; | 3879 $code .= " ${implClassName}V8Internal::namedPropertySetter(name, jsVa
lue, info);\n"; |
| 3880 } | 3880 } |
| 3881 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3881 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3882 $code .= "}\n\n"; | 3882 $code .= "}\n\n"; |
| 3883 $implementation{nameSpaceInternal}->add($code); | 3883 $implementation{nameSpaceInternal}->add($code); |
| 3884 } | 3884 } |
| 3885 | 3885 |
| 3886 sub GenerateImplementationNamedPropertyDeleterCallback | 3886 sub GenerateImplementationNamedPropertyDeleterCallback |
| 3887 { | 3887 { |
| 3888 my $interface = shift; | 3888 my $interface = shift; |
| 3889 my $hasCustom = shift; | 3889 my $hasCustom = shift; |
| 3890 my $implClassName = GetImplName($interface); | 3890 my $implClassName = GetImplName($interface); |
| 3891 my $v8ClassName = GetV8ClassName($interface); | 3891 my $v8ClassName = GetV8ClassName($interface); |
| 3892 | 3892 |
| 3893 my $code = "static void namedPropertyDeleterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Boolean>& info)\n"; | 3893 my $code = "static void namedPropertyDeleterCallback(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Boolean>& info)\n"; |
| 3894 $code .= "{\n"; | 3894 $code .= "{\n"; |
| 3895 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; | 3895 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; |
| 3896 if ($hasCustom) { | 3896 if ($hasCustom) { |
| 3897 $code .= " ${v8ClassName}::namedPropertyDeleterCustom(name, info);\n"
; | 3897 $code .= " ${v8ClassName}::namedPropertyDeleterCustom(name, info);\n"
; |
| 3898 } else { | 3898 } else { |
| 3899 $code .= " ${implClassName}V8Internal::namedPropertyDeleter(name, inf
o);\n"; | 3899 $code .= " ${implClassName}V8Internal::namedPropertyDeleter(name, inf
o);\n"; |
| 3900 } | 3900 } |
| 3901 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3901 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3902 $code .= "}\n\n"; | 3902 $code .= "}\n\n"; |
| 3903 $implementation{nameSpaceInternal}->add($code); | 3903 $implementation{nameSpaceInternal}->add($code); |
| 3904 } | 3904 } |
| 3905 | 3905 |
| 3906 sub GenerateImplementationNamedPropertyEnumeratorCallback | 3906 sub GenerateImplementationNamedPropertyEnumeratorCallback |
| 3907 { | 3907 { |
| 3908 my $interface = shift; | 3908 my $interface = shift; |
| 3909 my $hasCustom = shift; | 3909 my $hasCustom = shift; |
| 3910 my $implClassName = GetImplName($interface); | 3910 my $implClassName = GetImplName($interface); |
| 3911 my $v8ClassName = GetV8ClassName($interface); | 3911 my $v8ClassName = GetV8ClassName($interface); |
| 3912 | 3912 |
| 3913 my $code = "static void namedPropertyEnumeratorCallback(const v8::PropertyCa
llbackInfo<v8::Array>& info)\n"; | 3913 my $code = "static void namedPropertyEnumeratorCallback(const v8::PropertyCa
llbackInfo<v8::Array>& info)\n"; |
| 3914 $code .= "{\n"; | 3914 $code .= "{\n"; |
| 3915 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; | 3915 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; |
| 3916 if ($hasCustom) { | 3916 if ($hasCustom) { |
| 3917 $code .= " ${v8ClassName}::namedPropertyEnumeratorCustom(info);\n"; | 3917 $code .= " ${v8ClassName}::namedPropertyEnumeratorCustom(info);\n"; |
| 3918 } else { | 3918 } else { |
| 3919 $code .= " ${implClassName}V8Internal::namedPropertyEnumerator(info);
\n"; | 3919 $code .= " ${implClassName}V8Internal::namedPropertyEnumerator(info);
\n"; |
| 3920 } | 3920 } |
| 3921 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3921 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3922 $code .= "}\n\n"; | 3922 $code .= "}\n\n"; |
| 3923 $implementation{nameSpaceInternal}->add($code); | 3923 $implementation{nameSpaceInternal}->add($code); |
| 3924 } | 3924 } |
| 3925 | 3925 |
| 3926 sub GenerateImplementationNamedPropertyQueryCallback | 3926 sub GenerateImplementationNamedPropertyQueryCallback |
| 3927 { | 3927 { |
| 3928 my $interface = shift; | 3928 my $interface = shift; |
| 3929 my $hasCustom = shift; | 3929 my $hasCustom = shift; |
| 3930 my $implClassName = GetImplName($interface); | 3930 my $implClassName = GetImplName($interface); |
| 3931 my $v8ClassName = GetV8ClassName($interface); | 3931 my $v8ClassName = GetV8ClassName($interface); |
| 3932 | 3932 |
| 3933 my $code = "static void namedPropertyQueryCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Integer>& info)\n"; | 3933 my $code = "static void namedPropertyQueryCallback(v8::Local<v8::String> nam
e, const v8::PropertyCallbackInfo<v8::Integer>& info)\n"; |
| 3934 $code .= "{\n"; | 3934 $code .= "{\n"; |
| 3935 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; | 3935 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMNamedProperty\"
);\n"; |
| 3936 if ($hasCustom) { | 3936 if ($hasCustom) { |
| 3937 $code .= " ${v8ClassName}::namedPropertyQueryCustom(name, info);\n"; | 3937 $code .= " ${v8ClassName}::namedPropertyQueryCustom(name, info);\n"; |
| 3938 } else { | 3938 } else { |
| 3939 $code .= " ${implClassName}V8Internal::namedPropertyQuery(name, info)
;\n"; | 3939 $code .= " ${implClassName}V8Internal::namedPropertyQuery(name, info)
;\n"; |
| 3940 } | 3940 } |
| 3941 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"Execution\");\n"; | 3941 $code .= " TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n"; |
| 3942 $code .= "}\n\n"; | 3942 $code .= "}\n\n"; |
| 3943 $implementation{nameSpaceInternal}->add($code); | 3943 $implementation{nameSpaceInternal}->add($code); |
| 3944 } | 3944 } |
| 3945 | 3945 |
| 3946 sub GenerateMethodCall | 3946 sub GenerateMethodCall |
| 3947 { | 3947 { |
| 3948 my $returnType = shift; # string or UnionType | 3948 my $returnType = shift; # string or UnionType |
| 3949 my $returnName = shift; | 3949 my $returnName = shift; |
| 3950 my $functionExpression = shift; | 3950 my $functionExpression = shift; |
| 3951 my $firstArgument = shift; | 3951 my $firstArgument = shift; |
| (...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6391 if ($parameter->type eq "SerializedScriptValue") { | 6391 if ($parameter->type eq "SerializedScriptValue") { |
| 6392 return 1; | 6392 return 1; |
| 6393 } elsif (IsIntegerType($parameter->type)) { | 6393 } elsif (IsIntegerType($parameter->type)) { |
| 6394 return 1; | 6394 return 1; |
| 6395 } | 6395 } |
| 6396 } | 6396 } |
| 6397 return 0; | 6397 return 0; |
| 6398 } | 6398 } |
| 6399 | 6399 |
| 6400 1; | 6400 1; |
| OLD | NEW |