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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.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/methods.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp
index 6edab4054c04c24514ca8b5d333285094f62b6b4..a75a590cb10b7c28db1f10b1be76e5156547e82f 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp
@@ -233,7 +233,7 @@ if (!{{argument.name}}.isUndefinedOrNull() && !{{argument.name}}.isObject()) {
{% if method.is_call_with_script_state or method.is_call_with_this_value %}
{# [ConstructorCallWith=ScriptState] #}
{# [CallWith=ScriptState] #}
-ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ScriptState* scriptState = ScriptState::forThisObject(info);
{% endif %}
{% if method.is_call_with_execution_context %}
{# [ConstructorCallWith=ExecutionContext] #}
@@ -502,7 +502,7 @@ static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
{% endif %}
{% endif %}{# not method.overloads #}
{% if world_suffix in method.activity_logging_world_list %}
- ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::forThisObject(info);
V8PerContextData* contextData = scriptState->perContextData();
{% if method.activity_logging_world_check %}
if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger())

Powered by Google App Engine
This is Rietveld 408576698