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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/TransferableMessagePort.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/TransferableMessagePort.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/TransferableMessagePort.h b/third_party/WebKit/Source/bindings/core/v8/TransferableMessagePort.h
deleted file mode 100644
index 2970f16bde75d465bef8e52db86c36c75d2a0772..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/bindings/core/v8/TransferableMessagePort.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 TransferableMessagePort_h
-#define TransferableMessagePort_h
-
-#include "bindings/core/v8/Transferable.h"
-#include "core/CoreExport.h"
-#include "core/dom/MessagePort.h"
-
-namespace blink {
-
-class CORE_EXPORT TransferableMessagePort : public Transferable {
-public:
- ~TransferableMessagePort() override { }
- void append(MessagePort* messagePort)
- {
- m_messagePortArray.append(messagePort);
- }
- bool contains(MessagePort* messagePort)
- {
- return m_messagePortArray.contains(messagePort);
- }
- static TransferableMessagePort* ensure(TransferableArray& transferables)
- {
- if (transferables.size() <= TransferableMessagePortType) {
- transferables.resize(TransferableMessagePortType + 1);
- transferables[TransferableMessagePortType] = new TransferableMessagePort();
- }
- return static_cast<TransferableMessagePort*>(transferables[TransferableMessagePortType].get());
- }
- static TransferableMessagePort* get(const TransferableArray& transferables)
- {
- if (transferables.size() <= TransferableMessagePortType)
- return nullptr;
- return static_cast<TransferableMessagePort*>(transferables[TransferableMessagePortType].get());
- }
- HeapVector<Member<MessagePort>, 1>& getArray()
- {
- return m_messagePortArray;
- }
- DEFINE_INLINE_TRACE()
- {
- visitor->trace(m_messagePortArray);
- Transferable::trace(visitor);
- }
-private:
- HeapVector<Member<MessagePort>, 1> m_messagePortArray;
-};
-
-} // namespace blink
-
-#endif // TransferableMessagePort_h

Powered by Google App Engine
This is Rietveld 408576698