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

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

Issue 78713009: Introduce toV8NoInline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do not generate toV8Inline if CustomToV8 is specified. 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
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 4734 matching lines...) Expand 10 before | Expand all | Expand 10 after
4745 4745
4746 GenerateToV8Converters($interface, $v8ClassName, $nativeType); 4746 GenerateToV8Converters($interface, $v8ClassName, $nativeType);
4747 4747
4748 $implementation{nameSpaceWebCore}->add(<<END); 4748 $implementation{nameSpaceWebCore}->add(<<END);
4749 void ${v8ClassName}::derefObject(void* object) 4749 void ${v8ClassName}::derefObject(void* object)
4750 { 4750 {
4751 fromInternalPointer(object)->deref(); 4751 fromInternalPointer(object)->deref();
4752 } 4752 }
4753 4753
4754 END 4754 END
4755 if (!$interface->extendedAttributes->{"DoNotGenerateToV8"} && !$interface->e xtendedAttributes->{"CustomToV8"}) {
haraken 2013/11/23 15:03:18 Probably we can auto-generate toV8NoInline when [C
yhirano 2013/11/25 01:50:52 ConsoleBase has toV8Custom attribute but the custo
haraken 2013/11/25 02:39:23 Yes! It won't make sense to have [toV8Custom] but
yhirano 2013/11/25 03:36:49 Done. We can't omit toV8NoInline in V8ArrayBufferC
4756 $implementation{nameSpaceWebCore}->add(<<END);
4757 template<>
4758 v8::Handle<v8::Value> toV8NoInline(${nativeType}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
4759 {
4760 return toV8(impl, creationContext, isolate);
4761 }
4762
4763 END
4764 }
4755 } 4765 }
4756 4766
4757 sub GenerateHeaderContentHeader 4767 sub GenerateHeaderContentHeader
4758 { 4768 {
4759 my $interface = shift; 4769 my $interface = shift;
4760 my $v8ClassName = GetV8ClassName($interface); 4770 my $v8ClassName = GetV8ClassName($interface);
4761 my $conditionalString = GenerateConditionalString($interface); 4771 my $conditionalString = GenerateConditionalString($interface);
4762 4772
4763 my @headerContentHeader = split("\r", $licenseHeader); 4773 my @headerContentHeader = split("\r", $licenseHeader);
4764 4774
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
6344 my $interface = shift; 6354 my $interface = shift;
6345 6355
6346 return 1 if $interface->extendedAttributes->{"CustomToV8"}; 6356 return 1 if $interface->extendedAttributes->{"CustomToV8"};
6347 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; 6357 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"};
6348 return 1 if InheritsInterface($interface, "Document"); 6358 return 1 if InheritsInterface($interface, "Document");
6349 6359
6350 return 0; 6360 return 0;
6351 } 6361 }
6352 6362
6353 1; 6363 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8SupportTestInterface.cpp » ('j') | Source/bindings/v8/V8Binding.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698