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

Unified Diff: Source/bindings/templates/methods.cpp

Issue 330293002: Removing unnecessary PerWorldBindings for DOM API calls that are monitored by Activity Logger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style Created 6 years, 6 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: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 9affae262495d67d4fd6fdb460ec011387010573..152761607b0b0b72a06b2e376daa60a0429d02ee 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -400,8 +400,13 @@ static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
{% endif %}
{% endif %}{# not method.overloads #}
{% if world_suffix in method.activity_logging_world_list %}
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
+ {% if method.activity_logging_world_check %}
+ if (contextData && contextData->activityLogger() && scriptState->world().isIsolatedWorld())
+ {% else %}
if (contextData && contextData->activityLogger()) {
+ {% endif %}
{# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0)
and delete toVectorOfArguments #}
Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);

Powered by Google App Engine
This is Rietveld 408576698