Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
index a4221454f80043ec69787671bca75fa63b3e5d61..001500af43321914a4a28a0d09de7b573c792dbd 100644 |
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
@@ -510,8 +510,8 @@ void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCallbackInf |
{##############################################################################} |
-{% macro origin_safe_method_getter(method, world_suffix) %} |
-static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::PropertyCallbackInfo<v8::Value>& info) { |
+{% macro cross_origin_method_getter(method, world_suffix) %} |
+static void {{method.name}}CrossOriginMethodGetter{{world_suffix}}(const v8::PropertyCallbackInfo<v8::Value>& info) { |
static int domTemplateKey; // This address is used for a key to look up the dom template. |
V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
const DOMWrapperWorld& world = DOMWrapperWorld::world(info.GetIsolate()->GetCurrentContext()); |
@@ -519,22 +519,7 @@ static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::Prop |
v8::Local<v8::Signature> signature = v8::Signature::New(info.GetIsolate(), interfaceTemplate); |
v8::Local<v8::FunctionTemplate> methodTemplate = data->findOrCreateOperationTemplate(world, &domTemplateKey, {{cpp_class}}V8Internal::{{method.name}}MethodCallback{{world_suffix}}, v8Undefined(), signature, {{method.length}}); |
- // Return the function by default, unless the user script has overwritten it. |
v8SetReturnValue(info, methodTemplate->GetFunction(info.GetIsolate()->GetCurrentContext()).ToLocalChecked()); |
- |
- {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, BindingSecurity::ErrorReportOption::DoNotReport)) { |
- return; |
- } |
- |
- v8::Local<v8::Value> hiddenValue = V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), v8::Local<v8::Object>::Cast(info.Holder()), v8AtomicString(info.GetIsolate(), "{{method.name}}")); |
- if (!hiddenValue.IsEmpty()) { |
- v8SetReturnValue(info, hiddenValue); |
- } |
-} |
- |
-void {{method.name}}OriginSafeMethodGetterCallback{{world_suffix}}(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) { |
- {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix}}(info); |
} |
{% endmacro %} |