Diff
Modified: trunk/Source/WebCore/ChangeLog (145501 => 145502)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 09:11:24 UTC (rev 145502)
@@ -1,3 +1,24 @@
+2013-03-12 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r145494.
+ http://trac.webkit.org/changeset/145494
+ https://bugs.webkit.org/show_bug.cgi?id=112117
+
+ Breaks Chromium Mac (Requested by pfeldman on #webkit).
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateDomainSafeFunctionGetter):
+ * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
+ (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
+ * bindings/v8/V8PerIsolateData.cpp:
+ (WebCore::V8PerIsolateData::V8PerIsolateData):
+ * bindings/v8/V8PerIsolateData.h:
+ (V8PerIsolateData):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::V8Location::reloadAttrGetterCustom):
+ (WebCore::V8Location::replaceAttrGetterCustom):
+ (WebCore::V8Location::assignAttrGetterCustom):
+
2013-03-12 Yury Semikhatsky <yu...@chromium.org>
Web Inspector: add memory instrumentation for ImageLoader
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (145501 => 145502)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-12 09:11:24 UTC (rev 145502)
@@ -786,18 +786,14 @@
$signature = "v8::Local<v8::Signature>()";
}
- my $newTemplateParams = "${interfaceName}V8Internal::${funcName}MethodCallback, v8Undefined(), $signature";
+ my $newTemplateString = "v8::FunctionTemplate::New(${interfaceName}V8Internal::${funcName}MethodCallback, v8Undefined(), $signature)";
AddToImplIncludes("Frame.h");
push(@implContentInternals, <<END);
static v8::Handle<v8::Value> ${funcName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- // This is only for getting a unique pointer which we can pass to privateTemplate.
- static String privateTemplateUniqueKey = "${funcName}PrivateTemplate";
- WrapperWorldType currentWorldType = worldType(info.GetIsolate());
- v8::Persistent<v8::FunctionTemplate> privateTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &privateTemplateUniqueKey, $newTemplateParams);
-
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate(), currentWorldType));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(info.GetIsolate(), $newTemplateString);
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -805,8 +801,7 @@
}
${interfaceName}* imp = ${v8InterfaceName}::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError)) {
- static String sharedTemplateUniqueKey = "${funcName}SharedTemplate";
- v8::Persistent<v8::FunctionTemplate> sharedTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, $newTemplateParams);
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(info.GetIsolate(), $newTemplateString);
return sharedTemplate->GetFunction();
}
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp (145501 => 145502)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-03-12 09:11:24 UTC (rev 145502)
@@ -128,12 +128,8 @@
static v8::Handle<v8::Value> postMessageAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- // This is only for getting a unique pointer which we can pass to privateTemplate.
- static String privateTemplateUniqueKey = "postMessagePrivateTemplate";
- WrapperWorldType currentWorldType = worldType(info.GetIsolate());
- v8::Persistent<v8::FunctionTemplate> privateTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8TestActiveDOMObject::GetRawTemplate(info.GetIsolate())));
-
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate(info.GetIsolate(), currentWorldType));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(info.GetIsolate(), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8TestActiveDOMObject::GetRawTemplate(info.GetIsolate()))));
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -141,8 +137,7 @@
}
TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError)) {
- static String sharedTemplateUniqueKey = "postMessageSharedTemplate";
- v8::Persistent<v8::FunctionTemplate> sharedTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8TestActiveDOMObject::GetRawTemplate(info.GetIsolate())));
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(info.GetIsolate(), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8TestActiveDOMObject::GetRawTemplate(info.GetIsolate()))));
return sharedTemplate->GetFunction();
}
Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp (145501 => 145502)
--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp 2013-03-12 09:11:24 UTC (rev 145502)
@@ -44,8 +44,7 @@
namespace WebCore {
V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate)
- : m_isolate(isolate)
- , m_stringCache(adoptPtr(new StringCache()))
+ : m_stringCache(adoptPtr(new StringCache()))
, m_integerCache(adoptPtr(new IntegerCache()))
, m_domDataStore(0)
, m_hiddenPropertyName(adoptPtr(new V8HiddenPropertyName()))
@@ -122,17 +121,6 @@
info.ignoreMember(m_auxiliaryContext);
}
-v8::Persistent<v8::FunctionTemplate> V8PerIsolateData::privateTemplate(WrapperWorldType, void* privatePointer, v8::InvocationCallback callback, v8::Handle<v8::Value> data, v8::Handle<v8::Signature> signature, int length)
-{
- v8::Persistent<v8::FunctionTemplate> privateTemplate;
- V8PerIsolateData::TemplateMap::iterator result = m_templates.find(privatePointer);
- if (result != m_templates.end())
- return result->value;
- v8::Persistent<v8::FunctionTemplate> newPrivateTemplate = v8::Persistent<v8::FunctionTemplate>::New(m_isolate, v8::FunctionTemplate::New(callback, data, signature, length));
- m_templates.add(privatePointer, newPrivateTemplate);
- return newPrivateTemplate;
-}
-
#if ENABLE(INSPECTOR)
void V8PerIsolateData::visitExternalStrings(ExternalStringVisitor* visitor)
{
Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h (145501 => 145502)
--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.h 2013-03-12 09:11:24 UTC (rev 145502)
@@ -27,7 +27,6 @@
#define V8PerIsolateData_h
#include "ScopedPersistent.h"
-#include "WrapperTypeInfo.h"
#include <v8.h>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
@@ -65,7 +64,7 @@
}
static void dispose(v8::Isolate*);
- typedef HashMap<void*, v8::Persistent<v8::FunctionTemplate> > TemplateMap;
+ typedef HashMap<WrapperTypeInfo*, v8::Persistent<v8::FunctionTemplate> > TemplateMap;
TemplateMap& rawTemplateMap() { return m_rawTemplates; }
TemplateMap& templateMap() { return m_templates; }
@@ -128,14 +127,11 @@
void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; }
bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; }
- v8::Persistent<v8::FunctionTemplate> privateTemplate(WrapperWorldType, void* privatePointer, v8::InvocationCallback, v8::Handle<v8::Value> data, v8::Handle<v8::Signature>, int length = 0);
-
private:
explicit V8PerIsolateData(v8::Isolate*);
~V8PerIsolateData();
static v8::Handle<v8::Value> constructorOfToString(const v8::Arguments&);
- v8::Isolate* m_isolate;
TemplateMap m_rawTemplates;
TemplateMap m_templates;
ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp (145501 => 145502)
--- trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp 2013-03-12 09:00:25 UTC (rev 145501)
+++ trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp 2013-03-12 09:11:24 UTC (rev 145502)
@@ -139,12 +139,8 @@
v8::Handle<v8::Value> V8Location::reloadAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Isolate* isolate = info.GetIsolate();
- // This is only for getting a unique pointer which we can pass to privateTemplate.
- static String privateTemplateUniqueKey = "reloadPrivateTemplate";
- WrapperWorldType currentWorldType = worldType(isolate);
- v8::Persistent<v8::FunctionTemplate> privateTemplate = V8PerIsolateData::from(isolate)->privateTemplate(currentWorldType, &privateTemplateUniqueKey, V8Location::reloadMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
-
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, currentWorldType));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::reloadMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, worldType(isolate)));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -152,8 +148,7 @@
}
Location* imp = V8Location::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError)) {
- static String sharedTemplateUniqueKey = "reloadSharedTemplate";
- v8::Persistent<v8::FunctionTemplate> sharedTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, V8Location::reloadMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::reloadMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
return sharedTemplate->GetFunction();
}
return privateTemplate->GetFunction();
@@ -162,12 +157,8 @@
v8::Handle<v8::Value> V8Location::replaceAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Isolate* isolate = info.GetIsolate();
- // This is only for getting a unique pointer which we can pass to privateTemplateMap.
- static String privateTemplateUniqueKey = "replacePrivateTemplate";
- WrapperWorldType currentWorldType = worldType(info.GetIsolate());
- v8::Persistent<v8::FunctionTemplate> privateTemplate = V8PerIsolateData::from(isolate)->privateTemplate(currentWorldType, &privateTemplateUniqueKey, V8Location::replaceMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
-
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, currentWorldType));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::replaceMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, worldType(isolate)));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -175,8 +166,7 @@
}
Location* imp = V8Location::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError)) {
- static String sharedTemplateUniqueKey = "replaceSharedTemplate";
- v8::Persistent<v8::FunctionTemplate> sharedTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, V8Location::replaceMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::replaceMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
return sharedTemplate->GetFunction();
}
return privateTemplate->GetFunction();
@@ -185,12 +175,9 @@
v8::Handle<v8::Value> V8Location::assignAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Isolate* isolate = info.GetIsolate();
- // This is only for getting a unique pointer which we can pass to privateTemplateMap.
- static String privateTemplateUniqueKey = "assignPrivateTemplate";
- WrapperWorldType currentWorldType = worldType(info.GetIsolate());
- v8::Persistent<v8::FunctionTemplate> privateTemplate = V8PerIsolateData::from(isolate)->privateTemplate(currentWorldType, &privateTemplateUniqueKey, V8Location::assignMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
-
- v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, currentWorldType));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate =
+ v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::assignMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
+ v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8Location::GetTemplate(isolate, worldType(isolate)));
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
@@ -198,8 +185,7 @@
}
Location* imp = V8Location::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError)) {
- static String sharedTemplateUniqueKey = "assignSharedTemplate";
- v8::Persistent<v8::FunctionTemplate> sharedTemplate = V8PerIsolateData::from(info.GetIsolate())->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, V8Location::assignMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate)));
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, v8::FunctionTemplate::New(V8Location::assignMethodCustom, v8Undefined(), v8::Signature::New(V8Location::GetRawTemplate(isolate))));
return sharedTemplate->GetFunction();
}
return privateTemplate->GetFunction();