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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/TransferableArrayBuffer.h

Issue 1893983002: Simplify handling of Transferable objects while (de)serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove Transferable.cpp, not needed after all. 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/core/v8/TransferableArrayBuffer.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/TransferableArrayBuffer.h b/third_party/WebKit/Source/bindings/core/v8/TransferableArrayBuffer.h
deleted file mode 100644
index b3755a4a68a89281f02092ec43e4f1799466033c..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/bindings/core/v8/TransferableArrayBuffer.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TransferableArrayBuffer_h
-#define TransferableArrayBuffer_h
-
-#include "bindings/core/v8/Transferable.h"
-#include "core/CoreExport.h"
-#include "core/dom/DOMArrayBufferBase.h"
-
-namespace blink {
-
-class CORE_EXPORT TransferableArrayBuffer : public Transferable {
-public:
- ~TransferableArrayBuffer() override { }
- void append(DOMArrayBufferBase* arrayBuffer)
- {
- m_arrayBufferArray.append(arrayBuffer);
- }
- bool contains(DOMArrayBufferBase* arrayBuffer)
- {
- return m_arrayBufferArray.contains(arrayBuffer);
- }
- static TransferableArrayBuffer* ensure(TransferableArray& transferables)
- {
- if (transferables.size() <= TransferableArrayBufferType) {
- transferables.resize(TransferableArrayBufferType + 1);
- transferables[TransferableArrayBufferType] = new TransferableArrayBuffer();
- }
- return static_cast<TransferableArrayBuffer*>(transferables[TransferableArrayBufferType].get());
- }
- static TransferableArrayBuffer* get(TransferableArray& transferables)
- {
- if (transferables.size() <= TransferableArrayBufferType)
- return nullptr;
- return static_cast<TransferableArrayBuffer*>(transferables[TransferableArrayBufferType].get());
- }
- HeapVector<Member<DOMArrayBufferBase>, 1>& getArray()
- {
- return m_arrayBufferArray;
- }
- DEFINE_INLINE_TRACE()
- {
- visitor->trace(m_arrayBufferArray);
- Transferable::trace(visitor);
- }
-private:
- HeapVector<Member<DOMArrayBufferBase>, 1> m_arrayBufferArray;
-};
-
-} // namespace blink
-
-#endif // TransferableArrayBuffer_h

Powered by Google App Engine
This is Rietveld 408576698