Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 24867002: Add static attributes to IDL compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/code_generator_v8.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 my $attribute = shift; 3082 my $attribute = shift;
3083 my $attrExt = $attribute->extendedAttributes; 3083 my $attrExt = $attribute->extendedAttributes;
3084 my $code = ""; 3084 my $code = "";
3085 3085
3086 my ($attrName, $getter, $setter, $getterForMainWorld, $setterForMainWorld, $ data, $accessControl, $propAttribute, $on_proto) = GenerateAttributeConfiguratio nParameters($interface, $attribute); 3086 my ($attrName, $getter, $setter, $getterForMainWorld, $setterForMainWorld, $ data, $accessControl, $propAttribute, $on_proto) = GenerateAttributeConfiguratio nParameters($interface, $attribute);
3087 3087
3088 die "Static attributes do not support optimized getters or setters for the m ain world" if $getterForMainWorld || $setterForMainWorld; 3088 die "Static attributes do not support optimized getters or setters for the m ain world" if $getterForMainWorld || $setterForMainWorld;
3089 3089
3090 my $conditionalString = GenerateConditionalString($attribute); 3090 my $conditionalString = GenerateConditionalString($attribute);
3091 3091
3092 my $commentInfo = "Attribute '$attrName' (Extended Attributes: '" . join(' ' , keys(%{$attrExt})) . "')";
3093
3094 $code .= "#if ${conditionalString}\n" if $conditionalString; 3092 $code .= "#if ${conditionalString}\n" if $conditionalString;
3095 $code .= " // $commentInfo\n";
3096 $code .= " desc->SetNativeDataProperty(v8::String::NewSymbol(\"$attrName\ "), $getter, $setter, v8::External::New($data), $propAttribute, v8::Handle<v8::A ccessorSignature>(), $accessControl);\n"; 3093 $code .= " desc->SetNativeDataProperty(v8::String::NewSymbol(\"$attrName\ "), $getter, $setter, v8::External::New($data), $propAttribute, v8::Handle<v8::A ccessorSignature>(), $accessControl);\n";
3097 $code .= "#endif // ${conditionalString}\n" if $conditionalString; 3094 $code .= "#endif // ${conditionalString}\n" if $conditionalString;
3098 3095
3099 return $code; 3096 return $code;
3100 } 3097 }
3101 3098
3102 sub IsStandardFunction 3099 sub IsStandardFunction
3103 { 3100 {
3104 my $interface = shift; 3101 my $interface = shift;
3105 my $function = shift; 3102 my $function = shift;
(...skipping 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after
6117 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6114 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6118 $found = 1; 6115 $found = 1;
6119 } 6116 }
6120 return 1 if $found; 6117 return 1 if $found;
6121 }, 0); 6118 }, 0);
6122 6119
6123 return $found; 6120 return $found;
6124 } 6121 }
6125 6122
6126 1; 6123 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/code_generator_v8.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698