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

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

Issue 1964183004: Revert of Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 ee443f9d728aae50aa7caf97b257a19448f2a4ed..53a90b255e0fd78669d1de96f271fb3529b48b16 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 @@
{
}
-TestArrayBuffer* ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBuffer() const
+PassRefPtr<TestArrayBuffer> ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBuffer() const
{
ASSERT(isArrayBuffer());
return m_arrayBuffer;
}
-void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(TestArrayBuffer* value)
+void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(PassRefPtr<TestArrayBuffer> value)
{
ASSERT(isNull());
m_arrayBuffer = value;
m_type = SpecificTypeArrayBuffer;
}
-ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBuffer(TestArrayBuffer* value)
+ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBuffer(PassRefPtr<TestArrayBuffer> value)
{
ArrayBufferOrArrayBufferViewOrDictionary container;
container.setArrayBuffer(value);
return container;
}
-TestArrayBufferView* ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBufferView() const
+PassRefPtr<TestArrayBufferView> ArrayBufferOrArrayBufferViewOrDictionary::getAsArrayBufferView() const
{
ASSERT(isArrayBufferView());
return m_arrayBufferView;
}
-void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(TestArrayBufferView* value)
+void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(PassRefPtr<TestArrayBufferView> value)
{
ASSERT(isNull());
m_arrayBufferView = value;
m_type = SpecificTypeArrayBufferView;
}
-ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBufferView(TestArrayBufferView* value)
+ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromArrayBufferView(PassRefPtr<TestArrayBufferView> value)
{
ArrayBufferOrArrayBufferViewOrDictionary container;
container.setArrayBufferView(value);
@@ -100,8 +100,6 @@
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)
@@ -113,13 +111,13 @@
return;
if (V8ArrayBuffer::hasInstance(v8Value, isolate)) {
- RawPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBuffer(cppValue);
return;
}
if (V8ArrayBufferView::hasInstance(v8Value, isolate)) {
- RawPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RefPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBufferView(cppValue);
return;
}
@@ -624,40 +622,40 @@
return container;
}
-TestArrayBuffer* StringOrArrayBufferOrArrayBufferView::getAsArrayBuffer() const
+PassRefPtr<TestArrayBuffer> StringOrArrayBufferOrArrayBufferView::getAsArrayBuffer() const
{
ASSERT(isArrayBuffer());
return m_arrayBuffer;
}
-void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(TestArrayBuffer* value)
+void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(PassRefPtr<TestArrayBuffer> value)
{
ASSERT(isNull());
m_arrayBuffer = value;
m_type = SpecificTypeArrayBuffer;
}
-StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(TestArrayBuffer* value)
+StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(PassRefPtr<TestArrayBuffer> value)
{
StringOrArrayBufferOrArrayBufferView container;
container.setArrayBuffer(value);
return container;
}
-TestArrayBufferView* StringOrArrayBufferOrArrayBufferView::getAsArrayBufferView() const
+PassRefPtr<TestArrayBufferView> StringOrArrayBufferOrArrayBufferView::getAsArrayBufferView() const
{
ASSERT(isArrayBufferView());
return m_arrayBufferView;
}
-void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(TestArrayBufferView* value)
+void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(PassRefPtr<TestArrayBufferView> value)
{
ASSERT(isNull());
m_arrayBufferView = value;
m_type = SpecificTypeArrayBufferView;
}
-StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBufferView(TestArrayBufferView* value)
+StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromArrayBufferView(PassRefPtr<TestArrayBufferView> value)
{
StringOrArrayBufferOrArrayBufferView container;
container.setArrayBufferView(value);
@@ -670,8 +668,6 @@
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)
@@ -683,13 +679,13 @@
return;
if (V8ArrayBuffer::hasInstance(v8Value, isolate)) {
- RawPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBuffer(cppValue);
return;
}
if (V8ArrayBufferView::hasInstance(v8Value, isolate)) {
- RawPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RefPtr<TestArrayBufferView> cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setArrayBufferView(cppValue);
return;
}
@@ -1075,20 +1071,20 @@
return container;
}
-DOMUint8Array* TestInterface2OrUint8Array::getAsUint8Array() const
+PassRefPtr<DOMUint8Array> TestInterface2OrUint8Array::getAsUint8Array() const
{
ASSERT(isUint8Array());
return m_uint8Array;
}
-void TestInterface2OrUint8Array::setUint8Array(DOMUint8Array* value)
+void TestInterface2OrUint8Array::setUint8Array(PassRefPtr<DOMUint8Array> value)
{
ASSERT(isNull());
m_uint8Array = value;
m_type = SpecificTypeUint8Array;
}
-TestInterface2OrUint8Array TestInterface2OrUint8Array::fromUint8Array(DOMUint8Array* value)
+TestInterface2OrUint8Array TestInterface2OrUint8Array::fromUint8Array(PassRefPtr<DOMUint8Array> value)
{
TestInterface2OrUint8Array container;
container.setUint8Array(value);
@@ -1101,7 +1097,6 @@
DEFINE_TRACE(TestInterface2OrUint8Array)
{
- visitor->trace(m_uint8Array);
}
void V8TestInterface2OrUint8Array::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterface2OrUint8Array& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState)
@@ -1119,7 +1114,7 @@
}
if (V8Uint8Array::hasInstance(v8Value, isolate)) {
- RawPtr<DOMUint8Array> cppValue = V8Uint8Array::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+ RefPtr<DOMUint8Array> cppValue = V8Uint8Array::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.setUint8Array(cppValue);
return;
}

Powered by Google App Engine
This is Rietveld 408576698