| 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 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3347 $conditional4 = "if (${contextEnabledFunction}(impl->document()))\n
"; | 3347 $conditional4 = "if (${contextEnabledFunction}(impl->document()))\n
"; |
| 3348 } | 3348 } |
| 3349 $conditional8 = $conditional4 . " " if $conditional4 ne ""; | 3349 $conditional8 = $conditional4 . " " if $conditional4 ne ""; |
| 3350 | 3350 |
| 3351 if ($interface->extendedAttributes->{"CheckSecurity"} && $attrExt->{"DoNotCh
eckSecurity"}) { | 3351 if ($interface->extendedAttributes->{"CheckSecurity"} && $attrExt->{"DoNotCh
eckSecurity"}) { |
| 3352 my $setter = $attrExt->{"ReadOnly"} ? "0" : "${implClassName}V8Internal:
:${implClassName}OriginSafeMethodSetterCallback"; | 3352 my $setter = $attrExt->{"ReadOnly"} ? "0" : "${implClassName}V8Internal:
:${implClassName}OriginSafeMethodSetterCallback"; |
| 3353 # Functions that are marked DoNotCheckSecurity are always readable but i
f they are changed | 3353 # Functions that are marked DoNotCheckSecurity are always readable but i
f they are changed |
| 3354 # and then accessed on a different domain we do not return the underlyin
g value but instead | 3354 # and then accessed on a different domain we do not return the underlyin
g value but instead |
| 3355 # return a new copy of the original function. This is achieved by storin
g the changed value | 3355 # return a new copy of the original function. This is achieved by storin
g the changed value |
| 3356 # as hidden property. | 3356 # as hidden property. |
| 3357 $code .= <<END; | |
| 3358 | |
| 3359 // $commentInfo | |
| 3360 END | |
| 3361 if ($function->extendedAttributes->{"PerWorldBindings"}) { | 3357 if ($function->extendedAttributes->{"PerWorldBindings"}) { |
| 3362 $code .= <<END; | 3358 $code .= <<END; |
| 3363 if (currentWorldType == MainWorld) { | 3359 if (currentWorldType == MainWorld) { |
| 3364 ${conditional8}$template->SetAccessor(v8::String::NewSymbol("$name"), ${
implClassName}V8Internal::${name}OriginSafeMethodGetterCallbackForMainWorld, ${s
etter}, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($pro
perty_attributes)); | 3360 ${conditional8}$template->SetAccessor(v8::String::NewSymbol("$name"), ${
implClassName}V8Internal::${name}OriginSafeMethodGetterCallbackForMainWorld, ${s
etter}, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($pro
perty_attributes)); |
| 3365 } else { | 3361 } else { |
| 3366 ${conditional8}$template->SetAccessor(v8::String::NewSymbol("$name"), ${
implClassName}V8Internal::${name}OriginSafeMethodGetterCallback, ${setter}, v8Un
defined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($property_attrib
utes)); | 3362 ${conditional8}$template->SetAccessor(v8::String::NewSymbol("$name"), ${
implClassName}V8Internal::${name}OriginSafeMethodGetterCallback, ${setter}, v8Un
defined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($property_attrib
utes)); |
| 3367 } | 3363 } |
| 3368 END | 3364 END |
| 3369 } else { | 3365 } else { |
| 3370 $code .= " ${conditional4}$template->SetAccessor(v8::String::NewS
ymbol(\"$name\"), ${implClassName}V8Internal::${name}OriginSafeMethodGetterCallb
ack, ${setter}, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribu
te>($property_attributes));\n"; | 3366 $code .= " ${conditional4}$template->SetAccessor(v8::String::NewS
ymbol(\"$name\"), ${implClassName}V8Internal::${name}OriginSafeMethodGetterCallb
ack, ${setter}, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribu
te>($property_attributes));\n"; |
| (...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6344 my $interface = shift; | 6340 my $interface = shift; |
| 6345 | 6341 |
| 6346 return 1 if $interface->extendedAttributes->{"CustomToV8"}; | 6342 return 1 if $interface->extendedAttributes->{"CustomToV8"}; |
| 6347 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; | 6343 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; |
| 6348 return 1 if InheritsInterface($interface, "Document"); | 6344 return 1 if InheritsInterface($interface, "Document"); |
| 6349 | 6345 |
| 6350 return 0; | 6346 return 0; |
| 6351 } | 6347 } |
| 6352 | 6348 |
| 6353 1; | 6349 1; |
| OLD | NEW |