Chromium Code Reviews| 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1059 if ($interface->extendedAttributes->{"EventConstructor"}) { | 1059 if ($interface->extendedAttributes->{"EventConstructor"}) { |
| 1060 $header{nameSpaceWebCore}->add("bool initialize${implClassName}(${implCl assName}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInf o<v8::Value>& info, const String& = \"\");\n\n"); | 1060 $header{nameSpaceWebCore}->add("bool initialize${implClassName}(${implCl assName}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInf o<v8::Value>& info, const String& = \"\");\n\n"); |
| 1061 } | 1061 } |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 sub GetInternalFields | 1064 sub GetInternalFields |
| 1065 { | 1065 { |
| 1066 my $interface = shift; | 1066 my $interface = shift; |
| 1067 | 1067 |
| 1068 my @customInternalFields = (); | 1068 my @customInternalFields = (); |
| 1069 # If we have persistentHandleIndex, it should be at the first index of the c ustom | |
| 1070 # internal fileds. | |
| 1071 if (IsWillBeGarbageCollectedType($interface->name)) { | |
| 1072 push(@customInternalFields, "persistentHandleIndex"); | |
| 1073 } | |
| 1074 # Event listeners on DOM nodes are explicitly supported in the GC controller . | 1069 # Event listeners on DOM nodes are explicitly supported in the GC controller . |
| 1075 if (!InheritsInterface($interface, "Node") && | 1070 if (!InheritsInterface($interface, "Node") && |
| 1076 InheritsInterface($interface, "EventTarget")) { | 1071 InheritsInterface($interface, "EventTarget")) { |
| 1077 push(@customInternalFields, "eventListenerCacheIndex"); | 1072 push(@customInternalFields, "eventListenerCacheIndex"); |
| 1078 } | 1073 } |
| 1074 # Persistent handle is stored in the last internal field. | |
|
haraken
2014/02/07 04:25:01
Please look at the CL description if you wonder wh
| |
| 1075 # FIXME: Remove this internal field. Since we need either of a persistent ha ndle | |
| 1076 # (if the object is in oilpan) or a C++ pointer to the DOM object (if the ob ject is not in oilpan), | |
| 1077 # we can share the internal field between the two cases. | |
| 1078 if (IsWillBeGarbageCollectedType($interface->name)) { | |
| 1079 push(@customInternalFields, "persistentHandleIndex"); | |
| 1080 } | |
| 1079 return @customInternalFields; | 1081 return @customInternalFields; |
| 1080 } | 1082 } |
| 1081 | 1083 |
| 1082 sub GenerateHeaderCustomInternalFieldIndices | 1084 sub GenerateHeaderCustomInternalFieldIndices |
| 1083 { | 1085 { |
| 1084 my $interface = shift; | 1086 my $interface = shift; |
| 1085 my @customInternalFields = GetInternalFields($interface); | 1087 my @customInternalFields = GetInternalFields($interface); |
| 1086 my $customFieldCounter = 0; | 1088 my $customFieldCounter = 0; |
| 1087 foreach my $customInternalField (@customInternalFields) { | 1089 foreach my $customInternalField (@customInternalFields) { |
| 1088 $header{classPublic}->add(<<END); | 1090 $header{classPublic}->add(<<END); |
| (...skipping 5378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6467 if ($parameter->type eq "SerializedScriptValue") { | 6469 if ($parameter->type eq "SerializedScriptValue") { |
| 6468 return 1; | 6470 return 1; |
| 6469 } elsif (IsIntegerType($parameter->type)) { | 6471 } elsif (IsIntegerType($parameter->type)) { |
| 6470 return 1; | 6472 return 1; |
| 6471 } | 6473 } |
| 6472 } | 6474 } |
| 6473 return 0; | 6475 return 0; |
| 6474 } | 6476 } |
| 6475 | 6477 |
| 6476 1; | 6478 1; |
| OLD | NEW |