| 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 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 # FIXME: Pass the main world ID for main-world-only getters. | 1775 # FIXME: Pass the main world ID for main-world-only getters. |
| 1776 my ($functionName, @arguments) = GetterExpression($interfaceName, $attri
bute); | 1776 my ($functionName, @arguments) = GetterExpression($interfaceName, $attri
bute); |
| 1777 my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"}; | 1777 my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"}; |
| 1778 if ($implementedBy) { | 1778 if ($implementedBy) { |
| 1779 my $implementedByImplName = GetImplNameFromImplementedBy($implemente
dBy); | 1779 my $implementedByImplName = GetImplNameFromImplementedBy($implemente
dBy); |
| 1780 $functionName = "${implementedByImplName}::${functionName}"; | 1780 $functionName = "${implementedByImplName}::${functionName}"; |
| 1781 push(@arguments, "imp"); | 1781 push(@arguments, "imp"); |
| 1782 } else { | 1782 } else { |
| 1783 $functionName = "imp->${functionName}"; | 1783 $functionName = "imp->${functionName}"; |
| 1784 } | 1784 } |
| 1785 push(@arguments, "isolatedWorldForIsolate(info.GetIsolate())"); | |
| 1786 $code .= " EventListener* jsValue = ${functionName}(" . join(", ", @a
rguments) . ");\n"; | 1785 $code .= " EventListener* jsValue = ${functionName}(" . join(", ", @a
rguments) . ");\n"; |
| 1787 $code .= " v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8A
bstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext()))
: v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));\n"; | 1786 $code .= " v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8A
bstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext()))
: v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));\n"; |
| 1788 } else { | 1787 } else { |
| 1789 my $nativeValue = NativeToJSValue($attribute->type, $attribute->extended
Attributes, $expression, " ", "", "info.GetIsolate()", "info", "imp", $forMai
nWorldSuffix, "return"); | 1788 my $nativeValue = NativeToJSValue($attribute->type, $attribute->extended
Attributes, $expression, " ", "", "info.GetIsolate()", "info", "imp", $forMai
nWorldSuffix, "return"); |
| 1790 $code .= "${nativeValue}\n"; | 1789 $code .= "${nativeValue}\n"; |
| 1791 } | 1790 } |
| 1792 | 1791 |
| 1793 $code .= "}\n"; # end of getter | 1792 $code .= "}\n"; # end of getter |
| 1794 $code .= "#endif // ${conditionalString}\n" if $conditionalString; | 1793 $code .= "#endif // ${conditionalString}\n" if $conditionalString; |
| 1795 $code .= "\n"; | 1794 $code .= "\n"; |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2127 } | 2126 } |
| 2128 if (!InheritsInterface($interface, "Node")) { | 2127 if (!InheritsInterface($interface, "Node")) { |
| 2129 my $attrImplName = GetImplName($attribute); | 2128 my $attrImplName = GetImplName($attribute); |
| 2130 my @arguments; | 2129 my @arguments; |
| 2131 if ($implementedBy) { | 2130 if ($implementedBy) { |
| 2132 $attrImplName = "${implementedByImplName}::${attrImplName}"; | 2131 $attrImplName = "${implementedByImplName}::${attrImplName}"; |
| 2133 push(@arguments, "imp"); | 2132 push(@arguments, "imp"); |
| 2134 } else { | 2133 } else { |
| 2135 $attrImplName = "imp->${attrImplName}"; | 2134 $attrImplName = "imp->${attrImplName}"; |
| 2136 } | 2135 } |
| 2137 push(@arguments, "isolatedWorldForIsolate(info.GetIsolate())"); | |
| 2138 $code .= " moveEventListenerToNewWrapper(info.Holder(), ${attrImp
lName}(" . join(", ", @arguments) . "), jsValue, ${v8ClassName}::eventListenerCa
cheIndex, info.GetIsolate());\n"; | 2136 $code .= " moveEventListenerToNewWrapper(info.Holder(), ${attrImp
lName}(" . join(", ", @arguments) . "), jsValue, ${v8ClassName}::eventListenerCa
cheIndex, info.GetIsolate());\n"; |
| 2139 } | 2137 } |
| 2140 my ($functionName, @arguments) = SetterExpression($interfaceName, $attri
bute); | 2138 my ($functionName, @arguments) = SetterExpression($interfaceName, $attri
bute); |
| 2141 if ($implementedBy) { | 2139 if ($implementedBy) { |
| 2142 $functionName = "${implementedByImplName}::${functionName}"; | 2140 $functionName = "${implementedByImplName}::${functionName}"; |
| 2143 push(@arguments, "imp"); | 2141 push(@arguments, "imp"); |
| 2144 } else { | 2142 } else { |
| 2145 $functionName = "imp->${functionName}"; | 2143 $functionName = "imp->${functionName}"; |
| 2146 } | 2144 } |
| 2147 if (($interfaceName eq "Window" or $interfaceName eq "WorkerGlobalScope"
) and $attribute->name eq "onerror") { | 2145 if (($interfaceName eq "Window" or $interfaceName eq "WorkerGlobalScope"
) and $attribute->name eq "onerror") { |
| 2148 AddToImplIncludes("bindings/v8/V8ErrorHandler.h"); | 2146 AddToImplIncludes("bindings/v8/V8ErrorHandler.h"); |
| 2149 push(@arguments, "V8EventListenerList::findOrCreateWrapper<V8ErrorHa
ndler>(jsValue, true, info.GetIsolate())"); | 2147 push(@arguments, "V8EventListenerList::findOrCreateWrapper<V8ErrorHa
ndler>(jsValue, true, info.GetIsolate())"); |
| 2150 } else { | 2148 } else { |
| 2151 push(@arguments, "V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)"); | 2149 push(@arguments, "V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)"); |
| 2152 } | 2150 } |
| 2153 push(@arguments, "isolatedWorldForIsolate(info.GetIsolate())"); | |
| 2154 $code .= " ${functionName}(" . join(", ", @arguments) . ");\n"; | 2151 $code .= " ${functionName}(" . join(", ", @arguments) . ");\n"; |
| 2155 } else { | 2152 } else { |
| 2156 my ($functionName, @arguments) = SetterExpression($interfaceName, $attri
bute); | 2153 my ($functionName, @arguments) = SetterExpression($interfaceName, $attri
bute); |
| 2157 push(@arguments, $expression); | 2154 push(@arguments, $expression); |
| 2158 push(@arguments, "exceptionState") if $useExceptions; | 2155 push(@arguments, "exceptionState") if $useExceptions; |
| 2159 if ($attribute->extendedAttributes->{"ImplementedBy"}) { | 2156 if ($attribute->extendedAttributes->{"ImplementedBy"}) { |
| 2160 my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"
}; | 2157 my $implementedBy = $attribute->extendedAttributes->{"ImplementedBy"
}; |
| 2161 my $implementedByImplName = GetImplNameFromImplementedBy($implemente
dBy); | 2158 my $implementedByImplName = GetImplNameFromImplementedBy($implemente
dBy); |
| 2162 AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implement
edByImplName)); | 2159 AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implement
edByImplName)); |
| 2163 unshift(@arguments, "imp") if !$attribute->isStatic; | 2160 unshift(@arguments, "imp") if !$attribute->isStatic; |
| (...skipping 4315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6479 if ($parameter->type eq "SerializedScriptValue") { | 6476 if ($parameter->type eq "SerializedScriptValue") { |
| 6480 return 1; | 6477 return 1; |
| 6481 } elsif (IsIntegerType($parameter->type)) { | 6478 } elsif (IsIntegerType($parameter->type)) { |
| 6482 return 1; | 6479 return 1; |
| 6483 } | 6480 } |
| 6484 } | 6481 } |
| 6485 return 0; | 6482 return 0; |
| 6486 } | 6483 } |
| 6487 | 6484 |
| 6488 1; | 6485 1; |
| OLD | NEW |