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

Unified Diff: Source/wtf/ArrayBufferView.h

Issue 19019002: Ensure that ArrayBuffers actively being used by the Web Audio API cannot be neutered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase for re-landing Created 7 years, 5 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
« no previous file with comments | « Source/wtf/ArrayBufferContents.cpp ('k') | Source/wtf/ArrayBufferView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ArrayBufferView.h
diff --git a/Source/wtf/ArrayBufferView.h b/Source/wtf/ArrayBufferView.h
index 769f5b690e2b17d20c66315bc32e0892aada0269..14d0b87abbe124900e8573e248ecb9a06b5f57c5 100644
--- a/Source/wtf/ArrayBufferView.h
+++ b/Source/wtf/ArrayBufferView.h
@@ -70,6 +70,9 @@ class WTF_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> {
virtual unsigned byteLength() const = 0;
+ void setNeuterable(bool flag) { m_isNeuterable = flag; }
+ bool isNeuterable() const { return m_isNeuterable; }
+
virtual ~ArrayBufferView();
protected:
@@ -128,7 +131,8 @@ class WTF_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> {
// This is the address of the ArrayBuffer's storage, plus the byte offset.
void* m_baseAddress;
- unsigned m_byteOffset;
+ unsigned m_byteOffset : 31;
+ bool m_isNeuterable : 1;
private:
friend class ArrayBuffer;
« no previous file with comments | « Source/wtf/ArrayBufferContents.cpp ('k') | Source/wtf/ArrayBufferView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698