Diff
Modified: trunk/Source/WebCore/ChangeLog (144037 => 144038)
--- trunk/Source/WebCore/ChangeLog 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/ChangeLog 2013-02-26 12:33:03 UTC (rev 144038)
@@ -1,3 +1,47 @@
+2013-02-26 Kentaro Hara <hara...@chromium.org>
+
+ [V8] Rename BatchedCallback to BatchedMethod
+ https://bugs.webkit.org/show_bug.cgi?id=110791
+
+ Reviewed by Adam Barth.
+
+ Now 'Callback' is used to refer to functions that are called back
+ by V8. DOM methods should be referred to as 'Method's.
+
+ No tests. No change in behavior.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateImplementation):
+ * bindings/scripts/test/V8/V8Float64Array.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8Float64ArrayTemplate):
+ * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
+ * bindings/scripts/test/V8/V8TestEventTarget.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestEventTargetTemplate):
+ * bindings/scripts/test/V8/V8TestInterface.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestInterfaceTemplate):
+ * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestObjTemplate):
+ * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
+ * bindings/scripts/test/V8/V8TestTypedefs.cpp:
+ (WebCore):
+ (WebCore::ConfigureV8TestTypedefsTemplate):
+ * bindings/v8/V8DOMConfiguration.cpp:
+ (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
+ (WebCore::V8DOMConfiguration::configureTemplate):
+ * bindings/v8/V8DOMConfiguration.h:
+ (V8DOMConfiguration):
+
2013-02-26 Takashi Toyoshima <toyos...@chromium.org>
Add User-Agent header in opening handshake headers.
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 12:33:03 UTC (rev 144038)
@@ -2888,7 +2888,7 @@
next if !IsStandardFunction($interface, $function);
if (!$has_callbacks) {
$has_callbacks = 1;
- push(@implContent, "static const V8DOMConfiguration::BatchedCallback ${v8InterfaceName}Callbacks[] = {\n");
+ push(@implContent, "static const V8DOMConfiguration::BatchedMethod ${v8InterfaceName}Methods[] = {\n");
}
my $name = $function->signature->name;
my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
@@ -3012,7 +3012,7 @@
if ($has_callbacks) {
push(@implContent, <<END);
- ${v8InterfaceName}Callbacks, WTF_ARRAY_LENGTH(${v8InterfaceName}Callbacks), isolate);
+ ${v8InterfaceName}Methods, WTF_ARRAY_LENGTH(${v8InterfaceName}Methods), isolate);
END
} else {
push(@implContent, <<END);
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -120,7 +120,7 @@
return wrapper;
}
-static const V8DOMConfiguration::BatchedCallback V8Float64ArrayCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8Float64ArrayMethods[] = {
{"set", Float64ArrayV8Internal::setMethodCallback},
};
@@ -142,7 +142,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Float64Array", V8ArrayBufferView::GetTemplate(isolate), V8Float64Array::internalFieldCount,
0, 0,
- V8Float64ArrayCallbacks, WTF_ARRAY_LENGTH(V8Float64ArrayCallbacks), isolate);
+ V8Float64ArrayMethods, WTF_ARRAY_LENGTH(V8Float64ArrayMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
desc->SetCallHandler(V8Float64Array::constructorCallback);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -87,7 +87,7 @@
} // namespace TestCustomNamedGetterV8Internal
-static const V8DOMConfiguration::BatchedCallback V8TestCustomNamedGetterCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestCustomNamedGetterMethods[] = {
{"anotherFunction", TestCustomNamedGetterV8Internal::anotherFunctionMethodCallback},
};
@@ -98,7 +98,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestCustomNamedGetter", v8::Persistent<v8::FunctionTemplate>(), V8TestCustomNamedGetter::internalFieldCount,
0, 0,
- V8TestCustomNamedGetterCallbacks, WTF_ARRAY_LENGTH(V8TestCustomNamedGetterCallbacks), isolate);
+ V8TestCustomNamedGetterMethods, WTF_ARRAY_LENGTH(V8TestCustomNamedGetterMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -153,7 +153,7 @@
} // namespace TestEventTargetV8Internal
-static const V8DOMConfiguration::BatchedCallback V8TestEventTargetCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
{"item", TestEventTargetV8Internal::itemMethodCallback},
{"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallback},
{"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback},
@@ -166,7 +166,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTarget", v8::Persistent<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCount,
0, 0,
- V8TestEventTargetCallbacks, WTF_ARRAY_LENGTH(V8TestEventTargetCallbacks), isolate);
+ V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -381,7 +381,7 @@
#endif // ENABLE(Condition11) || ENABLE(Condition12)
};
-static const V8DOMConfiguration::BatchedCallback V8TestInterfaceCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
#if ENABLE(Condition11) || ENABLE(Condition12)
{"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback},
#endif
@@ -425,7 +425,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount,
V8TestInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestInterfaceAttrs),
- V8TestInterfaceCallbacks, WTF_ARRAY_LENGTH(V8TestInterfaceCallbacks), isolate);
+ V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
#if ENABLE(TEST_INTERFACE)
desc->SetCallHandler(V8TestInterface::constructorCallback);
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -88,7 +88,7 @@
} // namespace TestMediaQueryListListenerV8Internal
-static const V8DOMConfiguration::BatchedCallback V8TestMediaQueryListListenerCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestMediaQueryListListenerMethods[] = {
{"method", TestMediaQueryListListenerV8Internal::methodMethodCallback},
};
@@ -99,7 +99,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestMediaQueryListListener", v8::Persistent<v8::FunctionTemplate>(), V8TestMediaQueryListListener::internalFieldCount,
0, 0,
- V8TestMediaQueryListListenerCallbacks, WTF_ARRAY_LENGTH(V8TestMediaQueryListListenerCallbacks), isolate);
+ V8TestMediaQueryListListenerMethods, WTF_ARRAY_LENGTH(V8TestMediaQueryListListenerMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -2898,7 +2898,7 @@
{"replaceableAttribute", TestObjV8Internal::replaceableAttributeAttrGetterCallback, TestObjV8Internal::TestObjReplaceableAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};
-static const V8DOMConfiguration::BatchedCallback V8TestObjCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestObjMethods[] = {
{"voidMethod", TestObjV8Internal::voidMethodMethodCallback},
{"longMethod", TestObjV8Internal::longMethodMethodCallback},
{"objMethod", TestObjV8Internal::objMethodMethodCallback},
@@ -3001,7 +3001,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject", v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount,
V8TestObjAttrs, WTF_ARRAY_LENGTH(V8TestObjAttrs),
- V8TestObjCallbacks, WTF_ARRAY_LENGTH(V8TestObjCallbacks), isolate);
+ V8TestObjMethods, WTF_ARRAY_LENGTH(V8TestObjMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
desc->SetCallHandler(V8TestObj::constructorCallback);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -292,7 +292,7 @@
{"cachedReadonlyValue", TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterCallback, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};
-static const V8DOMConfiguration::BatchedCallback V8TestSerializedScriptValueInterfaceCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestSerializedScriptValueInterfaceMethods[] = {
{"acceptTransferList", TestSerializedScriptValueInterfaceV8Internal::acceptTransferListMethodCallback},
{"multiTransferList", TestSerializedScriptValueInterfaceV8Internal::multiTransferListMethodCallback},
};
@@ -315,7 +315,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestSerializedScriptValueInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestSerializedScriptValueInterface::internalFieldCount,
V8TestSerializedScriptValueInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceAttrs),
- V8TestSerializedScriptValueInterfaceCallbacks, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceCallbacks), isolate);
+ V8TestSerializedScriptValueInterfaceMethods, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
desc->SetCallHandler(V8TestSerializedScriptValueInterface::constructorCallback);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -508,7 +508,7 @@
{"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};
-static const V8DOMConfiguration::BatchedCallback V8TestTypedefsCallbacks[] = {
+static const V8DOMConfiguration::BatchedMethod V8TestTypedefsMethods[] = {
{"func", TestTypedefsV8Internal::funcMethodCallback},
{"multiTransferList", TestTypedefsV8Internal::multiTransferListMethodCallback},
{"setShadow", TestTypedefsV8Internal::setShadowMethodCallback},
@@ -535,7 +535,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestTypedefs", v8::Persistent<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount,
V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs),
- V8TestTypedefsCallbacks, WTF_ARRAY_LENGTH(V8TestTypedefsCallbacks), isolate);
+ V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), isolate);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
desc->SetCallHandler(V8TestTypedefs::constructorCallback);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
Modified: trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp (144037 => 144038)
--- trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp 2013-02-26 12:33:03 UTC (rev 144038)
@@ -50,14 +50,14 @@
}
}
-void V8DOMConfiguration::batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate> prototype, v8::Handle<v8::Signature> signature, v8::PropertyAttribute attributes, const BatchedCallback* callbacks, size_t callbackCount, v8::Isolate*)
+void V8DOMConfiguration::batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate> prototype, v8::Handle<v8::Signature> signature, v8::PropertyAttribute attributes, const BatchedMethod* callbacks, size_t callbackCount, v8::Isolate*)
{
for (size_t i = 0; i < callbackCount; ++i)
prototype->Set(v8::String::NewSymbol(callbacks[i].name), v8::FunctionTemplate::New(callbacks[i].callback, v8Undefined(), signature), attributes);
}
v8::Local<v8::Signature> V8DOMConfiguration::configureTemplate(v8::Persistent<v8::FunctionTemplate> functionDescriptor, const char* interfaceName, v8::Persistent<v8::FunctionTemplate> parentClass,
- size_t fieldCount, const BatchedAttribute* attributes, size_t attributeCount, const BatchedCallback* callbacks, size_t callbackCount, v8::Isolate* isolate)
+ size_t fieldCount, const BatchedAttribute* attributes, size_t attributeCount, const BatchedMethod* callbacks, size_t callbackCount, v8::Isolate* isolate)
{
functionDescriptor->SetClassName(v8::String::NewSymbol(interfaceName));
v8::Local<v8::ObjectTemplate> instance = functionDescriptor->InstanceTemplate();
Modified: trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h (144037 => 144038)
--- trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h 2013-02-26 12:01:24 UTC (rev 144037)
+++ trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h 2013-02-26 12:33:03 UTC (rev 144038)
@@ -76,15 +76,15 @@
static void batchConfigureConstants(v8::Handle<v8::FunctionTemplate>, v8::Handle<v8::ObjectTemplate>, const BatchedConstant*, size_t constantCount, v8::Isolate*);
- // BatchedCallback translates into calls to Set() on the prototype ObjectTemplate.
- struct BatchedCallback {
+ // BatchedMethod translates into calls to Set() on the prototype ObjectTemplate.
+ struct BatchedMethod {
const char* const name;
v8::InvocationCallback callback;
};
- static void batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const BatchedCallback*, size_t callbackCount, v8::Isolate*);
+ static void batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const BatchedMethod*, size_t callbackCount, v8::Isolate*);
- static v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>, const char* interfaceName, v8::Persistent<v8::FunctionTemplate> parentClass, size_t fieldCount, const BatchedAttribute*, size_t attributeCount, const BatchedCallback*, size_t callbackCount, v8::Isolate*);
+ static v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>, const char* interfaceName, v8::Persistent<v8::FunctionTemplate> parentClass, size_t fieldCount, const BatchedAttribute*, size_t attributeCount, const BatchedMethod*, size_t callbackCount, v8::Isolate*);
};
} // namespace WebCore