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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl

Issue 2745313003: Move securityCheck out of V8WrapperInstantiationScope (Closed)
Patch Set: Stop unecessary includes of BindingSecurity.h Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
index 899918e22b5ff64391577a89ccc246ce1b4d7c64..fb0346aa97946331cea76a6bc42e4e22163353c1 100644
--- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
@@ -9,6 +9,13 @@
namespace blink {
{% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_view else '0' %}
+{% if is_array_buffer_or_view %}
+ {% set context_access_check = '0' %}
jochen (gone - plz use gerrit) 2017/03/15 19:56:13 why this?
adithyas 2017/03/28 20:35:41 Array buffers/views don't call V8DOMWrapper::creat
+{% elif has_access_check_callbacks %}
+ {% set context_access_check = '&BindingSecurity::securityCheckForClassesWithAccessCheckCallbacks' %}
+{% else %}
+ {% set context_access_check = '&BindingSecurity::securityCheckForClassesWithoutAccessCheckCallbacks' %}
+{% endif %}
{% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface
if parent_interface else '0' %}
{% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
@@ -26,7 +33,7 @@ namespace blink {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif
-{{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{dom_template}}, {{v8_class}}::trace, {{v8_class}}::traceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} };
+{{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{dom_template}}, {{context_access_check}}, {{v8_class}}::trace, {{v8_class}}::traceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} };
Yuki 2017/03/16 14:05:55 I'm afraid that this would increase the binary siz
adithyas 2017/03/28 20:35:41 I'm using a function pointer instead of just a bit
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
#pragma clang diagnostic pop
#endif

Powered by Google App Engine
This is Rietveld 408576698