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

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

Issue 13828008: Second part of moving V8 Binding Integrity off of vtables. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 8 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/v8/DOMDataStore.h » ('j') | Source/bindings/v8/ScriptWrappable.h » ('J')
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 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 #else 2847 #else
2848 void* expectedVTablePointer = ${vtableRefGnu}; 2848 void* expectedVTablePointer = ${vtableRefGnu};
2849 #endif 2849 #endif
2850 if (actualVTablePointer != expectedVTablePointer) 2850 if (actualVTablePointer != expectedVTablePointer)
2851 CRASH(); 2851 CRASH();
2852 } 2852 }
2853 #endif // ENABLE(BINDING_INTEGRITY) 2853 #endif // ENABLE(BINDING_INTEGRITY)
2854 2854
2855 END 2855 END
2856 2856
2857 my $parentClassInfo = $parentClass ? "&${parentClass}::info" : "0";
2858 my $WrapperTypePrototype = $interface->isException ? "WrapperTypeErrorProtot ype" : "WrapperTypeObjectPrototype";
2859 push(@implContentInternals, "WrapperTypeInfo ${v8InterfaceName}::info = { ${ v8InterfaceName}::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObje ct, $toEventTarget, $rootForGC, ${v8InterfaceName}::installPerContextPrototypePr operties, $parentClassInfo, $WrapperTypePrototype };\n\n");
2857 2860
2858 my $parentClassInfo = $parentClass ? "&${parentClass}::info" : "0"; 2861 push(@implContentInternals, <<END) if !$codeGenerator->IsSVGTypeNeedingTearO ff($interfaceName);
2862 void scriptwrappable_init(${interfaceName}* object)
abarth-chromium 2013/04/11 22:59:33 scriptwrappable_init <-- That's an odd name.
2863 {
2864 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
2865 ScriptWrappable::setTypeInfoInObject(object, &${v8InterfaceName}::info);
2866 }
2867 END
2859 2868
2860 my $WrapperTypePrototype = $interface->isException ? "WrapperTypeErrorProtot ype" : "WrapperTypeObjectPrototype";
2861
2862 push(@implContentInternals, "WrapperTypeInfo ${v8InterfaceName}::info = { ${ v8InterfaceName}::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObje ct, $toEventTarget, $rootForGC, ${v8InterfaceName}::installPerContextPrototypePr operties, $parentClassInfo, $WrapperTypePrototype };\n\n");
2863 push(@implContentInternals, "namespace ${interfaceName}V8Internal {\n\n"); 2869 push(@implContentInternals, "namespace ${interfaceName}V8Internal {\n\n");
2864
2865 push(@implContentInternals, "template <typename T> void V8_USE(T) { }\n\n"); 2870 push(@implContentInternals, "template <typename T> void V8_USE(T) { }\n\n");
2866 2871
2867 my $hasConstructors = 0; 2872 my $hasConstructors = 0;
2868 my $hasReplaceable = 0; 2873 my $hasReplaceable = 0;
2869 2874
2870 # Generate property accessors for attributes. 2875 # Generate property accessors for attributes.
2871 for (my $index = 0; $index < @{$interface->attributes}; $index++) { 2876 for (my $index = 0; $index < @{$interface->attributes}; $index++) {
2872 my $attribute = @{$interface->attributes}[$index]; 2877 my $attribute = @{$interface->attributes}[$index];
2873 my $attrType = $attribute->signature->type; 2878 my $attrType = $attribute->signature->type;
2874 my $attrExt = $attribute->signature->extendedAttributes; 2879 my $attrExt = $attribute->signature->extendedAttributes;
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4592 4597
4593 sub GetPassRefPtrType 4598 sub GetPassRefPtrType
4594 { 4599 {
4595 my $v8InterfaceName = shift; 4600 my $v8InterfaceName = shift;
4596 4601
4597 my $angleBracketSpace = $v8InterfaceName =~ />$/ ? " " : ""; 4602 my $angleBracketSpace = $v8InterfaceName =~ />$/ ? " " : "";
4598 return "PassRefPtr<${v8InterfaceName}${angleBracketSpace}>"; 4603 return "PassRefPtr<${v8InterfaceName}${angleBracketSpace}>";
4599 } 4604 }
4600 4605
4601 1; 4606 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/DOMDataStore.h » ('j') | Source/bindings/v8/ScriptWrappable.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698