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

Unified Diff: sky/engine/bindings/core/v8/SerializedScriptValue.h

Issue 676723003: Remove postMessage, MessageChannel and MessagePort. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/bindings/core/v8/PostMessage.h ('k') | sky/engine/bindings/core/v8/SerializedScriptValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/SerializedScriptValue.h
diff --git a/sky/engine/bindings/core/v8/SerializedScriptValue.h b/sky/engine/bindings/core/v8/SerializedScriptValue.h
index 94bfe7edd91baa25448913a59da794f8677be80f..c7477f9f04de2d0e9d06146a2c32299dfb9dfc6b 100644
--- a/sky/engine/bindings/core/v8/SerializedScriptValue.h
+++ b/sky/engine/bindings/core/v8/SerializedScriptValue.h
@@ -46,9 +46,7 @@ class ArrayBufferContents;
namespace blink {
class ExceptionState;
-class MessagePort;
-typedef WillBeHeapVector<RefPtrWillBeMember<MessagePort>, 1> MessagePortArray;
typedef Vector<RefPtr<WTF::ArrayBuffer>, 1> ArrayBufferArray;
class SerializedScriptValue FINAL : public ThreadSafeRefCounted<SerializedScriptValue> {
@@ -69,7 +67,7 @@ public:
// be thrown using v8::ThrowException(), and sets |didThrow|. In this case
// the caller must not invoke any V8 operations until control returns to
// V8. When serialization is successful, |didThrow| is false.
- static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, ExceptionState&, v8::Isolate*);
+ static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, ArrayBufferArray*, ExceptionState&, v8::Isolate*);
static PassRefPtr<SerializedScriptValue> createFromWire(const String&);
static PassRefPtr<SerializedScriptValue> createFromWireBytes(const Vector<uint8_t>&);
static PassRefPtr<SerializedScriptValue> create(const String&);
@@ -87,20 +85,8 @@ public:
// Deserializes the value (in the current context). Returns a null value in
// case of failure.
- v8::Handle<v8::Value> deserialize(MessagePortArray* = 0);
- v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0);
-
- // Helper function which pulls the values out of a JS sequence and into a MessagePortArray.
- // Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3
- // of the HTML5 spec and generates exceptions as appropriate.
- // Returns true if the array was filled, or false if the passed value was not of an appropriate type.
- static bool extractTransferables(v8::Local<v8::Value>, int, MessagePortArray&, ArrayBufferArray&, ExceptionState&, v8::Isolate*);
-
- // Informs the V8 about external memory allocated and owned by this object. Large values should contribute
- // to GC counters to eventually trigger a GC, otherwise flood of postMessage() can cause OOM.
- // Ok to invoke multiple times (only adds memory once).
- // The memory registration is revoked automatically in destructor.
- void registerMemoryAllocatedWithCurrentScriptContext();
+ v8::Handle<v8::Value> deserialize();
+ v8::Handle<v8::Value> deserialize(v8::Isolate*);
private:
enum StringDataMode {
@@ -110,7 +96,7 @@ private:
typedef Vector<WTF::ArrayBufferContents, 1> ArrayBufferContentsArray;
SerializedScriptValue();
- SerializedScriptValue(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, ExceptionState&, v8::Isolate*);
+ SerializedScriptValue(v8::Handle<v8::Value>, ArrayBufferArray*, ExceptionState&, v8::Isolate*);
explicit SerializedScriptValue(const String& wireData);
static PassOwnPtr<ArrayBufferContentsArray> transferArrayBuffers(ArrayBufferArray&, ExceptionState&, v8::Isolate*);
« no previous file with comments | « sky/engine/bindings/core/v8/PostMessage.h ('k') | sky/engine/bindings/core/v8/SerializedScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698