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

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

Issue 82693003: IDL compiler: [CustomToV8] interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 public: 890 public:
891 static const WrapperTypeInfo* wrapperTypeInfo() { return &${v8ClassName}::wr apperTypeInfo; } 891 static const WrapperTypeInfo* wrapperTypeInfo() { return &${v8ClassName}::wr apperTypeInfo; }
892 }; 892 };
893 END 893 END
894 894
895 my $customWrap = NeedsSpecialWrap($interface); 895 my $customWrap = NeedsSpecialWrap($interface);
896 if ($noToV8) { 896 if ($noToV8) {
897 die "Can't suppress toV8 for subclass\n" if $interface->parent; 897 die "Can't suppress toV8 for subclass\n" if $interface->parent;
898 } elsif ($noWrap) { 898 } elsif ($noWrap) {
899 $header{nameSpaceWebCore}->add(<<END); 899 $header{nameSpaceWebCore}->add(<<END);
900
Nils Barth (inactive) 2013/11/22 06:10:48 Inconsistent spacing, caught by template and fixed
900 class ${nativeType}; 901 class ${nativeType};
901 v8::Handle<v8::Value> toV8(${nativeType}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*); 902 v8::Handle<v8::Value> toV8(${nativeType}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*);
902 903
903 template<class CallbackInfo> 904 template<class CallbackInfo>
904 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ${nativeType}* im pl) 905 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ${nativeType}* im pl)
905 { 906 {
906 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate())); 907 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate()));
907 } 908 }
908 909
909 template<class CallbackInfo> 910 template<class CallbackInfo>
910 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, ${nat iveType}* impl) 911 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, ${nat iveType}* impl)
911 { 912 {
912 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate())); 913 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()));
913 } 914 }
914 915
915 template<class CallbackInfo, class Wrappable> 916 template<class CallbackInfo, class Wrappable>
916 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, ${nativeType} * impl, Wrappable*) 917 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, ${nativeType} * impl, Wrappable*)
917 { 918 {
918 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate())); 919 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()));
919 } 920 }
920
921 END 921 END
922 } else { 922 } else {
923 if ($customWrap) { 923 if ($customWrap) {
924 $header{nameSpaceWebCore}->add(<<END); 924 $header{nameSpaceWebCore}->add(<<END);
925 925
926 v8::Handle<v8::Object> wrap(${nativeType}* impl, v8::Handle<v8::Object> creation Context, v8::Isolate*); 926 v8::Handle<v8::Object> wrap(${nativeType}* impl, v8::Handle<v8::Object> creation Context, v8::Isolate*);
927 END 927 END
928 } else { 928 } else {
929 $header{nameSpaceWebCore}->add(<<END); 929 $header{nameSpaceWebCore}->add(<<END);
930 930
(...skipping 5406 matching lines...) Expand 10 before | Expand all | Expand 10 after
6337 6337
6338 return 1 if $interface->extendedAttributes->{"CustomToV8"}; 6338 return 1 if $interface->extendedAttributes->{"CustomToV8"};
6339 return 1 if $interface->extendedAttributes->{"CustomWrap"}; 6339 return 1 if $interface->extendedAttributes->{"CustomWrap"};
6340 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; 6340 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"};
6341 return 1 if InheritsInterface($interface, "Document"); 6341 return 1 if InheritsInterface($interface, "Document");
6342 6342
6343 return 0; 6343 return 0;
6344 } 6344 }
6345 6345
6346 1; 6346 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_interface.py » ('j') | Source/bindings/scripts/unstable/v8_interface.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698