Index: Source/core/frame/Window.idl |
diff --git a/Source/core/frame/Window.idl b/Source/core/frame/Window.idl |
index f916ce9e3d8b9f69831141d11f4c96863270b36c..e82990ce7f1f09249c731af952cdd748d0c2ed8b 100644 |
--- a/Source/core/frame/Window.idl |
+++ b/Source/core/frame/Window.idl |
@@ -166,7 +166,7 @@ |
[Replaceable] readonly attribute Console console; |
// cross-document messaging |
- [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, optional MessagePort[] messagePorts); |
+ [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, optional sequence<Transferable> transfer); |
[Replaceable] readonly attribute Performance performance; |
@@ -211,6 +211,21 @@ |
[Custom, NotEnumerable] getter Window (DOMString name); |
}; |
+// http://www.whatwg.org/specs/web-apps/current-work/#transferable-objects |
+// |
+// Expressing the Transferable typedef in IDL depends on http://crbug.com/240176. |
+// The postMessage() methods taking a Transferable array argument have custom |
+// binding code that is able to handle the Transferables that we currently |
+// recognize. To be able to declare a postMessage() signature that matches |
+// the implementation, we provide a Transferable typedef but with an |
+// incomplete type. |
+// |
+// FIXME: make this typedef accurate once enough of http://crbug.com/240176 |
+// is in place. |
+// FIXME: consider putting this typedef in an .idl file containing spec-wide |
+// utility type definitions. |
+typedef MessagePort Transferable; |
+ |
Window implements GlobalEventHandlers; |
Window implements WindowBase64; |
Window implements WindowEventHandlers; |