| Index: third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| index be5b5ea2f838e08ab4e161064eb0c940defeba26..f5b93e47c4e23085f0ef311d08084e2dff9f0a5c 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| +++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| @@ -62,7 +62,11 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| {% endif %}
|
| {% if attribute.is_call_with_script_state %}
|
| - ScriptState* scriptState = ScriptState::forHolderObject(info);
|
| + {% if attribute.is_static %}
|
| + ScriptState* scriptState = ScriptState::forFunctionObject(info);
|
| + {% else %}
|
| + ScriptState* scriptState = ScriptState::forReceiverObject(info);
|
| + {% endif %}
|
| {% endif %}
|
| {% if (attribute.is_check_security_for_receiver and
|
| not attribute.is_data_type_property) or
|
| @@ -193,7 +197,11 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}});
|
| {% endif %}
|
| {% if world_suffix in attribute.activity_logging_world_list_for_getter %}
|
| - ScriptState* scriptState = ScriptState::forHolderObject(info);
|
| + {% if attribute.is_static %}
|
| + ScriptState* scriptState = ScriptState::forFunctionObject(info);
|
| + {% else %}
|
| + ScriptState* scriptState = ScriptState::forReceiverObject(info);
|
| + {% endif %}
|
| V8PerContextData* contextData = scriptState->perContextData();
|
| {% if attribute.activity_logging_world_check %}
|
| if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger())
|
| @@ -342,7 +350,11 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| {% endif %}
|
| {% if attribute.is_call_with_script_state %}
|
| - ScriptState* scriptState = ScriptState::forHolderObject(info);
|
| + {% if attribute.is_static %}
|
| + ScriptState* scriptState = ScriptState::forFunctionObject(info);
|
| + {% else %}
|
| + ScriptState* scriptState = ScriptState::forReceiverObject(info);
|
| + {% endif %}
|
| {% endif %}
|
| {# Set #}
|
| {% if attribute.cpp_setter %}
|
| @@ -378,7 +390,11 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}});
|
| {% endif %}
|
| {% if world_suffix in attribute.activity_logging_world_list_for_setter %}
|
| - ScriptState* scriptState = ScriptState::forHolderObject(info);
|
| + {% if attribute.is_static %}
|
| + ScriptState* scriptState = ScriptState::forFunctionObject(info);
|
| + {% else %}
|
| + ScriptState* scriptState = ScriptState::forReceiverObject(info);
|
| + {% endif %}
|
| V8PerContextData* contextData = scriptState->perContextData();
|
| {% if attribute.activity_logging_world_check %}
|
| if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger()) {
|
|
|