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

Unified Diff: Source/bindings/tests/results/V8TestObject.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: rebase 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
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index ec353d96ae6321fd7e5ef50bd69300a1991b1b57..8e7c460d56f30c3bbf3372fbbaab908a60f2c21a 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -1683,7 +1683,8 @@ static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute");
TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(info);
@@ -1702,7 +1703,8 @@ static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute", v8Value);
}
@@ -1720,7 +1722,8 @@ static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingGetterForAllWorldsLongAttribute");
TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(info);
@@ -1769,7 +1772,8 @@ static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingSetterForAllWorldsLongAttribute", v8Value);
}
@@ -2506,7 +2510,8 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(info);
@@ -2525,7 +2530,8 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value);
}
@@ -2543,7 +2549,8 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
@@ -2562,7 +2569,8 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value);
}
@@ -2580,7 +2588,8 @@ static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
@@ -2599,7 +2608,8 @@ static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value);
}
@@ -2647,7 +2657,8 @@ static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingGetterPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(info);
@@ -2680,7 +2691,8 @@ static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingGetterPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
@@ -2713,7 +2725,8 @@ static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute");
TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
@@ -4371,8 +4384,9 @@ static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8
static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
- if (contextData && contextData->activityLogger()) {
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
+ if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger()) {
TestObject* impl = V8TestObject::toNative(info.Holder());
int original = impl->activityLoggingSetterOnlyLogPreviousValueAttribute();
v8::Handle<v8::Value> originalValue = v8::Integer::New(info.GetIsolate(), impl->activityLoggingSetterOnlyLogPreviousValueAttribute());
@@ -4392,8 +4406,9 @@ static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(con
static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
- if (contextData && contextData->activityLogger())
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
+ if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingLogPreviousValueInterfaceAttribute");
TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
@@ -4410,8 +4425,9 @@ static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8:
static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
- if (contextData && contextData->activityLogger()) {
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
+ if (scriptState->world().isIsolatedWorld() && contextData && contextData->activityLogger()) {
TestObject* impl = V8TestObject::toNative(info.Holder());
RefPtr<TestInterfaceEmpty> original = impl->activityLoggingLogPreviousValueInterfaceAttribute();
v8::Handle<v8::Value> originalValue = toV8(impl->activityLoggingLogPreviousValueInterfaceAttribute(), info.Holder(), info.GetIsolate());
@@ -7862,7 +7878,8 @@ static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall
static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
contextData->activityLogger()->logMethod("TestObject.activityLoggingAccessForAllWorldsMethod", info.Length(), loggerArgs.data());
@@ -8634,7 +8651,8 @@ static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
@@ -8652,7 +8670,8 @@ static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
@@ -8670,7 +8689,8 @@ static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
+ V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698