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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.h

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy 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/modules/presentation/PresentationConnection.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
index 2a94422bfae39ddc437db81980693b36180f4562..32438bd0d0523dface0825b1d754084a0e5f7e94 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
@@ -49,8 +49,8 @@ public:
const WTF::AtomicString& state() const;
void send(const String& message, ExceptionState&);
- void send(PassRefPtr<DOMArrayBuffer>, ExceptionState&);
- void send(PassRefPtr<DOMArrayBufferView>, ExceptionState&);
+ void send(DOMArrayBuffer*, ExceptionState&);
+ void send(DOMArrayBufferView*, ExceptionState&);
void send(Blob*, ExceptionState&);
void close();
void terminate();
@@ -95,24 +95,7 @@ private:
BinaryTypeArrayBuffer
};
- struct Message {
- Message(const String& text)
- : type(MessageTypeText)
- , text(text) { }
-
- Message(PassRefPtr<DOMArrayBuffer> arrayBuffer)
- : type(MessageTypeArrayBuffer)
- , arrayBuffer(arrayBuffer) { }
-
- Message(PassRefPtr<BlobDataHandle> blobDataHandle)
- : type(MessageTypeBlob)
- , blobDataHandle(blobDataHandle) { }
-
- MessageType type;
- String text;
- RefPtr<DOMArrayBuffer> arrayBuffer;
- RefPtr<BlobDataHandle> blobDataHandle;
- };
+ class Message;
PresentationConnection(LocalFrame*, const String& id, const String& url);
@@ -120,7 +103,7 @@ private:
void handleMessageQueue();
// Callbacks invoked from BlobLoader.
- void didFinishLoadingBlob(PassRefPtr<DOMArrayBuffer>);
+ void didFinishLoadingBlob(DOMArrayBuffer*);
void didFailLoadingBlob(FileError::ErrorCode);
// Cancel loads and pending messages when the connection is closed.
@@ -132,7 +115,7 @@ private:
// For Blob data handling.
Member<BlobLoader> m_blobLoader;
- Deque<OwnPtr<Message>> m_messages;
+ HeapDeque<Member<Message>> m_messages;
BinaryType m_binaryType;
};

Powered by Google App Engine
This is Rietveld 408576698