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

Unified Diff: third_party/WebKit/Source/bindings/templates/attributes.cpp

Issue 2049493005: binding: Uses the relevant realm instead of the current realm (1 of ?) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated layout tests. Created 4 years, 5 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/attributes.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp b/third_party/WebKit/Source/bindings/templates/attributes.cpp
index ccd092281c5264e69acc00c36d0013f130c65466..a5f1bc06852c85ac644cbd277c611f14d959854a 100644
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp
@@ -62,7 +62,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
{% endif %}
{% if attribute.is_call_with_script_state %}
- ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ ScriptState* scriptState = ScriptState::forThisObject(info);
{% endif %}
{% if (attribute.is_check_security_for_receiver and
not attribute.is_data_type_property) or
@@ -193,7 +193,7 @@ 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::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::forThisObject(info);
V8PerContextData* contextData = scriptState->perContextData();
{% if attribute.activity_logging_world_check %}
if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger())
@@ -342,7 +342,7 @@ 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::current(info.GetIsolate());
+ ScriptState* scriptState = ScriptState::forThisObject(info);
{% endif %}
{# Set #}
{% if attribute.cpp_setter %}
@@ -378,7 +378,7 @@ 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::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::forThisObject(info);
V8PerContextData* contextData = scriptState->perContextData();
{% if attribute.activity_logging_world_check %}
if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger()) {

Powered by Google App Engine
This is Rietveld 408576698