Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/MessagePort.h |
| diff --git a/third_party/WebKit/Source/core/dom/MessagePort.h b/third_party/WebKit/Source/core/dom/MessagePort.h |
| index 75b7653e6c8c9b0fd89ed2af9e97ae2c7d965a66..aca2815873b2b63a4412be71358dea36b45f0a7c 100644 |
| --- a/third_party/WebKit/Source/core/dom/MessagePort.h |
| +++ b/third_party/WebKit/Source/core/dom/MessagePort.h |
| @@ -28,6 +28,7 @@ |
| #define MessagePort_h |
| #include "bindings/core/v8/ActiveScriptWrappable.h" |
| +#include "bindings/core/v8/SerializedScriptValue.h" |
| #include "core/CoreExport.h" |
| #include "core/dom/ActiveDOMObject.h" |
| #include "core/events/EventListener.h" |
| @@ -49,9 +50,6 @@ class MessagePort; |
| class ScriptState; |
| class SerializedScriptValue; |
| -// The overwhelmingly common case is sending a single port, so handle that efficiently with an inline buffer of size 1. |
|
sof
2016/04/18 06:41:56
note: I removed the use of an inline buffer as I d
|
| -typedef HeapVector<Member<MessagePort>, 1> MessagePortArray; |
| - |
| // Not to be confused with WebMessagePortChannelArray; this one uses Vector and OwnPtr instead of WebVector and raw pointers. |
| typedef Vector<OwnPtr<WebMessagePortChannel>, 1> MessagePortChannelArray; |
| @@ -66,7 +64,7 @@ public: |
| static MessagePort* create(ExecutionContext&); |
| ~MessagePort() override; |
| - void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionState&); |
| + void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> message, const MessagePortArray&, ExceptionState&); |
| void start(); |
| void close(); |
| @@ -81,7 +79,7 @@ public: |
| static MessagePortArray* toMessagePortArray(ExecutionContext*, const WebMessagePortChannelArray&); |
| // Returns nullptr if there is an exception, or if the passed-in array is nullptr/empty. |
| - static PassOwnPtr<MessagePortChannelArray> disentanglePorts(ExecutionContext*, const MessagePortArray*, ExceptionState&); |
| + static PassOwnPtr<MessagePortChannelArray> disentanglePorts(ExecutionContext*, const MessagePortArray&, ExceptionState&); |
| // Returns an empty array if the passed array is nullptr/empty. |
| static MessagePortArray* entanglePorts(ExecutionContext&, PassOwnPtr<MessagePortChannelArray>); |