Diff
Modified: trunk/Source/WebCore/ChangeLog (141510 => 141511)
--- trunk/Source/WebCore/ChangeLog 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/ChangeLog 2013-02-01 01:21:56 UTC (rev 141511)
@@ -1,5 +1,30 @@
2013-01-31 Kentaro Hara <[email protected]>
+ [V8] Pass an Isolate to GetTemplate() in CodeGeneratorV8.pm
+ https://bugs.webkit.org/show_bug.cgi?id=108445
+
+ Reviewed by Adam Barth.
+
+ No tests. No change in behavior.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateDomainSafeFunctionGetter):
+ (GenerateDomainSafeFunctionSetter):
+ (GenerateNormalAttrGetter):
+ (GenerateNamedConstructorCallback):
+ (GenerateImplementation):
+ * bindings/scripts/test/V8/V8Float64Array.cpp:
+ (WebCore::ConfigureV8Float64ArrayTemplate):
+ * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
+ (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
+ (WebCore::TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter):
+ * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
+ (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
+ * bindings/scripts/test/V8/V8TestNode.cpp:
+ (WebCore::ConfigureV8TestNodeTemplate):
+
+2013-01-31 Kentaro Hara <[email protected]>
+
[V8] Clean up Dictionary::get() by removing redundant FindInstanceInPrototypeChain()
https://bugs.webkit.org/show_bug.cgi?id=108443
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141510 => 141511)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:21:56 UTC (rev 141511)
@@ -785,7 +785,7 @@
static v8::Handle<v8::Value> ${funcName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New($newTemplateString);
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate());
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate()));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -815,7 +815,7 @@
push(@implContentDecls, <<END);
static void ${interfaceName}DomainSafeFunctionSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate());
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate()));
if (holder.IsEmpty())
return;
${interfaceName}* imp = ${v8InterfaceName}::toNative(holder);
@@ -909,7 +909,7 @@
} else {
# perform lookup first
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate());
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate()));
if (holder.IsEmpty())
return v8Undefined();
END
@@ -2198,7 +2198,7 @@
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
instance->SetInternalFieldCount(${v8InterfaceName}::internalFieldCount);
result->SetClassName(v8::String::NewSymbol("${interfaceName}"));
- result->Inherit(${v8InterfaceName}::GetTemplate());
+ result->Inherit(${v8InterfaceName}::GetTemplate(isolate));
cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(result);
return cachedTemplate;
@@ -2648,7 +2648,7 @@
my $parent = $_;
AddToImplIncludes("V8${parent}.h");
$parentClass = "V8" . $parent;
- $parentClassTemplate = $parentClass . "::GetTemplate()";
+ $parentClassTemplate = $parentClass . "::GetTemplate(isolate)";
last;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp (141510 => 141511)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp 2013-02-01 01:21:56 UTC (rev 141511)
@@ -110,7 +110,7 @@
desc->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Float64Array", V8ArrayBufferView::GetTemplate(), V8Float64Array::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Float64Array", V8ArrayBufferView::GetTemplate(isolate), V8Float64Array::internalFieldCount,
0, 0,
V8Float64ArrayCallbacks, WTF_ARRAY_LENGTH(V8Float64ArrayCallbacks));
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp (141510 => 141511)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-02-01 01:21:56 UTC (rev 141511)
@@ -93,7 +93,7 @@
static v8::Handle<v8::Value> postMessageAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::postMessageCallback, v8Undefined(), v8::Signature::New(V8TestActiveDOMObject::GetRawTemplate(info.GetIsolate()))));
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate());
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate(info.GetIsolate()));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -114,7 +114,7 @@
static void TestActiveDOMObjectDomainSafeFunctionSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate());
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate(info.GetIsolate()));
if (holder.IsEmpty())
return;
TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(holder);
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp (141510 => 141511)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2013-02-01 01:21:56 UTC (rev 141511)
@@ -112,7 +112,7 @@
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
instance->SetInternalFieldCount(V8TestNamedConstructor::internalFieldCount);
result->SetClassName(v8::String::NewSymbol("TestNamedConstructor"));
- result->Inherit(V8TestNamedConstructor::GetTemplate());
+ result->Inherit(V8TestNamedConstructor::GetTemplate(isolate));
cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(result);
return cachedTemplate;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp (141510 => 141511)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp 2013-02-01 01:16:02 UTC (rev 141510)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp 2013-02-01 01:21:56 UTC (rev 141511)
@@ -84,7 +84,7 @@
desc->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V8Node::GetTemplate(), V8TestNode::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V8Node::GetTemplate(isolate), V8TestNode::internalFieldCount,
0, 0,
0, 0);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.