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

Side by Side Diff: Source/bindings/templates/union.h

Issue 1118993002: Oilpan: IDL union objects should be put in HeapVector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
OLDNEW
1 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #ifndef {{macro_guard}} 2 #ifndef {{macro_guard}}
3 #define {{macro_guard}} 3 #define {{macro_guard}}
4 4
5 {% for filename in header_includes %} 5 {% for filename in header_includes %}
6 #include "{{filename}}" 6 #include "{{filename}}"
7 {% endfor %} 7 {% endfor %}
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 {# 1. null or undefined #} 82 {# 1. null or undefined #}
83 if (isUndefinedOrNull(v8Value)) 83 if (isUndefinedOrNull(v8Value))
84 return; 84 return;
85 V8{{cpp_type}}::toImpl(isolate, v8Value, impl, exceptionState); 85 V8{{cpp_type}}::toImpl(isolate, v8Value, impl, exceptionState);
86 } 86 }
87 }; 87 };
88 88
89 {% endfor %} 89 {% endfor %}
90 } // namespace blink 90 } // namespace blink
91 91
92 // We need to set canInitializeWithMemset=true because HeapVector supports
93 // items that can initialize with memset or have a vtable. It is safe to
94 // set canInitializeWithMemset=true for a union type object in practice.
95 // See https://codereview.chromium.org/1118993002/#msg5 for more details.
96 {% for container in containers %}
97 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::{{container.cpp_class}});
98 {% endfor %}
99
92 #endif // {{macro_guard}} 100 #endif // {{macro_guard}}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/UnionTypesCore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698