Merge from Chromium at DEPS revision r210036
This commit was generated by merge_to_master.py.
Change-Id: Ib2112ed87a48d7a6d9c0563ba71850716d1475ef
diff --git a/Source/bindings/tests/idls/TestCallback.idl b/Source/bindings/tests/idls/TestCallback.idl
index 3705c36..48dddd8 100644
--- a/Source/bindings/tests/idls/TestCallback.idl
+++ b/Source/bindings/tests/idls/TestCallback.idl
@@ -36,4 +36,5 @@
boolean callbackWithStringList(DOMStringList listParam);
boolean callbackWithBoolean(boolean boolParam);
boolean callbackWithSequence(sequence<TestObject> sequenceParam);
+ [CallWith=ThisValue] boolean callbackWithThisArg(long param);
};
diff --git a/Source/bindings/tests/idls/TestEvent.idl b/Source/bindings/tests/idls/TestEvent.idl
new file mode 100644
index 0000000..569f8fb
--- /dev/null
+++ b/Source/bindings/tests/idls/TestEvent.idl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+interface TestEvent : Event {
+};
diff --git a/Source/bindings/tests/idls/TestExtendedEvent.idl b/Source/bindings/tests/idls/TestExtendedEvent.idl
new file mode 100644
index 0000000..fd30168
--- /dev/null
+++ b/Source/bindings/tests/idls/TestExtendedEvent.idl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+[
+ Conditional=TEST,
+ ImplementedAs=Event,
+ EnabledAtRuntime=test
+] interface TestExtendedEvent
+ : TestEvent {
+};
diff --git a/Source/bindings/tests/idls/TestImplements.idl b/Source/bindings/tests/idls/TestImplements.idl
index ae41d01..b2aec99 100644
--- a/Source/bindings/tests/idls/TestImplements.idl
+++ b/Source/bindings/tests/idls/TestImplements.idl
@@ -51,4 +51,3 @@
[EnabledAtRuntime=condition25, EnabledPerContext=condition26] attribute Node Node25;
};
-TestInterface implements TestImplements;
diff --git a/Source/bindings/tests/idls/TestInterface.idl b/Source/bindings/tests/idls/TestInterface.idl
index 52d2150..b2b679f 100644
--- a/Source/bindings/tests/idls/TestInterface.idl
+++ b/Source/bindings/tests/idls/TestInterface.idl
@@ -38,3 +38,6 @@
[ImplementedAs=getItem] getter (Node or NodeList)(DOMString name);
[Custom] setter Node (DOMString name, Node value);
};
+
+TestInterface implements TestImplements;
+
diff --git a/Source/bindings/tests/idls/TestObject.idl b/Source/bindings/tests/idls/TestObject.idl
index 1b33224..61d4dfa 100644
--- a/Source/bindings/tests/idls/TestObject.idl
+++ b/Source/bindings/tests/idls/TestObject.idl
@@ -121,19 +121,19 @@
[CallWith=ScriptState, RaisesException] void withScriptStateVoidException();
[CallWith=ScriptState, RaisesException] TestObject withScriptStateObjException();
[CallWith=ScriptExecutionContext] void withScriptExecutionContext();
- [CallWith=ScriptExecutionContext|ScriptState] void withScriptExecutionContextAndScriptState();
- [CallWith=ScriptExecutionContext|ScriptState, RaisesException] TestObject withScriptExecutionContextAndScriptStateObjException();
- [CallWith= ScriptExecutionContext | ScriptState ] TestObject withScriptExecutionContextAndScriptStateWithSpaces();
- [CallWith=ActiveWindow|FirstWindow] void withActiveWindowAndFirstWindow();
+ [CallWith=ScriptExecutionContext&ScriptState] void withScriptExecutionContextAndScriptState();
+ [CallWith=ScriptExecutionContext&ScriptState, RaisesException] TestObject withScriptExecutionContextAndScriptStateObjException();
+ [CallWith= ScriptExecutionContext & ScriptState ] TestObject withScriptExecutionContextAndScriptStateWithSpaces();
+ [CallWith=ActiveWindow&FirstWindow] void withActiveWindowAndFirstWindow();
[CallWith=ScriptState] attribute long withScriptStateAttribute;
[CallWith=ScriptExecutionContext] attribute TestObject withScriptExecutionContextAttribute;
- [SetterCallWith=ActiveWindow|FirstWindow] attribute TestObject withActiveWindowAndFirstWindowAttribute;
+ [SetterCallWith=ActiveWindow&FirstWindow] attribute TestObject withActiveWindowAndFirstWindowAttribute;
[CallWith=ScriptState, GetterRaisesException] attribute TestObject withScriptStateAttributeRaises;
[CallWith=ScriptExecutionContext, GetterRaisesException] attribute TestObject withScriptExecutionContextAttributeRaises;
- [CallWith=ScriptExecutionContext|ScriptState] attribute TestObject withScriptExecutionContextAndScriptStateAttribute;
- [CallWith=ScriptExecutionContext|ScriptState, GetterRaisesException] attribute TestObject withScriptExecutionContextAndScriptStateAttributeRaises;
- [CallWith= ScriptExecutionContext | ScriptState ] attribute TestObject withScriptExecutionContextAndScriptStateWithSpacesAttribute;
+ [CallWith=ScriptExecutionContext&ScriptState] attribute TestObject withScriptExecutionContextAndScriptStateAttribute;
+ [CallWith=ScriptExecutionContext&ScriptState, GetterRaisesException] attribute TestObject withScriptExecutionContextAndScriptStateAttributeRaises;
+ [CallWith= ScriptExecutionContext & ScriptState ] attribute TestObject withScriptExecutionContextAndScriptStateWithSpacesAttribute;
// optional parameters
void methodWithOptionalArg(optional long opt);
@@ -320,3 +320,7 @@
[DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1;
};
+
+// The following comment should not generate any code
+// TestObject implements TestImplements;
+
diff --git a/Source/bindings/tests/results/EventNames.in b/Source/bindings/tests/results/EventNames.in
new file mode 100644
index 0000000..9eceed5
--- /dev/null
+++ b/Source/bindings/tests/results/EventNames.in
@@ -0,0 +1,4 @@
+namespace="Event"
+
+Source/bindings/tests/idls/TestEvent
+Source/bindings/tests/idls/TestExtendedEvent ImplementedAs=Event, Conditional=TEST, EnabledAtRuntime=testEnabled
diff --git a/Source/bindings/tests/results/V8Float64Array.cpp b/Source/bindings/tests/results/V8Float64Array.cpp
index f32e1db..40a5de4 100644
--- a/Source/bindings/tests/results/V8Float64Array.cpp
+++ b/Source/bindings/tests/results/V8Float64Array.cpp
@@ -36,6 +36,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -83,7 +84,9 @@
static void fooMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
Float64ArrayV8Internal::fooMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -93,7 +96,9 @@
static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
Float64ArrayV8Internal::setMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -101,6 +106,20 @@
return constructWebGLArray<Float64Array, V8Float64Array, double>(args, &V8Float64Array::info, v8::kExternalDoubleArray);
}
+static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ V8Float64Array::indexedPropertyGetterCustom(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ V8Float64Array::indexedPropertySetterCustom(index, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
} // namespace Float64ArrayV8Internal
v8::Handle<v8::Object> wrap(Float64Array* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
@@ -118,6 +137,7 @@
void V8Float64Array::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -146,7 +166,7 @@
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
UNUSED_PARAM(instance); // In some cases, it will not be used.
UNUSED_PARAM(proto); // In some cases, it will not be used.
- desc->InstanceTemplate()->SetIndexedPropertyHandler(V8Float64Array::indexedPropertyGetter, V8Float64Array::indexedPropertySetter, 0, 0, nodeCollectionIndexedPropertyEnumerator<Float64Array>);
+ desc->InstanceTemplate()->SetIndexedPropertyHandler(Float64ArrayV8Internal::indexedPropertyGetterCallback, Float64ArrayV8Internal::indexedPropertySetterCallback, 0, 0, indexedPropertyEnumerator<Float64Array>);
// Custom Signature 'foo'
const int fooArgc = 1;
@@ -166,6 +186,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8Float64ArrayTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8Float64Array.h b/Source/bindings/tests/results/V8Float64Array.h
index c394cb2..6f690c8 100644
--- a/Source/bindings/tests/results/V8Float64Array.h
+++ b/Source/bindings/tests/results/V8Float64Array.h
@@ -41,8 +41,8 @@
static void derefObject(void*);
static WrapperTypeInfo info;
static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
- static void indexedPropertyGetter(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
- static void indexedPropertySetter(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, Float64Array*, v8::Isolate*) { }
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
@@ -85,7 +85,7 @@
inline v8::Handle<v8::Value> toV8Fast(Float64Array* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -97,7 +97,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestActiveDOMObject.cpp b/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
index 17be77b..49705bd 100644
--- a/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
+++ b/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
@@ -32,6 +32,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -103,7 +104,9 @@
static void excitingFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestActiveDOMObjectV8Internal::excitingFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void postMessageMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -121,7 +124,9 @@
static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestActiveDOMObjectV8Internal::postMessageMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void postMessageAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -216,6 +221,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestActiveDOMObjectTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestActiveDOMObject.h b/Source/bindings/tests/results/V8TestActiveDOMObject.h
index 8585b27..13e1222 100644
--- a/Source/bindings/tests/results/V8TestActiveDOMObject.h
+++ b/Source/bindings/tests/results/V8TestActiveDOMObject.h
@@ -92,7 +92,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestActiveDOMObject* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -104,7 +104,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestCallback.cpp b/Source/bindings/tests/results/V8TestCallback.cpp
index e67b2b8..1b950b5 100644
--- a/Source/bindings/tests/results/V8TestCallback.cpp
+++ b/Source/bindings/tests/results/V8TestCallback.cpp
@@ -50,7 +50,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -62,7 +63,7 @@
v8::Handle<v8::Value> *argv = 0;
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 0, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 0, argv, callbackReturnValue, scriptExecutionContext());
}
bool V8TestCallback::callbackWithTestObjectParam(TestObj* class1Param)
@@ -70,7 +71,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -78,7 +80,7 @@
v8::Context::Scope scope(v8Context);
- v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::Object>(), v8Context->GetIsolate());
+ v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::Object>(), isolate);
if (class1ParamHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
@@ -90,7 +92,7 @@
};
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 1, argv, callbackReturnValue, scriptExecutionContext());
}
bool V8TestCallback::callbackWithTestObjectParam(TestObj* class2Param, const String& strArg)
@@ -98,7 +100,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -106,13 +109,13 @@
v8::Context::Scope scope(v8Context);
- v8::Handle<v8::Value> class2ParamHandle = toV8(class2Param, v8::Handle<v8::Object>(), v8Context->GetIsolate());
+ v8::Handle<v8::Value> class2ParamHandle = toV8(class2Param, v8::Handle<v8::Object>(), isolate);
if (class2ParamHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
return true;
}
- v8::Handle<v8::Value> strArgHandle = v8String(strArg, v8Context->GetIsolate());
+ v8::Handle<v8::Value> strArgHandle = v8String(strArg, isolate);
if (strArgHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
@@ -125,7 +128,7 @@
};
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 2, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 2, argv, callbackReturnValue, scriptExecutionContext());
}
bool V8TestCallback::callbackWithStringList(RefPtr<DOMStringList> listParam)
@@ -133,7 +136,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -141,7 +145,7 @@
v8::Context::Scope scope(v8Context);
- v8::Handle<v8::Value> listParamHandle = toV8(listParam, v8::Handle<v8::Object>(), v8Context->GetIsolate());
+ v8::Handle<v8::Value> listParamHandle = toV8(listParam, v8::Handle<v8::Object>(), isolate);
if (listParamHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
@@ -153,7 +157,7 @@
};
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 1, argv, callbackReturnValue, scriptExecutionContext());
}
bool V8TestCallback::callbackWithBoolean(bool boolParam)
@@ -161,7 +165,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -169,7 +174,7 @@
v8::Context::Scope scope(v8Context);
- v8::Handle<v8::Value> boolParamHandle = v8Boolean(boolParam, v8Context->GetIsolate());
+ v8::Handle<v8::Value> boolParamHandle = v8Boolean(boolParam, isolate);
if (boolParamHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
@@ -181,7 +186,7 @@
};
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 1, argv, callbackReturnValue, scriptExecutionContext());
}
bool V8TestCallback::callbackWithSequence(Vector<RefPtr<TestObj> > sequenceParam)
@@ -189,7 +194,8 @@
if (!canInvokeCallback())
return true;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
if (v8Context.IsEmpty())
@@ -197,7 +203,7 @@
v8::Context::Scope scope(v8Context);
- v8::Handle<v8::Value> sequenceParamHandle = v8Array(sequenceParam, v8Context->GetIsolate());
+ v8::Handle<v8::Value> sequenceParamHandle = v8Array(sequenceParam, isolate);
if (sequenceParamHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
@@ -209,7 +215,43 @@
};
bool callbackReturnValue = false;
- return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scriptExecutionContext());
+ return !invokeCallback(m_callback.newLocal(isolate), 1, argv, callbackReturnValue, scriptExecutionContext());
+}
+
+bool V8TestCallback::callbackWithThisArg(int param, ScriptValue thisValue)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handleScope(isolate);
+
+ v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
+ if (v8Context.IsEmpty())
+ return true;
+
+ v8::Context::Scope scope(v8Context);
+
+ v8::Handle<v8::Value> paramHandle = v8::Integer::New(param, isolate);
+ if (paramHandle.IsEmpty()) {
+ if (!isScriptControllerTerminating())
+ CRASH();
+ return true;
+ }
+ v8::Handle<v8::Value> thisHandle = thisValue.v8Value();
+ if (thisHandle.IsEmpty()) {
+ if (!isScriptControllerTerminating())
+ CRASH();
+ return true;
+ }
+ ASSERT(thisHandle->isObject());
+
+ v8::Handle<v8::Value> argv[] = {
+ paramHandle
+ };
+
+ bool callbackReturnValue = false;
+ return !invokeCallback(m_callback.newLocal(isolate), v8::Handle<v8::Object>::Cast(thisHandle), 1, argv, callbackReturnValue, scriptExecutionContext());
}
} // namespace WebCore
diff --git a/Source/bindings/tests/results/V8TestCallback.h b/Source/bindings/tests/results/V8TestCallback.h
index bf0eaf8..4f1af6f 100644
--- a/Source/bindings/tests/results/V8TestCallback.h
+++ b/Source/bindings/tests/results/V8TestCallback.h
@@ -50,8 +50,9 @@
virtual bool callbackWithStringList(RefPtr<DOMStringList> listParam);
virtual bool callbackWithBoolean(bool boolParam);
virtual bool callbackWithSequence(Vector<RefPtr<TestObj> > sequenceParam);
+ virtual bool callbackWithThisArg(int param, ScriptValue thisValue);
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextLifecycleObserver::scriptExecutionContext(); }
private:
V8TestCallback(v8::Handle<v8::Object>, ScriptExecutionContext*);
diff --git a/Source/bindings/tests/results/V8TestCustomAccessors.cpp b/Source/bindings/tests/results/V8TestCustomAccessors.cpp
index 32e6fb5..b15549f 100644
--- a/Source/bindings/tests/results/V8TestCustomAccessors.cpp
+++ b/Source/bindings/tests/results/V8TestCustomAccessors.cpp
@@ -30,6 +30,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -75,7 +76,65 @@
static void anotherFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestCustomAccessorsV8Internal::anotherFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ V8TestCustomAccessors::indexedPropertyGetterCustom(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ V8TestCustomAccessors::indexedPropertySetterCustom(index, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ V8TestCustomAccessors::indexedPropertyDeleterCustom(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestCustomAccessors::namedPropertyGetterCustom(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestCustomAccessors::namedPropertySetterCustom(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestCustomAccessors::namedPropertyDeleterCustom(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestCustomAccessors::namedPropertyEnumeratorCustom(info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestCustomAccessors::namedPropertyQueryCustom(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
} // namespace TestCustomAccessorsV8Internal
@@ -97,8 +156,8 @@
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
UNUSED_PARAM(instance); // In some cases, it will not be used.
UNUSED_PARAM(proto); // In some cases, it will not be used.
- desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestCustomAccessors::indexedPropertyGetter, V8TestCustomAccessors::indexedPropertySetter, 0, V8TestCustomAccessors::indexedPropertyDeleter);
- desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestCustomAccessors::namedPropertyGetter, V8TestCustomAccessors::namedPropertySetter, V8TestCustomAccessors::namedPropertyQuery, V8TestCustomAccessors::namedPropertyDeleter, V8TestCustomAccessors::namedPropertyEnumerator);
+ desc->InstanceTemplate()->SetIndexedPropertyHandler(TestCustomAccessorsV8Internal::indexedPropertyGetterCallback, TestCustomAccessorsV8Internal::indexedPropertySetterCallback, 0, TestCustomAccessorsV8Internal::indexedPropertyDeleterCallback);
+ desc->InstanceTemplate()->SetNamedPropertyHandler(TestCustomAccessorsV8Internal::namedPropertyGetterCallback, TestCustomAccessorsV8Internal::namedPropertySetterCallback, TestCustomAccessorsV8Internal::namedPropertyQueryCallback, TestCustomAccessorsV8Internal::namedPropertyDeleterCallback, TestCustomAccessorsV8Internal::namedPropertyEnumeratorCallback);
// Custom toString template
desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
@@ -112,6 +171,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestCustomAccessorsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestCustomAccessors.h b/Source/bindings/tests/results/V8TestCustomAccessors.h
index 829db14..25b9db6 100644
--- a/Source/bindings/tests/results/V8TestCustomAccessors.h
+++ b/Source/bindings/tests/results/V8TestCustomAccessors.h
@@ -39,14 +39,14 @@
}
static void derefObject(void*);
static WrapperTypeInfo info;
- static void indexedPropertyGetter(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
- static void indexedPropertySetter(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void indexedPropertyDeleter(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&);
- static void namedPropertyGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertyDeleter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean>&);
- static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>&);
- static void namedPropertyQuery(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);
+ static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&);
+ static void namedPropertyGetterCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
+ static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean>&);
+ static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::Array>&);
+ static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, TestCustomAccessors*, v8::Isolate*) { }
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
@@ -100,7 +100,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestCustomAccessors* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -112,7 +112,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestEvent.cpp b/Source/bindings/tests/results/V8TestEvent.cpp
new file mode 100644
index 0000000..0a59329
--- /dev/null
+++ b/Source/bindings/tests/results/V8TestEvent.cpp
@@ -0,0 +1,127 @@
+/*
+ This file is part of the Blink open source project.
+ This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#include "V8TestEvent.h"
+
+#include "RuntimeEnabledFeatures.h"
+#include "V8Event.h"
+#include "bindings/v8/ScriptController.h"
+#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8DOMConfiguration.h"
+#include "bindings/v8/V8DOMWrapper.h"
+#include "core/dom/ContextFeatures.h"
+#include "core/dom/Document.h"
+#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
+#include "wtf/UnusedParam.h"
+
+namespace WebCore {
+
+static void initializeScriptWrappableForInterface(TestEvent* object)
+{
+ if (ScriptWrappable::wrapperCanBeStoredInObject(object))
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestEvent::info);
+ else
+ ASSERT_NOT_REACHED();
+}
+
+} // namespace WebCore
+
+// In ScriptWrappable::init, the use of a local function declaration has an issue on Windows:
+// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
+// in the global namespace.
+// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
+void webCoreInitializeScriptWrappableForInterface(WebCore::TestEvent* object)
+{
+ WebCore::initializeScriptWrappableForInterface(object);
+}
+
+namespace WebCore {
+WrapperTypeInfo V8TestEvent::info = { V8TestEvent::GetTemplate, V8TestEvent::derefObject, 0, 0, 0, V8TestEvent::installPerContextPrototypeProperties, &V8Event::info, WrapperTypeObjectPrototype };
+
+namespace TestEventV8Internal {
+
+template <typename T> void V8_USE(T) { }
+
+} // namespace TestEventV8Internal
+
+static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ desc->ReadOnlyPrototype();
+
+ v8::Local<v8::Signature> defaultSignature;
+ defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEvent", V8Event::GetTemplate(isolate, currentWorldType), V8TestEvent::internalFieldCount,
+ 0, 0,
+ 0, 0, isolate, currentWorldType);
+ UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+
+ // Custom toString template
+ desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
+ return desc;
+}
+
+v8::Handle<v8::FunctionTemplate> V8TestEvent::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+ V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
+ if (result != data->templateMap(currentWorldType).end())
+ return result->value.newLocal(isolate);
+
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
+ v8::HandleScope handleScope(isolate);
+ v8::Handle<v8::FunctionTemplate> templ =
+ ConfigureV8TestEventTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
+ data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
+ return handleScope.Close(templ);
+}
+
+bool V8TestEvent::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
+}
+
+bool V8TestEvent::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate)
+{
+ return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld)
+ || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWorld)
+ || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorld);
+}
+
+
+v8::Handle<v8::Object> V8TestEvent::createWrapper(PassRefPtr<TestEvent> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(impl.get());
+ ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
+ ASSERT(static_cast<void*>(static_cast<Event*>(impl.get())) == static_cast<void*>(impl.get()));
+
+ v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, impl.get(), isolate);
+ if (UNLIKELY(wrapper.IsEmpty()))
+ return wrapper;
+ installPerContextProperties(wrapper, impl.get(), isolate);
+ V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
+ return wrapper;
+}
+void V8TestEvent::derefObject(void* object)
+{
+ static_cast<TestEvent*>(object)->deref();
+}
+
+} // namespace WebCore
diff --git a/Source/bindings/tests/results/V8TestEvent.h b/Source/bindings/tests/results/V8TestEvent.h
new file mode 100644
index 0000000..467ef74
--- /dev/null
+++ b/Source/bindings/tests/results/V8TestEvent.h
@@ -0,0 +1,135 @@
+/*
+ This file is part of the Blink open source project.
+ This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef V8TestEvent_h
+#define V8TestEvent_h
+
+#include "V8Event.h"
+#include "bindings/bindings/tests/idls/TestEvent.h"
+#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8DOMWrapper.h"
+#include "bindings/v8/WrapperTypeInfo.h"
+
+namespace WebCore {
+
+class V8TestEvent {
+public:
+ static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldType);
+ static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
+ static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWorldType);
+ static TestEvent* toNative(v8::Handle<v8::Object> object)
+ {
+ return reinterpret_cast<TestEvent*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+ }
+ static void derefObject(void*);
+ static WrapperTypeInfo info;
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
+ static void installPerContextProperties(v8::Handle<v8::Object>, TestEvent*, v8::Isolate*) { }
+ static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
+private:
+ friend v8::Handle<v8::Object> wrap(TestEvent*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+ static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEvent>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+};
+
+template<>
+class WrapperTypeTraits<TestEvent > {
+public:
+ static WrapperTypeInfo* info() { return &V8TestEvent::info; }
+};
+
+
+inline v8::Handle<v8::Object> wrap(TestEvent* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(impl);
+ ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
+ // Might be a XXXConstructor::info instead of an XXX::info. These will both have
+ // the same object de-ref functions, though, so use that as the basis of the check.
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestEvent::info.derefObjectFunction);
+ }
+ return V8TestEvent::createWrapper(impl, creationContext, isolate);
+}
+
+inline v8::Handle<v8::Value> toV8(TestEvent* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ if (UNLIKELY(!impl))
+ return v8NullWithCheck(isolate);
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, creationContext, isolate);
+}
+
+inline v8::Handle<v8::Value> toV8ForMainWorld(TestEvent* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(worldType(isolate) == MainWorld);
+ if (UNLIKELY(!impl))
+ return v8NullWithCheck(isolate);
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, creationContext, isolate);
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(TestEvent* impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ if (UNLIKELY(!impl))
+ return v8::Null(container.GetIsolate());
+ v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, container.Holder(), container.GetIsolate());
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8FastForMainWorld(TestEvent* impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ ASSERT(worldType(container.GetIsolate()) == MainWorld);
+ if (UNLIKELY(!impl))
+ return v8::Null(container.GetIsolate());
+ v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, container.Holder(), container.GetIsolate());
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestEvent > impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ return toV8FastForMainWorld(impl.get(), container, wrappable);
+}
+
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEvent > impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ return toV8Fast(impl.get(), container, wrappable);
+}
+
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEvent > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ return toV8(impl.get(), creationContext, isolate);
+}
+
+}
+
+#endif // V8TestEvent_h
diff --git a/Source/bindings/tests/results/V8TestEventConstructor.cpp b/Source/bindings/tests/results/V8TestEventConstructor.cpp
index e5368a3..a0e95a0 100644
--- a/Source/bindings/tests/results/V8TestEventConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestEventConstructor.cpp
@@ -31,6 +31,7 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -123,6 +124,7 @@
void V8TestEventConstructor::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -160,6 +162,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestEventConstructorTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestEventConstructor.h b/Source/bindings/tests/results/V8TestEventConstructor.h
index a18bbf0..517ebdc 100644
--- a/Source/bindings/tests/results/V8TestEventConstructor.h
+++ b/Source/bindings/tests/results/V8TestEventConstructor.h
@@ -94,7 +94,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestEventConstructor* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -106,7 +106,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestEventTarget.cpp b/Source/bindings/tests/results/V8TestEventTarget.cpp
index 2c67e76..d716404 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -26,7 +26,6 @@
#include "V8Node.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
-#include "bindings/v8/V8Collection.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8DOMWrapper.h"
#include "bindings/v8/V8EventListenerList.h"
@@ -34,6 +33,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -83,7 +83,9 @@
static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestEventTargetV8Internal::itemMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -100,7 +102,9 @@
static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestEventTargetV8Internal::namedItemMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -115,7 +119,9 @@
static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestEventTargetV8Internal::addEventListenerMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -130,7 +136,9 @@
static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestEventTargetV8Internal::removeEventListenerMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void dispatchEventMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -153,31 +161,31 @@
static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestEventTargetV8Internal::dispatchEventMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
-} // namespace TestEventTargetV8Internal
-
-static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
- {"item", TestEventTargetV8Internal::itemMethodCallback, 0, 1},
- {"namedItem", TestEventTargetV8Internal::namedItemMethodCallback, 0, 1},
- {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallback, 0, 2},
- {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback, 0, 2},
-};
-
-void V8TestEventTarget::indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- TestEventTarget* collection = toNative(info.Holder());
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
RefPtr<Node> element = collection->item(index);
if (!element)
return;
v8SetReturnValue(info, toV8Fast(element.release(), info, collection));
}
-void V8TestEventTarget::indexedPropertyDeleter(unsigned index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestEventTarget* collection = toNative(info.Holder());
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ TestEventTargetV8Internal::indexedPropertyGetter(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void indexedPropertyDeleter(unsigned index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
ExceptionCode ec = 0;
bool result = collection->anonymousIndexedDeleter(index, ec);
if (ec) {
@@ -187,7 +195,14 @@
return v8SetReturnValueBool(info, result);
}
-void V8TestEventTarget::namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ TestEventTargetV8Internal::indexedPropertyDeleter(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return;
@@ -197,7 +212,7 @@
return;
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- TestEventTarget* collection = toNative(info.Holder());
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
RefPtr<Node> element = collection->namedItem(propertyName);
if (!element)
@@ -205,7 +220,14 @@
v8SetReturnValue(info, toV8Fast(element.release(), info, collection));
}
-void V8TestEventTarget::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestEventTargetV8Internal::namedPropertyGetter(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return;
@@ -213,7 +235,7 @@
return;
if (info.Holder()->HasRealNamedProperty(name))
return;
- TestEventTarget* collection = toNative(info.Holder());
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, value);
bool result;
@@ -226,18 +248,32 @@
v8SetReturnValue(info, value);
}
-void V8TestEventTarget::namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestEventTarget* collection = toNative(info.Holder());
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestEventTargetV8Internal::namedPropertySetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
bool result = collection->anonymousNamedDeleter(propertyName);
return v8SetReturnValueBool(info, result);
}
-void V8TestEventTarget::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
+static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestEventTargetV8Internal::namedPropertyDeleter(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
{
ExceptionCode ec = 0;
- TestEventTarget* collection = toNative(info.Holder());
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
Vector<String> names;
collection->namedPropertyEnumerator(names, ec);
if (ec) {
@@ -246,13 +282,13 @@
}
v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
for (size_t i = 0; i < names.size(); ++i)
- v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
+ v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
v8SetReturnValue(info, v8names);
}
-void V8TestEventTarget::namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
{
- TestEventTarget* collection = toNative(info.Holder());
+ TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
ExceptionCode ec = 0;
bool result = collection->namedPropertyQuery(propertyName, ec);
@@ -265,6 +301,29 @@
v8SetReturnValueInt(info, v8::None);
}
+static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestEventTargetV8Internal::namedPropertyEnumerator(info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestEventTargetV8Internal::namedPropertyQuery(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+} // namespace TestEventTargetV8Internal
+
+static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
+ {"item", TestEventTargetV8Internal::itemMethodCallback, 0, 1},
+ {"namedItem", TestEventTargetV8Internal::namedItemMethodCallback, 0, 1},
+ {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallback, 0, 2},
+ {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback, 0, 2},
+};
+
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
desc->ReadOnlyPrototype();
@@ -278,8 +337,8 @@
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
UNUSED_PARAM(instance); // In some cases, it will not be used.
UNUSED_PARAM(proto); // In some cases, it will not be used.
- desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestEventTarget::indexedPropertyGetter, 0, 0, V8TestEventTarget::indexedPropertyDeleter, nodeCollectionIndexedPropertyEnumerator<TestEventTarget>);
- desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestEventTarget::namedPropertyGetter, V8TestEventTarget::namedPropertySetter, V8TestEventTarget::namedPropertyQuery, V8TestEventTarget::namedPropertyDeleter, V8TestEventTarget::namedPropertyEnumerator);
+ desc->InstanceTemplate()->SetIndexedPropertyHandler(TestEventTargetV8Internal::indexedPropertyGetterCallback, 0, 0, TestEventTargetV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestEventTarget>);
+ desc->InstanceTemplate()->SetNamedPropertyHandler(TestEventTargetV8Internal::namedPropertyGetterCallback, TestEventTargetV8Internal::namedPropertySetterCallback, TestEventTargetV8Internal::namedPropertyQueryCallback, TestEventTargetV8Internal::namedPropertyDeleterCallback, TestEventTargetV8Internal::namedPropertyEnumeratorCallback);
desc->InstanceTemplate()->MarkAsUndetectable();
// Custom Signature 'dispatchEvent'
@@ -300,6 +359,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestEventTargetTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestEventTarget.h b/Source/bindings/tests/results/V8TestEventTarget.h
index fdee683..67f6894 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.h
+++ b/Source/bindings/tests/results/V8TestEventTarget.h
@@ -40,13 +40,6 @@
static void derefObject(void*);
static WrapperTypeInfo info;
static EventTarget* toEventTarget(v8::Handle<v8::Object>);
- static void indexedPropertyGetter(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
- static void indexedPropertyDeleter(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&);
- static void namedPropertyGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertyDeleter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean>&);
- static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>&);
- static void namedPropertyQuery(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);
static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount + 0;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1;
static void installPerContextProperties(v8::Handle<v8::Object>, TestEventTarget*, v8::Isolate*) { }
@@ -101,7 +94,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestEventTarget* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -113,7 +106,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestException.cpp b/Source/bindings/tests/results/V8TestException.cpp
index ae592ea..54a8cc2 100644
--- a/Source/bindings/tests/results/V8TestException.cpp
+++ b/Source/bindings/tests/results/V8TestException.cpp
@@ -29,6 +29,7 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -100,6 +101,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestExceptionTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestException.h b/Source/bindings/tests/results/V8TestException.h
index 5211331..d2b54e5 100644
--- a/Source/bindings/tests/results/V8TestException.h
+++ b/Source/bindings/tests/results/V8TestException.h
@@ -92,7 +92,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestException* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -104,7 +104,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestExtendedEvent.cpp b/Source/bindings/tests/results/V8TestExtendedEvent.cpp
new file mode 100644
index 0000000..a0c4ab9
--- /dev/null
+++ b/Source/bindings/tests/results/V8TestExtendedEvent.cpp
@@ -0,0 +1,133 @@
+/*
+ This file is part of the Blink open source project.
+ This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#if ENABLE(TEST)
+#include "V8TestExtendedEvent.h"
+
+#include "RuntimeEnabledFeatures.h"
+#include "V8TestEvent.h"
+#include "bindings/v8/ScriptController.h"
+#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8DOMConfiguration.h"
+#include "bindings/v8/V8DOMWrapper.h"
+#include "core/dom/ContextFeatures.h"
+#include "core/dom/Document.h"
+#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
+#include "wtf/UnusedParam.h"
+
+namespace WebCore {
+
+static void initializeScriptWrappableForInterface(Event* object)
+{
+ if (ScriptWrappable::wrapperCanBeStoredInObject(object))
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestExtendedEvent::info);
+ else
+ ASSERT_NOT_REACHED();
+}
+
+} // namespace WebCore
+
+// In ScriptWrappable::init, the use of a local function declaration has an issue on Windows:
+// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
+// in the global namespace.
+// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
+void webCoreInitializeScriptWrappableForInterface(WebCore::Event* object)
+{
+ WebCore::initializeScriptWrappableForInterface(object);
+}
+
+namespace WebCore {
+WrapperTypeInfo V8TestExtendedEvent::info = { V8TestExtendedEvent::GetTemplate, V8TestExtendedEvent::derefObject, 0, 0, 0, V8TestExtendedEvent::installPerContextPrototypeProperties, &V8TestEvent::info, WrapperTypeObjectPrototype };
+
+namespace EventV8Internal {
+
+template <typename T> void V8_USE(T) { }
+
+} // namespace EventV8Internal
+
+static v8::Handle<v8::FunctionTemplate> ConfigureV8TestExtendedEventTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ desc->ReadOnlyPrototype();
+
+ v8::Local<v8::Signature> defaultSignature;
+ if (!RuntimeEnabledFeatures::testEnabled())
+ defaultSignature = V8DOMConfiguration::configureTemplate(desc, "", V8TestEvent::GetTemplate(isolate, currentWorldType), V8TestExtendedEvent::internalFieldCount, 0, 0, 0, 0, isolate, currentWorldType);
+ else
+ defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestExtendedEvent", V8TestEvent::GetTemplate(isolate, currentWorldType), V8TestExtendedEvent::internalFieldCount,
+ 0, 0,
+ 0, 0, isolate, currentWorldType);
+ UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+
+ // Custom toString template
+ desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
+ return desc;
+}
+
+v8::Handle<v8::FunctionTemplate> V8TestExtendedEvent::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+ V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
+ if (result != data->templateMap(currentWorldType).end())
+ return result->value.newLocal(isolate);
+
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
+ v8::HandleScope handleScope(isolate);
+ v8::Handle<v8::FunctionTemplate> templ =
+ ConfigureV8TestExtendedEventTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
+ data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
+ return handleScope.Close(templ);
+}
+
+bool V8TestExtendedEvent::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+{
+ return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
+}
+
+bool V8TestExtendedEvent::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate)
+{
+ return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld)
+ || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWorld)
+ || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorld);
+}
+
+
+v8::Handle<v8::Object> V8TestExtendedEvent::createWrapper(PassRefPtr<Event> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(impl.get());
+ ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
+ ASSERT(static_cast<void*>(static_cast<Event*>(impl.get())) == static_cast<void*>(impl.get()));
+
+ v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, impl.get(), isolate);
+ if (UNLIKELY(wrapper.IsEmpty()))
+ return wrapper;
+ installPerContextProperties(wrapper, impl.get(), isolate);
+ V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
+ return wrapper;
+}
+void V8TestExtendedEvent::derefObject(void* object)
+{
+ static_cast<Event*>(object)->deref();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(TEST)
diff --git a/Source/bindings/tests/results/V8TestExtendedEvent.h b/Source/bindings/tests/results/V8TestExtendedEvent.h
new file mode 100644
index 0000000..0982d9e
--- /dev/null
+++ b/Source/bindings/tests/results/V8TestExtendedEvent.h
@@ -0,0 +1,138 @@
+/*
+ This file is part of the Blink open source project.
+ This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef V8TestExtendedEvent_h
+#define V8TestExtendedEvent_h
+
+#if ENABLE(TEST)
+#include "V8TestEvent.h"
+#include "bindings/bindings/tests/idls/Event.h"
+#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8DOMWrapper.h"
+#include "bindings/v8/WrapperTypeInfo.h"
+
+namespace WebCore {
+
+class V8TestExtendedEvent {
+public:
+ static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldType);
+ static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
+ static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWorldType);
+ static Event* toNative(v8::Handle<v8::Object> object)
+ {
+ return reinterpret_cast<Event*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+ }
+ static void derefObject(void*);
+ static WrapperTypeInfo info;
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
+ static void installPerContextProperties(v8::Handle<v8::Object>, Event*, v8::Isolate*) { }
+ static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
+private:
+ friend v8::Handle<v8::Object> wrap(Event*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+ static v8::Handle<v8::Object> createWrapper(PassRefPtr<Event>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+};
+
+template<>
+class WrapperTypeTraits<Event > {
+public:
+ static WrapperTypeInfo* info() { return &V8TestExtendedEvent::info; }
+};
+
+
+inline v8::Handle<v8::Object> wrap(Event* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(impl);
+ ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
+ // Might be a XXXConstructor::info instead of an XXX::info. These will both have
+ // the same object de-ref functions, though, so use that as the basis of the check.
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestExtendedEvent::info.derefObjectFunction);
+ }
+ return V8TestExtendedEvent::createWrapper(impl, creationContext, isolate);
+}
+
+inline v8::Handle<v8::Value> toV8(Event* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ if (UNLIKELY(!impl))
+ return v8NullWithCheck(isolate);
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, creationContext, isolate);
+}
+
+inline v8::Handle<v8::Value> toV8ForMainWorld(Event* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ ASSERT(worldType(isolate) == MainWorld);
+ if (UNLIKELY(!impl))
+ return v8NullWithCheck(isolate);
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, creationContext, isolate);
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(Event* impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ if (UNLIKELY(!impl))
+ return v8::Null(container.GetIsolate());
+ v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, container.Holder(), container.GetIsolate());
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8FastForMainWorld(Event* impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ ASSERT(worldType(container.GetIsolate()) == MainWorld);
+ if (UNLIKELY(!impl))
+ return v8::Null(container.GetIsolate());
+ v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return wrap(impl, container.Holder(), container.GetIsolate());
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< Event > impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ return toV8FastForMainWorld(impl.get(), container, wrappable);
+}
+
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< Event > impl, const HolderContainer& container, Wrappable* wrappable)
+{
+ return toV8Fast(impl.get(), container, wrappable);
+}
+
+inline v8::Handle<v8::Value> toV8(PassRefPtr< Event > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ return toV8(impl.get(), creationContext, isolate);
+}
+
+}
+
+#endif // ENABLE(TEST)
+
+#endif // V8TestExtendedEvent_h
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index 4d8fa8d..6d20691 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -29,7 +29,6 @@
#include "bindings/bindings/tests/idls/TestPartialInterface.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
-#include "bindings/v8/V8Collection.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8DOMWrapper.h"
#include "bindings/v8/V8ObjectConstructor.h"
@@ -37,6 +36,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -70,307 +70,6 @@
template <typename T> void V8_USE(T) { }
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAttr());
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStaticAttr(), info.GetIsolate(), ReturnUnsafeHandle));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::supplementalStaticAttrAttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
- TestPartialInterface::setSupplementalStaticAttr(v);
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::supplementalStaticAttrAttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStr1(imp), info.GetIsolate(), ReturnUnsafeHandle));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::supplementalStr1AttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStr2(imp), info.GetIsolate(), ReturnUnsafeHandle));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::supplementalStr2AttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
- TestPartialInterface::setSupplementalStr2(imp, v);
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::supplementalStr2AttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- V8TestInterface::supplementalStr3AttrGetterCustom(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- V8TestInterface::supplementalStr3AttrSetterCustom(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, toV8Fast(TestPartialInterface::supplementalNode(imp), info, imp));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalNodeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::supplementalNodeAttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
- TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(v));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::supplementalNodeAttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node13AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, toV8Fast(TestPartialInterface::node13(imp), info, imp));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node13AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::Node13AttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node13AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
- TestPartialInterface::setNode13(imp, WTF::getPtr(v));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node13AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::Node13AttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node14AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, toV8Fast(TestPartialInterface::node14(imp), info, imp));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node14AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::Node14AttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node14AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
- TestPartialInterface::setNode14(imp, WTF::getPtr(v));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node14AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::Node14AttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node15AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- v8SetReturnValue(info, toV8Fast(TestPartialInterface::node15(imp), info, imp));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node15AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceV8Internal::Node15AttrGetter(name, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node15AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterface* imp = V8TestInterface::toNative(info.Holder());
- V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
- TestPartialInterface::setNode15(imp, WTF::getPtr(v));
- return;
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void Node15AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- TestInterfaceV8Internal::Node15AttrSetter(name, value, info);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
#if ENABLE(Condition22) || ENABLE(Condition23)
static void implementsStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -424,7 +123,9 @@
static void implementsStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsStaticAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -485,7 +186,9 @@
static void implementsStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsStr2AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -503,7 +206,9 @@
static void implementsStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8TestInterface::implementsStr3AttrSetterCustom(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -544,7 +249,9 @@
static void implementsNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsNodeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -585,7 +292,9 @@
static void Node23AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::Node23AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -626,7 +335,9 @@
static void Node24AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::Node24AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -667,18 +378,18 @@
static void Node25AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::Node25AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterface* imp = V8TestInterface::toNative(args.Holder());
- TestPartialInterface::supplementalMethod1(imp);
-
+ v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAttr());
return;
}
@@ -686,32 +397,18 @@
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceV8Internal::supplementalMethod1Method(args);
+ TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter(name, info);
}
#endif // ENABLE(Condition11) || ENABLE(Condition12)
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- if (args.Length() < 2) {
- throwNotEnoughArgumentsError(args.GetIsolate());
- return;
- }
- TestInterface* imp = V8TestInterface::toNative(args.Holder());
- ExceptionCode ec = 0;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
- V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
- ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptContext, imp, strArg, objArg, ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
- return;
- }
- v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
+ v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStaticAttr(), info.GetIsolate(), ReturnUnsafeHandle));
return;
}
@@ -719,28 +416,19 @@
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceV8Internal::supplementalMethod2Method(args);
+ TestInterfaceV8Internal::supplementalStaticAttrAttrGetter(name, info);
}
#endif // ENABLE(Condition11) || ENABLE(Condition12)
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
- V8TestInterface::supplementalMethod3MethodCustom(args);
-}
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
-
-static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- TestPartialInterface::supplementalMethod4();
-
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+ TestPartialInterface::setSupplementalStaticAttr(v);
return;
}
@@ -748,9 +436,266 @@
#if ENABLE(Condition11) || ENABLE(Condition12)
-static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+static void supplementalStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
- TestInterfaceV8Internal::supplementalMethod4Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalStaticAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStr1(imp), info.GetIsolate(), ReturnUnsafeHandle));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::supplementalStr1AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, v8String(TestPartialInterface::supplementalStr2(imp), info.GetIsolate(), ReturnUnsafeHandle));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::supplementalStr2AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+ TestPartialInterface::setSupplementalStr2(imp, v);
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalStr2AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ V8TestInterface::supplementalStr3AttrGetterCustom(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ V8TestInterface::supplementalStr3AttrSetterCustom(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(TestPartialInterface::supplementalNode(imp), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalNodeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::supplementalNodeAttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalNodeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node13AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(TestPartialInterface::node13(imp), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node13AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node13AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node13AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ TestPartialInterface::setNode13(imp, WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node13AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::Node13AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node14AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(TestPartialInterface::node14(imp), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node14AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node14AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node14AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ TestPartialInterface::setNode14(imp, WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node14AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::Node14AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node15AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(TestPartialInterface::node15(imp), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node15AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node15AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node15AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ TestPartialInterface::setNode15(imp, WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void Node15AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::Node15AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition11) || ENABLE(Condition12)
@@ -771,7 +716,9 @@
static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -804,7 +751,9 @@
static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsMethod2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -813,7 +762,9 @@
static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8TestInterface::implementsMethod3MethodCustom(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
@@ -833,11 +784,104 @@
static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestInterfaceV8Internal::implementsMethod4Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterface* imp = V8TestInterface::toNative(args.Holder());
+ TestPartialInterface::supplementalMethod1(imp);
+
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ if (args.Length() < 2) {
+ throwNotEnoughArgumentsError(args.GetIsolate());
+ return;
+ }
+ TestInterface* imp = V8TestInterface::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
+ V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
+ ScriptExecutionContext* scriptContext = getScriptExecutionContext();
+ RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptContext, imp, strArg, objArg, ec);
+ if (UNLIKELY(ec)) {
+ setDOMException(ec, args.GetIsolate());
+ return;
+ }
+ v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalMethod2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ V8TestInterface::supplementalMethod3MethodCustom(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestPartialInterface::supplementalMethod4();
+
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
+ TestInterfaceV8Internal::supplementalMethod4Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
@@ -861,33 +905,98 @@
args.GetReturnValue().Set(wrapper);
}
+static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
+ return;
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return;
+ if (info.Holder()->HasRealNamedProperty(name))
+ return;
+
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
+ TestInterface* collection = V8TestInterface::toNative(info.Holder());
+ AtomicString propertyName = toWebCoreAtomicString(name);
+ bool element0Enabled = false;
+ RefPtr<Node> element0;
+ bool element1Enabled = false;
+ RefPtr<NodeList> element1;
+ collection->getItem(propertyName, element0Enabled, element0, element1Enabled, element1);
+ if (element0Enabled) {
+ v8SetReturnValue(info, toV8Fast(element0.release(), info, collection));
+ return;
+ }
+
+ if (element1Enabled) {
+ v8SetReturnValue(info, toV8Fast(element1.release(), info, collection));
+ return;
+ }
+
+ return;
+}
+
+static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestInterfaceV8Internal::namedPropertyGetter(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ V8TestInterface::namedPropertySetterCustom(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ ExceptionCode ec = 0;
+ TestInterface* collection = V8TestInterface::toNative(info.Holder());
+ Vector<String> names;
+ collection->namedPropertyEnumerator(names, ec);
+ if (ec) {
+ setDOMException(ec, info.GetIsolate());
+ return;
+ }
+ v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
+ for (size_t i = 0; i < names.size(); ++i)
+ v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
+ v8SetReturnValue(info, v8names);
+}
+
+static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TestInterface* collection = V8TestInterface::toNative(info.Holder());
+ AtomicString propertyName = toWebCoreAtomicString(name);
+ ExceptionCode ec = 0;
+ bool result = collection->namedPropertyQuery(propertyName, ec);
+ if (ec) {
+ setDOMException(ec, info.GetIsolate());
+ return;
+ }
+ if (!result)
+ return;
+ v8SetReturnValueInt(info, v8::None);
+}
+
+static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestInterfaceV8Internal::namedPropertyEnumerator(info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestInterfaceV8Internal::namedPropertyQuery(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
} // namespace TestInterfaceV8Internal
static const V8DOMConfiguration::BatchedAttribute V8TestInterfaceAttrs[] = {
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalStaticReadOnlyAttr'
- {"supplementalStaticReadOnlyAttr", TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalStaticAttr'
- {"supplementalStaticAttr", TestInterfaceV8Internal::supplementalStaticAttrAttrGetterCallback, TestInterfaceV8Internal::supplementalStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalStr1'
- {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalStr2'
- {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttrGetterCallback, TestInterfaceV8Internal::supplementalStr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalStr3'
- {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttrGetterCallback, TestInterfaceV8Internal::supplementalStr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- // Attribute 'supplementalNode'
- {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttrGetterCallback, TestInterfaceV8Internal::supplementalNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
#if ENABLE(Condition22) || ENABLE(Condition23)
// Attribute 'implementsStaticReadOnlyAttr'
{"implementsStaticReadOnlyAttr", TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
@@ -912,54 +1021,79 @@
// Attribute 'implementsNode'
{"implementsNode", TestInterfaceV8Internal::implementsNodeAttrGetterCallback, TestInterfaceV8Internal::implementsNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalStaticReadOnlyAttr'
+ {"supplementalStaticReadOnlyAttr", TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalStaticAttr'
+ {"supplementalStaticAttr", TestInterfaceV8Internal::supplementalStaticAttrAttrGetterCallback, TestInterfaceV8Internal::supplementalStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalStr1'
+ {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalStr2'
+ {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttrGetterCallback, TestInterfaceV8Internal::supplementalStr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalStr3'
+ {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttrGetterCallback, TestInterfaceV8Internal::supplementalStr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalNode'
+ {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttrGetterCallback, TestInterfaceV8Internal::supplementalNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
};
static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
-#if ENABLE(Condition11) || ENABLE(Condition12)
- {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback, 0, 0},
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
- {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback, 0, 0},
-#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
{"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallback, 0, 0},
#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
{"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallback, 0, 0},
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback, 0, 0},
+#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback, 0, 0},
+#endif
};
static const V8DOMConfiguration::BatchedConstant V8TestInterfaceConsts[] = {
-#if ENABLE(Condition11) || ENABLE(Condition12)
- {"SUPPLEMENTALCONSTANT1", 1},
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
- {"SUPPLEMENTALCONSTANT2", 2},
-#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
{"IMPLEMENTSCONSTANT1", 1},
#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
{"IMPLEMENTSCONSTANT2", 2},
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ {"SUPPLEMENTALCONSTANT1", 1},
+#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ {"SUPPLEMENTALCONSTANT2", 2},
+#endif
};
-#if ENABLE(Condition11) || ENABLE(Condition12)
-COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEnumSUPPLEMENTALCONSTANT1IsWrongUseDoNotCheckConstants);
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
-COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
-#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
COMPILE_ASSERT(1 == TestInterface::IMPLEMENTSCONSTANT1, TestInterfaceEnumIMPLEMENTSCONSTANT1IsWrongUseDoNotCheckConstants);
#endif
#if ENABLE(Condition22) || ENABLE(Condition23)
COMPILE_ASSERT(2 == TestInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEnumSUPPLEMENTALCONSTANT1IsWrongUseDoNotCheckConstants);
+#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
+#endif
void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -973,67 +1107,6 @@
TestInterfaceV8Internal::constructor(args);
}
-void V8TestInterface::namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
- return;
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return;
- if (info.Holder()->HasRealNamedProperty(name))
- return;
-
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- TestInterface* collection = toNative(info.Holder());
- AtomicString propertyName = toWebCoreAtomicString(name);
- bool element0Enabled = false;
- RefPtr<Node> element0;
- bool element1Enabled = false;
- RefPtr<NodeList> element1;
- collection->getItem(propertyName, element0Enabled, element0, element1Enabled, element1);
- if (element0Enabled) {
- v8SetReturnValue(info, toV8Fast(element0.release(), info, collection));
- return;
- }
-
- if (element1Enabled) {
- v8SetReturnValue(info, toV8Fast(element1.release(), info, collection));
- return;
- }
-
- return;
-}
-
-void V8TestInterface::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
-{
- ExceptionCode ec = 0;
- TestInterface* collection = toNative(info.Holder());
- Vector<String> names;
- collection->namedPropertyEnumerator(names, ec);
- if (ec) {
- setDOMException(ec, info.GetIsolate());
- return;
- }
- v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
- for (size_t i = 0; i < names.size(); ++i)
- v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
- v8SetReturnValue(info, v8names);
-}
-
-void V8TestInterface::namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
-{
- TestInterface* collection = toNative(info.Holder());
- AtomicString propertyName = toWebCoreAtomicString(name);
- ExceptionCode ec = 0;
- bool result = collection->namedPropertyQuery(propertyName, ec);
- if (ec) {
- setDOMException(ec, info.GetIsolate());
- return;
- }
- if (!result)
- return;
- v8SetReturnValueInt(info, v8::None);
-}
-
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
desc->ReadOnlyPrototype();
@@ -1050,16 +1123,6 @@
UNUSED_PARAM(instance); // In some cases, it will not be used.
UNUSED_PARAM(proto); // In some cases, it will not be used.
-#if ENABLE(Condition11) || ENABLE(Condition12)
- if (RuntimeEnabledFeatures::condition13Enabled()) {
- static const V8DOMConfiguration::BatchedAttribute attrData =\
- // Attribute 'Node13'
- {"Node13", TestInterfaceV8Internal::Node13AttrGetterCallback, TestInterfaceV8Internal::Node13AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
- V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
- }
-
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
#if ENABLE(Condition22) || ENABLE(Condition23)
if (RuntimeEnabledFeatures::condition23Enabled()) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
@@ -1069,29 +1132,39 @@
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
- desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestInterface::namedPropertyGetter, V8TestInterface::namedPropertySetter, V8TestInterface::namedPropertyQuery, 0, V8TestInterface::namedPropertyEnumerator);
- // Custom Signature 'supplementalMethod2'
- const int supplementalMethod2Argc = 2;
- v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
- v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(desc, supplementalMethod2Argc, supplementalMethod2Argv);
#if ENABLE(Condition11) || ENABLE(Condition12)
- proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined(), supplementalMethod2Signature, 2));
+ if (RuntimeEnabledFeatures::condition13Enabled()) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node13'
+ {"Node13", TestInterfaceV8Internal::Node13AttrGetterCallback, TestInterfaceV8Internal::Node13AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
+ }
+
#endif // ENABLE(Condition11) || ENABLE(Condition12)
-#if ENABLE(Condition11) || ENABLE(Condition12)
- desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
+ desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Internal::namedPropertyEnumeratorCallback);
+#if ENABLE(Condition22) || ENABLE(Condition23)
// Custom Signature 'implementsMethod2'
const int implementsMethod2Argc = 2;
v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(desc, implementsMethod2Argc, implementsMethod2Argv);
-#if ENABLE(Condition22) || ENABLE(Condition23)
proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), implementsMethod2Signature, 2));
#endif // ENABLE(Condition22) || ENABLE(Condition23)
#if ENABLE(Condition22) || ENABLE(Condition23)
desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+ // Custom Signature 'supplementalMethod2'
+ const int supplementalMethod2Argc = 2;
+ v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
+ v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(desc, supplementalMethod2Argc, supplementalMethod2Argv);
+ proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined(), supplementalMethod2Signature, 2));
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestInterfaceConsts, WTF_ARRAY_LENGTH(V8TestInterfaceConsts), isolate);
// Custom toString template
@@ -1106,6 +1179,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestInterfaceTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
@@ -1129,24 +1203,6 @@
{
v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetPrototype());
-#if ENABLE(Condition11) || ENABLE(Condition12)
- if (ContextFeatures::condition14Enabled(impl->document())) {
- static const V8DOMConfiguration::BatchedAttribute attrData =\
- // Attribute 'Node14'
- {"Node14", TestInterfaceV8Internal::Node14AttrGetterCallback, TestInterfaceV8Internal::Node14AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
- V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
- }
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
-#if ENABLE(Condition11) || ENABLE(Condition12)
- if (ContextFeatures::condition16Enabled(impl->document()) && RuntimeEnabledFeatures::condition15Enabled()) {
- static const V8DOMConfiguration::BatchedAttribute attrData =\
- // Attribute 'Node15'
- {"Node15", TestInterfaceV8Internal::Node15AttrGetterCallback, TestInterfaceV8Internal::Node15AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
- V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
- }
-#endif // ENABLE(Condition11) || ENABLE(Condition12)
-
#if ENABLE(Condition22) || ENABLE(Condition23)
if (ContextFeatures::condition24Enabled(impl->document())) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
@@ -1164,6 +1220,24 @@
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
}
#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ if (ContextFeatures::condition14Enabled(impl->document())) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node14'
+ {"Node14", TestInterfaceV8Internal::Node14AttrGetterCallback, TestInterfaceV8Internal::Node14AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
+ }
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ if (ContextFeatures::condition16Enabled(impl->document()) && RuntimeEnabledFeatures::condition15Enabled()) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node15'
+ {"Node15", TestInterfaceV8Internal::Node15AttrGetterCallback, TestInterfaceV8Internal::Node15AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
+ }
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
}
ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> object)
diff --git a/Source/bindings/tests/results/V8TestInterface.h b/Source/bindings/tests/results/V8TestInterface.h
index 6700e00..8ffd9c8 100644
--- a/Source/bindings/tests/results/V8TestInterface.h
+++ b/Source/bindings/tests/results/V8TestInterface.h
@@ -51,10 +51,7 @@
#if ENABLE(Condition22) || ENABLE(Condition23)
static void implementsStr3AttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
#endif // ENABLE(Condition22) || ENABLE(Condition23)
- static void namedPropertyGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>&);
- static void namedPropertyQuery(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);
+ static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, TestInterface*, v8::Isolate*);
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
@@ -108,7 +105,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestInterface* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -120,7 +117,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp b/Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp
index a154c40..d2ae88c 100644
--- a/Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp
@@ -30,6 +30,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -85,7 +86,9 @@
static void aAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
RealClassV8Internal::aAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void bAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -110,7 +113,9 @@
static void bAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
RealClassV8Internal::bAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void func1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -127,7 +132,9 @@
static void func1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
RealClassV8Internal::func1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void funcTestInterfaceImplementedAsParamMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -144,7 +151,9 @@
static void funcTestInterfaceImplementedAsParamMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
RealClassV8Internal::funcTestInterfaceImplementedAsParamMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
} // namespace RealClassV8Internal
@@ -192,6 +201,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestInterfaceImplementedAsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestInterfaceImplementedAs.h b/Source/bindings/tests/results/V8TestInterfaceImplementedAs.h
index eadbd8c..483fa12 100644
--- a/Source/bindings/tests/results/V8TestInterfaceImplementedAs.h
+++ b/Source/bindings/tests/results/V8TestInterfaceImplementedAs.h
@@ -92,7 +92,7 @@
inline v8::Handle<v8::Value> toV8Fast(RealClass* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -104,7 +104,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestMediaQueryListListener.cpp b/Source/bindings/tests/results/V8TestMediaQueryListListener.cpp
index 7ba48d9..faea1b2 100644
--- a/Source/bindings/tests/results/V8TestMediaQueryListListener.cpp
+++ b/Source/bindings/tests/results/V8TestMediaQueryListListener.cpp
@@ -31,6 +31,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -76,7 +77,9 @@
static void methodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestMediaQueryListListenerV8Internal::methodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
} // namespace TestMediaQueryListListenerV8Internal
@@ -111,6 +114,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestMediaQueryListListenerTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestMediaQueryListListener.h b/Source/bindings/tests/results/V8TestMediaQueryListListener.h
index 1ac0b05..d6a5002 100644
--- a/Source/bindings/tests/results/V8TestMediaQueryListListener.h
+++ b/Source/bindings/tests/results/V8TestMediaQueryListListener.h
@@ -92,7 +92,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestMediaQueryListListener* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -104,7 +104,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestNamedConstructor.cpp b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
index 536bdbe..945240b 100644
--- a/Source/bindings/tests/results/V8TestNamedConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
@@ -32,6 +32,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -110,6 +111,7 @@
if (!cachedTemplate.IsEmpty())
return v8::Local<v8::FunctionTemplate>::New(isolate, cachedTemplate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope scope(isolate);
v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(V8TestNamedConstructorConstructorCallback);
@@ -144,6 +146,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestNamedConstructorTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestNamedConstructor.h b/Source/bindings/tests/results/V8TestNamedConstructor.h
index 98f7963..9322f01 100644
--- a/Source/bindings/tests/results/V8TestNamedConstructor.h
+++ b/Source/bindings/tests/results/V8TestNamedConstructor.h
@@ -99,7 +99,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestNamedConstructor* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -111,7 +111,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestNode.cpp b/Source/bindings/tests/results/V8TestNode.cpp
index a509968..0067a19 100644
--- a/Source/bindings/tests/results/V8TestNode.cpp
+++ b/Source/bindings/tests/results/V8TestNode.cpp
@@ -31,6 +31,7 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -75,6 +76,7 @@
void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -112,6 +114,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestNodeTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestNode.h b/Source/bindings/tests/results/V8TestNode.h
index f4c80a2..1cb5a0f 100644
--- a/Source/bindings/tests/results/V8TestNode.h
+++ b/Source/bindings/tests/results/V8TestNode.h
@@ -95,7 +95,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestNode* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -107,7 +107,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 993da6f..5f7a4ca 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -43,7 +43,6 @@
#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8Binding.h"
-#include "bindings/v8/V8Collection.h"
#include "bindings/v8/V8DOMActivityLogger.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8DOMWrapper.h"
@@ -56,6 +55,7 @@
#include "core/page/Frame.h"
#include "core/page/PageConsole.h"
#include "core/page/UseCounter.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
#include "core/svg/properties/SVGStaticPropertyTearOff.h"
#include "wtf/GetPtr.h"
@@ -166,7 +166,9 @@
static void staticStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::staticStringAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enumAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -194,7 +196,9 @@
static void enumAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enumAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void readOnlyEnumAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -231,7 +235,9 @@
static void byteAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::byteAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void octetAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -256,7 +262,9 @@
static void octetAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::octetAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void shortAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -281,7 +289,9 @@
static void shortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::shortAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void unsignedShortAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -306,7 +316,9 @@
static void unsignedShortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::unsignedShortAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void longAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -331,7 +343,9 @@
static void longAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::longAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void longLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -356,7 +370,9 @@
static void longLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::longLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -381,7 +397,9 @@
static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::unsignedLongLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -406,7 +424,9 @@
static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::stringAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -432,8 +452,10 @@
static void testObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::testObjAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void XMLObjAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -458,7 +480,9 @@
static void XMLObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::XMLObjAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void createAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -483,7 +507,9 @@
static void createAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::createAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -508,7 +534,9 @@
static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -533,7 +561,9 @@
static void reflectedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedIntegralAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -558,7 +588,9 @@
static void reflectedUnsignedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -583,7 +615,9 @@
static void reflectedBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedBooleanAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedURLAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -608,7 +642,9 @@
static void reflectedURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedURLAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -633,7 +669,9 @@
static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedCustomIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -658,7 +696,9 @@
static void reflectedCustomIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -683,7 +723,9 @@
static void reflectedCustomBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void reflectedCustomURLAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -708,7 +750,9 @@
static void reflectedCustomURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::reflectedCustomURLAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void typedArrayAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -733,7 +777,9 @@
static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -764,7 +810,9 @@
static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::attrWithGetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -792,7 +840,9 @@
static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -823,7 +873,9 @@
static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -851,7 +903,9 @@
static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void customAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -861,7 +915,9 @@
static void customAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8TestObject::customAttrAttrSetterCustom(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -896,7 +952,9 @@
static void withScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -923,7 +981,9 @@
static void withScriptExecutionContextAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withActiveWindowAndFirstWindowAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -948,7 +1008,9 @@
static void withActiveWindowAndFirstWindowAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -993,7 +1055,9 @@
static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1026,7 +1090,9 @@
static void withScriptExecutionContextAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1063,7 +1129,9 @@
static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1110,7 +1178,9 @@
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1147,7 +1217,9 @@
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeByteAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1172,7 +1244,9 @@
static void enforcedRangeByteAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeByteAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeOctetAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1197,7 +1271,9 @@
static void enforcedRangeOctetAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeOctetAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1222,7 +1298,9 @@
static void enforcedRangeLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeUnsignedLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1247,7 +1325,9 @@
static void enforcedRangeUnsignedLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1272,7 +1352,9 @@
static void enforcedRangeLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeLongLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enforcedRangeUnsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1297,7 +1379,9 @@
static void enforcedRangeUnsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#if ENABLE(Condition1)
@@ -1336,7 +1420,9 @@
static void conditionalAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalAttr1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1)
@@ -1377,7 +1463,9 @@
static void conditionalAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalAttr2AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
@@ -1418,7 +1506,9 @@
static void conditionalAttr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalAttr3AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
@@ -1469,7 +1559,9 @@
static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::anyAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void callbackFunctionAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1494,7 +1586,9 @@
static void callbackFunctionAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::callbackFunctionAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1519,7 +1613,9 @@
static void enabledAtRuntimeAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledAtRuntimeAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1544,7 +1640,9 @@
static void enabledAtRuntimeAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledPerContextAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1569,7 +1667,9 @@
static void enabledPerContextAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledPerContextAttr1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledPerContextAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1594,7 +1694,9 @@
static void enabledPerContextAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledPerContextAttr2AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void floatArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1619,7 +1721,9 @@
static void floatArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::floatArrayAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void doubleArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1644,7 +1748,9 @@
static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::doubleArrayAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void messagePortArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1669,7 +1775,9 @@
static void messagePortArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::messagePortArrayAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void contentDocumentAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1710,7 +1818,9 @@
static void mutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::mutablePointAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void immutablePointAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1735,7 +1845,9 @@
static void immutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::immutablePointAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void strawberryAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1760,7 +1872,9 @@
static void strawberryAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::strawberryAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void strictFloatAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1785,7 +1899,9 @@
static void strictFloatAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::strictFloatAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void descriptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1822,7 +1938,9 @@
static void idAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::idAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void hashAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1949,7 +2067,9 @@
static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void nullableStringValueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -1985,7 +2105,9 @@
static void nullableStringValueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::nullableStringValueAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2101,12 +2223,14 @@
static void activityLoggedAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttr1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void activityLoggedAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2255,12 +2379,14 @@
static void activityLoggedAttrSetter1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttrSetter1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void activityLoggedAttrSetter2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2403,7 +2529,9 @@
static void activityLoggedAttrGetter1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::activityLoggedAttrGetter1AttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void activityLoggedAttrGetter2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2548,8 +2676,10 @@
static void deprecatedStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticAttribute);
TestObjV8Internal::deprecatedStaticAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void deprecatedReadonlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2588,8 +2718,10 @@
static void deprecatedAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute);
TestObjV8Internal::deprecatedAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void TestObjConstructorGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -2621,7 +2753,9 @@
static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::voidMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2641,7 +2775,9 @@
static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::voidMethodWithArgsMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2653,7 +2789,9 @@
static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::longMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2672,7 +2810,9 @@
static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::longMethodWithArgsMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2684,8 +2824,10 @@
static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::objMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2704,7 +2846,9 @@
static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::objMethodWithArgsMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2722,7 +2866,9 @@
static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithSequenceArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2739,7 +2885,9 @@
static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodReturningSequenceMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2762,7 +2910,9 @@
static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnumArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2786,7 +2936,9 @@
static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2807,7 +2959,9 @@
static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::serializedValueMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2834,7 +2988,9 @@
static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::optionsObjectMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2852,18 +3008,24 @@
static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithExceptionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature);
V8TestObject::customMethodMethodCustom(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8TestObject::customMethodWithArgsMethodCustom(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2878,7 +3040,9 @@
static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::addEventListenerMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2893,7 +3057,9 @@
static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::removeEventListenerMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2916,7 +3082,9 @@
static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateVoidMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2939,7 +3107,9 @@
static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateObjMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2967,7 +3137,9 @@
static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateVoidExceptionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -2995,7 +3167,9 @@
static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptStateObjExceptionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3009,7 +3183,9 @@
static void withScriptExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3033,7 +3209,9 @@
static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3062,7 +3240,9 @@
static void withScriptExecutionContextAndScriptStateObjExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withScriptExecutionContextAndScriptStateWithSpacesMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3086,7 +3266,9 @@
static void withScriptExecutionContextAndScriptStateWithSpacesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3099,7 +3281,9 @@
static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3118,7 +3302,9 @@
static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithOptionalArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3142,7 +3328,9 @@
static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3172,7 +3360,9 @@
static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3191,7 +3381,9 @@
static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithOptionalStringMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3205,7 +3397,9 @@
static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3219,7 +3413,9 @@
static void methodWithOptionalStringIsNullStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3241,7 +3437,9 @@
static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithCallbackArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3264,7 +3462,9 @@
static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3285,7 +3485,9 @@
static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3305,7 +3507,9 @@
static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3326,7 +3530,9 @@
static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::staticMethodWithCallbackArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3344,7 +3550,9 @@
static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt8Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3362,7 +3570,9 @@
static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt8Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3380,7 +3590,9 @@
static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt32Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3398,7 +3610,9 @@
static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt32Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3416,7 +3630,9 @@
static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt64Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3434,7 +3650,9 @@
static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt64Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#if ENABLE(Condition1)
@@ -3452,7 +3670,9 @@
static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1)
@@ -3473,7 +3693,9 @@
static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalMethod2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
@@ -3494,7 +3716,9 @@
static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::conditionalMethod3Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
@@ -3508,7 +3732,9 @@
static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::callbackFunctionReturnValueMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3526,7 +3752,9 @@
static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::callbackFunctionArgumentMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3738,7 +3966,9 @@
static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::overloadedMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3750,7 +3980,9 @@
static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::classMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3766,12 +3998,16 @@
static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::classMethodWithOptionalMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8TestObject::classMethod2MethodCustom(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#if ENABLE(Condition1)
@@ -3831,7 +4067,9 @@
static void overloadedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::overloadedMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
#endif // ENABLE(Condition1)
@@ -3858,7 +4096,9 @@
static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::classMethodWithClampMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledAtRuntimeMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3876,7 +4116,9 @@
static void enabledAtRuntimeMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledAtRuntimeMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledAtRuntimeMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3894,7 +4136,9 @@
static void enabledAtRuntimeMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledAtRuntimeMethod2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledPerContextMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3912,7 +4156,9 @@
static void enabledPerContextMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledPerContextMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void enabledPerContextMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3930,7 +4176,9 @@
static void enabledPerContextMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::enabledPerContextMethod2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3948,7 +4196,9 @@
static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3971,7 +4221,9 @@
static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::stringArrayFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -3994,7 +4246,9 @@
static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::domStringListFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4016,7 +4270,9 @@
static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::getSVGDocumentMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4034,7 +4290,9 @@
static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::convert1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4052,7 +4310,9 @@
static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::convert2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4070,7 +4330,9 @@
static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::convert4Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4088,7 +4350,9 @@
static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::convert5Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4100,7 +4364,9 @@
static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::mutablePointFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4112,7 +4378,9 @@
static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::immutablePointFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4125,7 +4393,9 @@
static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::orangeMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4150,7 +4420,9 @@
static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::strictFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4169,7 +4441,9 @@
static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::variadicStringMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4188,7 +4462,9 @@
static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::variadicDoubleMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4214,7 +4490,9 @@
static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestObjV8Internal::variadicNodeMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4356,12 +4634,14 @@
static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.activityLoggedMethod1", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::activityLoggedMethod1Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4569,8 +4849,10 @@
static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method);
TestObjV8Internal::deprecatedMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4582,8 +4864,10 @@
static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticMethod);
TestObjV8Internal::deprecatedStaticMethodMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -4605,6 +4889,93 @@
args.GetReturnValue().Set(wrapper);
}
+static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
+ TestObj* collection = V8TestObject::toNative(info.Holder());
+ RefPtr<Node> element = collection->item(index);
+ if (!element)
+ return;
+ v8SetReturnValue(info, toV8Fast(element.release(), info, collection));
+}
+
+static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMIndexedProperty");
+ TestObjV8Internal::indexedPropertyGetter(index, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
+ return;
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return;
+ if (info.Holder()->HasRealNamedProperty(name))
+ return;
+
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
+ TestObj* collection = V8TestObject::toNative(info.Holder());
+ AtomicString propertyName = toWebCoreAtomicString(name);
+ String element = collection->namedItem(propertyName);
+ if (element.isNull())
+ return;
+ v8SetReturnValue(info, v8String(element, info.GetIsolate()));
+}
+
+static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestObjV8Internal::namedPropertyGetter(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ ExceptionCode ec = 0;
+ TestObj* collection = V8TestObject::toNative(info.Holder());
+ Vector<String> names;
+ collection->namedPropertyEnumerator(names, ec);
+ if (ec) {
+ setDOMException(ec, info.GetIsolate());
+ return;
+ }
+ v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
+ for (size_t i = 0; i < names.size(); ++i)
+ v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
+ v8SetReturnValue(info, v8names);
+}
+
+static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TestObj* collection = V8TestObject::toNative(info.Holder());
+ AtomicString propertyName = toWebCoreAtomicString(name);
+ ExceptionCode ec = 0;
+ bool result = collection->namedPropertyQuery(propertyName, ec);
+ if (ec) {
+ setDOMException(ec, info.GetIsolate());
+ return;
+ }
+ if (!result)
+ return;
+ v8SetReturnValueInt(info, v8::None);
+}
+
+static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestObjV8Internal::namedPropertyEnumerator(info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
+static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
+{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMNamedProperty");
+ TestObjV8Internal::namedPropertyQuery(name, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
+}
+
} // namespace TestObjV8Internal
static const V8DOMConfiguration::BatchedAttribute V8TestObjectAttrs[] = {
@@ -4912,6 +5283,7 @@
void V8TestObject::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -4925,65 +5297,6 @@
TestObjV8Internal::constructor(args);
}
-void V8TestObject::indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- TestObj* collection = toNative(info.Holder());
- RefPtr<Node> element = collection->item(index);
- if (!element)
- return;
- v8SetReturnValue(info, toV8Fast(element.release(), info, collection));
-}
-
-void V8TestObject::namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
- return;
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return;
- if (info.Holder()->HasRealNamedProperty(name))
- return;
-
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- TestObj* collection = toNative(info.Holder());
- AtomicString propertyName = toWebCoreAtomicString(name);
- String element = collection->namedItem(propertyName);
- if (element.isNull())
- return;
- v8SetReturnValue(info, v8String(element, info.GetIsolate()));
-}
-
-void V8TestObject::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
-{
- ExceptionCode ec = 0;
- TestObj* collection = toNative(info.Holder());
- Vector<String> names;
- collection->namedPropertyEnumerator(names, ec);
- if (ec) {
- setDOMException(ec, info.GetIsolate());
- return;
- }
- v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
- for (size_t i = 0; i < names.size(); ++i)
- v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
- v8SetReturnValue(info, v8names);
-}
-
-void V8TestObject::namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
-{
- TestObj* collection = toNative(info.Holder());
- AtomicString propertyName = toWebCoreAtomicString(name);
- ExceptionCode ec = 0;
- bool result = collection->namedPropertyQuery(propertyName, ec);
- if (ec) {
- setDOMException(ec, info.GetIsolate());
- return;
- }
- if (!result)
- return;
- v8SetReturnValueInt(info, v8::None);
-}
-
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
desc->ReadOnlyPrototype();
@@ -5011,8 +5324,8 @@
{"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterCallback, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
}
- desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestObject::indexedPropertyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestObj>);
- desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestObject::namedPropertyGetter, 0, V8TestObject::namedPropertyQuery, 0, V8TestObject::namedPropertyEnumerator);
+ desc->InstanceTemplate()->SetIndexedPropertyHandler(TestObjV8Internal::indexedPropertyGetterCallback, 0, 0, 0, indexedPropertyEnumerator<TestObj>);
+ desc->InstanceTemplate()->SetNamedPropertyHandler(TestObjV8Internal::namedPropertyGetterCallback, 0, TestObjV8Internal::namedPropertyQueryCallback, 0, TestObjV8Internal::namedPropertyEnumeratorCallback);
// Custom Signature 'voidMethodWithArgs'
const int voidMethodWithArgsArgc = 3;
@@ -5100,6 +5413,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestObjectTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestObject.h b/Source/bindings/tests/results/V8TestObject.h
index 659a0b6..3318c34 100644
--- a/Source/bindings/tests/results/V8TestObject.h
+++ b/Source/bindings/tests/results/V8TestObject.h
@@ -45,10 +45,6 @@
static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static void customAttrAttrGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>&);
static void customAttrAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
- static void indexedPropertyGetter(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertyGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&);
- static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>&);
- static void namedPropertyQuery(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8::Isolate*);
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*);
@@ -102,7 +98,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestObj* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -114,7 +110,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp b/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
index 5408760..61bee8b 100644
--- a/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
+++ b/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
@@ -34,6 +34,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -138,6 +139,7 @@
void V8TestOverloadedConstructors::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -175,6 +177,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestOverloadedConstructorsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestOverloadedConstructors.h b/Source/bindings/tests/results/V8TestOverloadedConstructors.h
index baeedf0..8e0e261 100644
--- a/Source/bindings/tests/results/V8TestOverloadedConstructors.h
+++ b/Source/bindings/tests/results/V8TestOverloadedConstructors.h
@@ -93,7 +93,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestOverloadedConstructors* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -105,7 +105,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.cpp b/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.cpp
index 20d7f5c..c306dd9 100644
--- a/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.cpp
+++ b/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.cpp
@@ -32,6 +32,7 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -65,7 +66,7 @@
static void valueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
- v8SetReturnValue(info, imp->value() ? imp->value()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate())));
+ v8SetReturnValue(info, imp->value() ? imp->value()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
return;
}
@@ -84,13 +85,15 @@
static void valueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestSerializedScriptValueInterfaceV8Internal::valueAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void readonlyValueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
- v8SetReturnValue(info, imp->readonlyValue() ? imp->readonlyValue()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate())));
+ v8SetReturnValue(info, imp->readonlyValue() ? imp->readonlyValue()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
return;
}
@@ -109,7 +112,7 @@
}
TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
RefPtr<SerializedScriptValue> serialized = imp->cachedValue();
- value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
+ value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate()));
info.Holder()->SetHiddenValue(propertyName, value);
v8SetReturnValue(info, value);
return;
@@ -131,7 +134,9 @@
static void cachedValueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void cachedReadonlyValueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -144,7 +149,7 @@
}
TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
RefPtr<SerializedScriptValue> serialized = imp->cachedReadonlyValue();
- value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
+ value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate()));
info.Holder()->SetHiddenValue(propertyName, value);
v8SetReturnValue(info, value);
return;
@@ -190,6 +195,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestSerializedScriptValueInterfaceTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.h b/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.h
index 2caf3f0..fabbad3 100644
--- a/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.h
+++ b/Source/bindings/tests/results/V8TestSerializedScriptValueInterface.h
@@ -93,7 +93,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestSerializedScriptValueInterface* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -105,7 +105,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;
diff --git a/Source/bindings/tests/results/V8TestTypedefs.cpp b/Source/bindings/tests/results/V8TestTypedefs.cpp
index 8bd2da3..74bb4c2 100644
--- a/Source/bindings/tests/results/V8TestTypedefs.cpp
+++ b/Source/bindings/tests/results/V8TestTypedefs.cpp
@@ -37,6 +37,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
#include "wtf/UnusedParam.h"
@@ -90,13 +91,15 @@
static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void immutableSerializedScriptValueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- v8SetReturnValue(info, imp->immutableSerializedScriptValue() ? imp->immutableSerializedScriptValue()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate())));
+ v8SetReturnValue(info, imp->immutableSerializedScriptValue() ? imp->immutableSerializedScriptValue()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
return;
}
@@ -115,7 +118,9 @@
static void immutableSerializedScriptValueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -146,7 +151,9 @@
static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::attrWithGetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -174,7 +181,9 @@
static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -205,7 +214,9 @@
static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -233,7 +244,9 @@
static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void TestTypedefsConstructorGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -271,7 +284,9 @@
static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::funcMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void setShadowMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -303,7 +318,9 @@
static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::setShadowMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -320,7 +337,9 @@
static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::methodWithSequenceArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -338,7 +357,9 @@
static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::nullableArrayArgMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void funcWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -368,7 +389,9 @@
static void funcWithClampMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::funcWithClampMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -380,7 +403,9 @@
static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::immutablePointFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -403,7 +428,9 @@
static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::stringArrayFunctionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void stringArrayFunction2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -426,7 +453,9 @@
static void stringArrayFunction2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::stringArrayFunction2Method(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -444,7 +473,9 @@
static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TRACE_EVENT_SAMPLING_STATE0("Blink\0Blink-DOMMethod");
TestTypedefsV8Internal::methodWithExceptionMethod(args);
+ TRACE_EVENT_SAMPLING_STATE0("V8\0V8-Execution");
}
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -500,6 +531,7 @@
void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
+ TraceEvent::SamplingState0Scope("Blink\0Blink-DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
@@ -541,6 +573,7 @@
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
+ TraceEvent::SamplingState0Scope("Blink\0Blink-BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestTypedefsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
diff --git a/Source/bindings/tests/results/V8TestTypedefs.h b/Source/bindings/tests/results/V8TestTypedefs.h
index 120b7dd..fa32bbe 100644
--- a/Source/bindings/tests/results/V8TestTypedefs.h
+++ b/Source/bindings/tests/results/V8TestTypedefs.h
@@ -93,7 +93,7 @@
inline v8::Handle<v8::Value> toV8Fast(TestTypedefs* impl, const HolderContainer& container, Wrappable* wrappable)
{
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
if (!wrapper.IsEmpty())
return wrapper;
@@ -105,7 +105,7 @@
{
ASSERT(worldType(container.GetIsolate()) == MainWorld);
if (UNLIKELY(!impl))
- return v8Null(container.GetIsolate());
+ return v8::Null(container.GetIsolate());
v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
if (!wrapper.IsEmpty())
return wrapper;