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 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 my $useExceptions = 1 if $attribute->extendedAttributes->{"SetterRaisesExcep
tion"} || $attribute->extendedAttributes->{"RaisesException"}; | 1845 my $useExceptions = 1 if $attribute->extendedAttributes->{"SetterRaisesExcep
tion"} || $attribute->extendedAttributes->{"RaisesException"}; |
1846 | 1846 |
1847 if ($useExceptions) { | 1847 if ($useExceptions) { |
1848 AddToImplIncludes("bindings/v8/ExceptionState.h"); | 1848 AddToImplIncludes("bindings/v8/ExceptionState.h"); |
1849 $code .= " ExceptionState es(info.GetIsolate());\n"; | 1849 $code .= " ExceptionState es(info.GetIsolate());\n"; |
1850 } | 1850 } |
1851 | 1851 |
1852 if ($attribute->type eq "EventHandler") { | 1852 if ($attribute->type eq "EventHandler") { |
1853 my $implSetterFunctionName = FirstLetterToUpperCase($attrName); | 1853 my $implSetterFunctionName = FirstLetterToUpperCase($attrName); |
1854 AddToImplIncludes("bindings/v8/V8AbstractEventListener.h"); | 1854 AddToImplIncludes("bindings/v8/V8AbstractEventListener.h"); |
| 1855 # Non callable input should be treated as null |
| 1856 $code .= " if (!value->IsNull() && !value->IsFunction())\n"; |
| 1857 $code .= " value = v8::Null(info.GetIsolate());\n"; |
1855 if (!InheritsInterface($interface, "Node")) { | 1858 if (!InheritsInterface($interface, "Node")) { |
1856 my $attrImplName = GetImplName($attribute); | 1859 my $attrImplName = GetImplName($attribute); |
1857 $code .= " transferHiddenDependency(info.Holder(), imp->${attrImp
lName}(isolatedWorldForIsolate(info.GetIsolate())), value, ${v8ClassName}::event
ListenerCacheIndex, info.GetIsolate());\n"; | 1860 $code .= " transferHiddenDependency(info.Holder(), imp->${attrImp
lName}(isolatedWorldForIsolate(info.GetIsolate())), value, ${v8ClassName}::event
ListenerCacheIndex, info.GetIsolate());\n"; |
1858 } | 1861 } |
1859 AddToImplIncludes("bindings/v8/V8EventListenerList.h"); | 1862 AddToImplIncludes("bindings/v8/V8EventListenerList.h"); |
1860 if (($interfaceName eq "Window" or $interfaceName eq "WorkerGlobalScope"
) and $attribute->name eq "onerror") { | 1863 if (($interfaceName eq "Window" or $interfaceName eq "WorkerGlobalScope"
) and $attribute->name eq "onerror") { |
1861 AddToImplIncludes("bindings/v8/V8ErrorHandler.h"); | 1864 AddToImplIncludes("bindings/v8/V8ErrorHandler.h"); |
1862 $code .= " imp->set$implSetterFunctionName(V8EventListenerList::f
indOrCreateWrapper<V8ErrorHandler>(value, true), isolatedWorldForIsolate(info.Ge
tIsolate()));\n"; | 1865 $code .= " imp->set$implSetterFunctionName(V8EventListenerList::f
indOrCreateWrapper<V8ErrorHandler>(value, true), isolatedWorldForIsolate(info.Ge
tIsolate()));\n"; |
1863 } else { | 1866 } else { |
1864 $code .= " imp->set$implSetterFunctionName(V8EventListenerList::g
etEventListener(value, true, ListenerFindOrCreate), isolatedWorldForIsolate(info
.GetIsolate()));\n"; | 1867 $code .= " imp->set$implSetterFunctionName(V8EventListenerList::g
etEventListener(value, true, ListenerFindOrCreate), isolatedWorldForIsolate(info
.GetIsolate()));\n"; |
(...skipping 4151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6016 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6019 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
6017 $found = 1; | 6020 $found = 1; |
6018 } | 6021 } |
6019 return 1 if $found; | 6022 return 1 if $found; |
6020 }, 0); | 6023 }, 0); |
6021 | 6024 |
6022 return $found; | 6025 return $found; |
6023 } | 6026 } |
6024 | 6027 |
6025 1; | 6028 1; |
OLD | NEW |