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

Unified Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 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/modules/mediasource/SourceBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
index 039b91e664f8a34d3c2df5000945be1e5818c052..de1d09bed9665ce0af8e39494e0486d51fd58398 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
@@ -360,13 +360,15 @@ void SourceBuffer::appendBuffer(DOMArrayBuffer* data,
data->byteLength(), exceptionState);
}
-void SourceBuffer::appendBuffer(DOMArrayBufferView* data,
+void SourceBuffer::appendBuffer(const NotShared<DOMArrayBufferView>& data,
ExceptionState& exceptionState) {
- BLINK_SBLOG << __func__ << " this=" << this << " size=" << data->byteLength();
+ BLINK_SBLOG << __func__ << " this=" << this
+ << " size=" << data.view()->byteLength();
// Section 3.2 appendBuffer()
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data
- appendBufferInternal(static_cast<const unsigned char*>(data->baseAddress()),
- data->byteLength(), exceptionState);
+ appendBufferInternal(
+ static_cast<const unsigned char*>(data.view()->baseAddress()),
+ data.view()->byteLength(), exceptionState);
}
void SourceBuffer::abort(ExceptionState& exceptionState) {

Powered by Google App Engine
This is Rietveld 408576698