Diff
Modified: trunk/Source/WebCore/ChangeLog (115365 => 115366)
--- trunk/Source/WebCore/ChangeLog 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/ChangeLog 2012-04-26 21:25:02 UTC (rev 115366)
@@ -1,3 +1,46 @@
+2012-04-26 Kentaro Hara <[email protected]>
+
+ [V8] Pass Isolate to wrap() (Part1)
+ https://bugs.webkit.org/show_bug.cgi?id=84921
+
+ Reviewed by Nate Chapin.
+
+ The objective is to pass Isolate around in V8 bindings.
+ This patch passes Isolate to wrap() in custom bindings.
+
+ No tests. No change in behavior.
+
+ * bindings/v8/custom/V8BlobCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8CSSRuleCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8CSSValueCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8DOMStringMapCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8DOMTokenListCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8DataViewCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8EventCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8Float32ArrayCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8Float64ArrayCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8ImageDataCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8Int16ArrayCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8Int32ArrayCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8Int8ArrayCustom.cpp:
+ (WebCore::toV8):
+
2012-04-26 Benjamin Poulain <[email protected]>
ObjcClass::methodsNamed() can leak if buffer is dynamically allocated
Modified: trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -46,7 +46,7 @@
if (impl->isFile())
return toV8(static_cast<File*>(impl), isolate);
- return V8Blob::wrap(impl);
+ return V8Blob::wrap(impl, isolate);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -52,7 +52,7 @@
// CSSUnknownRule.idl is explicitly excluded as it doesn't add anything
// over CSSRule.idl (see WebCore.gyp/WebCore.gyp: 'bindings_idl_files').
// -> Use the base class wrapper here.
- return V8CSSRule::wrap(impl);
+ return V8CSSRule::wrap(impl, isolate);
case CSSRule::STYLE_RULE:
return toV8(static_cast<CSSStyleRule*>(impl), isolate);
case CSSRule::CHARSET_RULE:
@@ -72,7 +72,7 @@
case CSSRule::WEBKIT_REGION_RULE:
return toV8(static_cast<WebKitCSSRegionRule*>(impl), isolate);
}
- return V8CSSRule::wrap(impl);
+ return V8CSSRule::wrap(impl, isolate);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleSheetCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleSheetCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleSheetCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -40,7 +40,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8CSSStyleSheet::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8CSSStyleSheet::wrap(impl, isolate);
// Add a hidden reference from stylesheet object to its owner node.
Node* ownerNode = impl->ownerNode();
if (ownerNode && !wrapper.IsEmpty())
Modified: trunk/Source/WebCore/bindings/v8/custom/V8CSSValueCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8CSSValueCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8CSSValueCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -58,7 +58,7 @@
if (impl->isSVGColor())
return toV8(static_cast<SVGColor*>(impl), isolate);
#endif
- return V8CSSValue::wrap(impl);
+ return V8CSSValue::wrap(impl, isolate);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -88,7 +88,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8DOMStringMap::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8DOMStringMap::wrap(impl, isolate);
// Add a hidden reference from the element to the DOMStringMap.
Element* element = impl->element();
if (!wrapper.IsEmpty() && element) {
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -42,7 +42,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8DOMTokenList::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8DOMTokenList::wrap(impl, isolate);
// Add a hidden reference from the element to the DOMTokenList.
Element* element = impl->element();
if (!wrapper.IsEmpty() && element) {
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -61,7 +61,7 @@
{
if (!impl)
return v8::Null();
- return V8DataView::wrap(impl);
+ return V8DataView::wrap(impl, isolate);
}
v8::Handle<v8::Value> V8DataView::getInt8Callback(const v8::Arguments& args)
Modified: trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -82,11 +82,11 @@
// We need to check Event first to avoid infinite recursion.
if (eventNames().interfaceForEvent == desiredInterface)
- return V8Event::wrap(event);
+ return V8Event::wrap(event, isolate);
DOM_EVENT_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE)
- return V8Event::wrap(event);
+ return V8Event::wrap(event, isolate);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -58,7 +58,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8Float32Array::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8Float32Array::wrap(impl, isolate);
if (!wrapper.IsEmpty())
wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalFloatArray, impl->length());
return wrapper;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -53,7 +53,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8Float64Array::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8Float64Array::wrap(impl, isolate);
if (!wrapper.IsEmpty())
wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalDoubleArray, impl->length());
return wrapper;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -84,7 +84,7 @@
{
if (impl->type() == DocAll)
return toV8(static_cast<HTMLAllCollection*>(impl), isolate);
- return V8HTMLCollection::wrap(impl);
+ return V8HTMLCollection::wrap(impl, isolate);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -39,7 +39,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8ImageData::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8ImageData::wrap(impl, isolate);
if (!wrapper.IsEmpty()) {
// Create a V8 Uint8ClampedArray object.
v8::Handle<v8::Value> pixelArray = toV8(impl->data(), isolate);
Modified: trunk/Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -57,7 +57,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8Int16Array::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8Int16Array::wrap(impl, isolate);
if (!wrapper.IsEmpty())
wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalShortArray, impl->length());
return wrapper;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -57,7 +57,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8Int32Array::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8Int32Array::wrap(impl, isolate);
if (!wrapper.IsEmpty())
wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalIntArray, impl->length());
return wrapper;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp (115365 => 115366)
--- trunk/Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp 2012-04-26 21:24:50 UTC (rev 115365)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp 2012-04-26 21:25:02 UTC (rev 115366)
@@ -57,7 +57,7 @@
{
if (!impl)
return v8::Null();
- v8::Handle<v8::Object> wrapper = V8Int8Array::wrap(impl);
+ v8::Handle<v8::Object> wrapper = V8Int8Array::wrap(impl, isolate);
if (!wrapper.IsEmpty())
wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalByteArray, impl->length());
return wrapper;