Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp b/third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp
index 53a90b255e0fd78669d1de96f271fb3529b48b16..ee443f9d728aae50aa7caf97b257a19448f2a4ed 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/UnionTypesCore.cpp
@@ -34,40 +34,40 @@ ArrayBufferOrArrayBufferViewOrDictionary::ArrayBufferOrArrayBufferViewOrDictiona
{
}
-PassRefPtr<TestArrayBuffer> ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBuffer() const
+TestArrayBuffer* ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBuffer() const
{
ASSERT(isArrayBuffer());
return m_arrayBuffer;
}
-void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(PassRefPtr<TestArrayBuffer> value)
+void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(TestArrayBuffer* value)
{
ASSERT(isNull());
m_arrayBuffer = value;
m_type = SpecificTypeArrayBuffer;
}
-ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBuffer(PassRefPtr<TestArrayBuffer> value)
+ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBuffer(TestArrayBuffer* value)
{
ArrayBufferOrArrayBufferViewOrDictionary container;
container.setArrayBuffer(value);
return container;
}
-PassRefPtr<TestArrayBufferView> ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBufferView() const
+TestArrayBufferView* ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBufferView() const
{
ASSERT(isArrayBufferView());
return m_arrayBufferView;
}
-void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(PassRefPtr<TestArrayBufferView> value)
+void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(TestArrayBufferView* value)
{
ASSERT(isNull());
m_arrayBufferView = value;
m_type = SpecificTypeArrayBufferView;
}
-ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBufferView(PassRefPtr<TestArrayBufferView> value)
+ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBufferView(TestArrayBufferView* value)
{
ArrayBufferOrArrayBufferViewOrDictionary container;
container.setArrayBufferView(value);
@@ -100,6 +100,8 @@ ArrayBufferOrArrayBufferViewOrDictionary& ArrayBufferOrArrayBufferViewOrDictiona
DEFINE_TRACE(ArrayBufferOrArrayBufferViewOrDictionary)
{
+ visitor->trace(m_arrayBuffer);
+ visitor->trace(m_arrayBufferView);
}
void V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, ArrayBufferOrArrayBufferViewOrDictionary& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState)
@@ -111,13 +113,13 @@ void V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(v8::Isolate* isolate, v8
return;
if (V8ArrayBuffer::hasInstance(v8Value, isolate)) {
- RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RawPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBuffer(cppValue);
return;
}
if (V8ArrayBufferView::hasInstance(v8Value, isolate)) {
- RefPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RawPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBufferView(cppValue);
return;
}
@@ -622,40 +624,40 @@ StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromS
return container;
}
-PassRefPtr<TestArrayBuffer> StringOrArrayBufferOrArrayBufferView::getAsArrayBuffer() const
+TestArrayBuffer* StringOrArrayBufferOrArrayBufferView::getAsArrayBuffer() const
{
ASSERT(isArrayBuffer());
return m_arrayBuffer;
}
-void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(PassRefPtr<TestArrayBuffer> value)
+void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(TestArrayBuffer* value)
{
ASSERT(isNull());
m_arrayBuffer = value;
m_type = SpecificTypeArrayBuffer;
}
-StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(PassRefPtr<TestArrayBuffer> value)
+StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(TestArrayBuffer* value)
{
StringOrArrayBufferOrArrayBufferView container;
container.setArrayBuffer(value);
return container;
}
-PassRefPtr<TestArrayBufferView> StringOrArrayBufferOrArrayBufferView::getAsArrayBufferView() const
+TestArrayBufferView* StringOrArrayBufferOrArrayBufferView::getAsArrayBufferView() const
{
ASSERT(isArrayBufferView());
return m_arrayBufferView;
}
-void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(PassRefPtr<TestArrayBufferView> value)
+void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(TestArrayBufferView* value)
{
ASSERT(isNull());
m_arrayBufferView = value;
m_type = SpecificTypeArrayBufferView;
}
-StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBufferView(PassRefPtr<TestArrayBufferView> value)
+StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBufferView(TestArrayBufferView* value)
{
StringOrArrayBufferOrArrayBufferView container;
container.setArrayBufferView(value);
@@ -668,6 +670,8 @@ StringOrArrayBufferOrArrayBufferView& StringOrArrayBufferOrArrayBufferView::oper
DEFINE_TRACE(StringOrArrayBufferOrArrayBufferView)
{
+ visitor->trace(m_arrayBuffer);
+ visitor->trace(m_arrayBufferView);
}
void V8StringOrArrayBufferOrArrayBufferView::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, StringOrArrayBufferOrArrayBufferView& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState)
@@ -679,13 +683,13 @@ void V8StringOrArrayBufferOrArrayBufferView::toImpl(v8::Isolate* isolate, v8::Lo
return;
if (V8ArrayBuffer::hasInstance(v8Value, isolate)) {
- RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RawPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBuffer(cppValue);
return;
}
if (V8ArrayBufferView::hasInstance(v8Value, isolate)) {
- RefPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RawPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBufferView(cppValue);
return;
}
@@ -1071,20 +1075,20 @@ TestInterface2OrUint8Array TestInterface2OrUint8Array::fromTestInterface2(PassRe
return container;
}
-PassRefPtr<DOMUint8Array> TestInterface2OrUint8Array::getAsUint8Array() const
+DOMUint8Array* TestInterface2OrUint8Array::getAsUint8Array() const
{
ASSERT(isUint8Array());
return m_uint8Array;
}
-void TestInterface2OrUint8Array::setUint8Array(PassRefPtr<DOMUint8Array> value)
+void TestInterface2OrUint8Array::setUint8Array(DOMUint8Array* value)
{
ASSERT(isNull());
m_uint8Array = value;
m_type = SpecificTypeUint8Array;
}
-TestInterface2OrUint8Array TestInterface2OrUint8Array::fromUint8Array(PassRefPtr<DOMUint8Array> value)
+TestInterface2OrUint8Array TestInterface2OrUint8Array::fromUint8Array(DOMUint8Array* value)
{
TestInterface2OrUint8Array container;
container.setUint8Array(value);
@@ -1097,6 +1101,7 @@ TestInterface2OrUint8Array& TestInterface2OrUint8Array::operator=(const TestInte
DEFINE_TRACE(TestInterface2OrUint8Array)
{
+ visitor->trace(m_uint8Array);
}
void V8TestInterface2OrUint8Array::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterface2OrUint8Array& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState)
@@ -1114,7 +1119,7 @@ void V8TestInterface2OrUint8Array::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
}
if (V8Uint8Array::hasInstance(v8Value, isolate)) {
- RefPtr<DOMUint8Array> cppValue = V8Uint8Array::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RawPtr<DOMUint8Array> cppValue = V8Uint8Array::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setUint8Array(cppValue);
return;
}

Powered by Google App Engine
This is Rietveld 408576698