Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
index fbc52502f6975d45a687607d728d440bdc28402c..ed385f434241bf5d07c73495fa1c4c8716af01c8 100644 |
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
@@ -361,14 +361,14 @@ |
if (!m_responseArrayBuffer) { |
if (m_binaryResponseBuilder && m_binaryResponseBuilder->size()) { |
- DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(m_binaryResponseBuilder->size(), 1); |
+ RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::createUninitialized(m_binaryResponseBuilder->size(), 1); |
if (!m_binaryResponseBuilder->getAsBytes(buffer->data(), static_cast<size_t>(buffer->byteLength()))) { |
// m_binaryResponseBuilder failed to allocate an ArrayBuffer. |
// We need to crash the renderer since there's no way defined in |
// the spec to tell this to the user. |
CRASH(); |
} |
- m_responseArrayBuffer = buffer; |
+ m_responseArrayBuffer = buffer.release(); |
m_binaryResponseBuilder.clear(); |
} else { |
m_responseArrayBuffer = DOMArrayBuffer::create(nullptr, 0); |
@@ -652,12 +652,12 @@ |
} |
if (body.isArrayBuffer()) { |
- send(body.getAsArrayBuffer(), exceptionState); |
+ send(body.getAsArrayBuffer().get(), exceptionState); |
return; |
} |
if (body.isArrayBufferView()) { |
- send(body.getAsArrayBufferView(), exceptionState); |
+ send(body.getAsArrayBufferView().get(), exceptionState); |
return; |
} |
@@ -1701,7 +1701,6 @@ |
visitor->trace(m_responseLegacyStream); |
visitor->trace(m_responseDocument); |
visitor->trace(m_responseDocumentParser); |
- visitor->trace(m_responseArrayBuffer); |
visitor->trace(m_progressEventThrottle); |
visitor->trace(m_upload); |
visitor->trace(m_blobLoader); |