Changeset 95362 in webkit
- Timestamp:
- Sep 16, 2011 9:01:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95361 r95362 1 2011-09-16 Dmitry Lomov <dslomov@google.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=66714 4 Add webkitPostMessage to allow for adding transferable support. 5 This adds webkitPostMessage, currently identical to postMessage, which 6 would later be a vehicle for adding transferable support for messaging. 7 The tests ensure that webkitPostMessage and postMessage behave identically. 8 9 Based on patch by Luke Zarko. 10 11 Reviewed by David Levin. 12 13 * fast/dom/Window/window-postmessage-args-expected.txt: 14 * fast/dom/Window/window-postmessage-args.html: 15 * fast/dom/Window/window-property-descriptors-expected.txt: 16 * fast/events/message-port-expected.txt: 17 * fast/events/message-port.html: 18 * fast/workers/resources/worker-call.js: 19 * fast/workers/worker-call-expected.txt: 20 * platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt: 21 1 22 2011-09-16 Alexei Svitkine <asvitkine@chromium.org> 2 23 -
trunk/LayoutTests/fast/dom/Window/window-postmessage-args-expected.txt
r93709 r95362 2 2 3 3 PASS: Posting message ('1', 1): threw exception TypeError: Type error 4 PASS: Posting message ('1', 1): threw exception TypeError: Type error 5 PASS: Posting message ('2', ): threw exception TypeError: Type error 4 6 PASS: Posting message ('2', ): threw exception TypeError: Type error 5 7 PASS: Posting message ('3', [object Object]): threw exception TypeError: Type error 8 PASS: Posting message ('3', [object Object]): threw exception TypeError: Type error 9 PASS: Posting message ('4', [object DOMWindow]) did not throw an exception 6 10 PASS: Posting message ('4', [object DOMWindow]) did not throw an exception 7 11 PASS: Posting message ('5', null) did not throw an exception 12 PASS: Posting message ('5', null) did not throw an exception 13 PASS: Posting message ('6', undefined) did not throw an exception 8 14 PASS: Posting message ('6', undefined) did not throw an exception 9 15 PASS: Posting message ('7', [object MessagePort],[object MessagePort]) did not throw an exception 16 PASS: Posting message ('7', [object MessagePort],[object MessagePort]) did not throw an exception 17 PASS: Posting message ('2147483648', null) did not throw an exception 10 18 PASS: Posting message ('2147483648', null) did not throw an exception 11 19 PASS: Posting message ('done', *) did not throw an exception 12 20 Received message '4' with 0 ports. 21 Received message '4' with 0 ports. 22 Received message '5' with 0 ports. 13 23 Received message '5' with 0 ports. 14 24 Received message '6' with 0 ports. 25 Received message '6' with 0 ports. 15 26 Received message '7' with 2 ports. 27 Received message '7' with 2 ports. 28 Received message '2147483648' with 0 ports. 16 29 Received message '2147483648' with 0 ports. 17 30 Received message 'done' with 0 ports. -
trunk/LayoutTests/fast/dom/Window/window-postmessage-args.html
r74372 r95362 24 24 window.addEventListener('message', onmessage, false); 25 25 26 function tryPostMessage (first, second, third, shouldFail) {27 26 function tryPostMessageFunction(postMessageFunction, first, second, third, shouldFail) { 27 try { 28 28 if (!third) 29 window.postMessage(first, second);29 postMessageFunction(first, second); 30 30 else 31 window.postMessage(first, second, third);31 postMessageFunction(first, second, third); 32 32 console.innerHTML += (shouldFail ? "FAIL" : "PASS") + ": Posting message ('" + first + "', " + second + ") did not throw an exception<br>"; 33 33 } catch (e) { … … 36 36 } 37 37 38 function tryPostMessage(first, second, third, shouldFail) { 39 tryPostMessageFunction(window.postMessage, first, second, third, shouldFail); 40 tryPostMessageFunction(window.webkitPostMessage, first, second, third, shouldFail); 41 } 42 38 43 document.getElementById("description").innerHTML = "Test that the second argument of window.postMessage is ignored or triggers an error if it is not a message port. You should see PASS message '1' through '7', followed by 'done', with messages 4-7 received below.<br><br>"; 39 44 40 var channel = new MessageChannel;41 45 tryPostMessage('1', 1, '*', true); 42 46 tryPostMessage('2', "", '*', true); … … 45 49 tryPostMessage('5', null, '*'); 46 50 tryPostMessage('6', void 0, '*'); 47 tryPostMessage('7', [channel.port1, channel.port2], '*'); 51 var channel1 = new MessageChannel; 52 tryPostMessageFunction(window.postMessage, '7', [channel1.port1, channel1.port2], '*'); 53 var channel2 = new MessageChannel; 54 tryPostMessageFunction(window.webkitPostMessage, '7', [channel2.port1, channel2.port2], '*'); 48 55 tryPostMessage(2147483648, null, '*'); 49 tryPostMessage ('done', '*');56 tryPostMessageFunction(window.postMessage, 'done', '*'); 50 57 </script> 51 58 </body> -
trunk/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
r94415 r95362 544 544 PASS Object.getOwnPropertyDescriptor(window, 'webkitConvertPointFromNodeToPage') is undefined. 545 545 PASS Object.getOwnPropertyDescriptor(window, 'webkitConvertPointFromPageToNode') is undefined. 546 PASS Object.getOwnPropertyDescriptor(window, 'webkitPostMessage') is undefined. 546 547 PASS successfullyParsed is true 547 548 -
trunk/LayoutTests/fast/events/message-port-expected.txt
r48395 r95362 4 4 5 5 Simple exchange: SUCCESS 6 Simple exchange: SUCCESS 7 Posted port: SUCCESS 6 8 Posted port: SUCCESS 7 9 Event Listener: SUCCESS 10 Event Listener: SUCCESS 8 11 Closed port: SUCCESS 12 Closed port: SUCCESS 13 MessageEvent.cancelable defaults to false: PASS 9 14 MessageEvent.cancelable defaults to false: PASS 10 15 DONE -
trunk/LayoutTests/fast/events/message-port.html
r48395 r95362 16 16 var mainPort; 17 17 18 function test() 18 var allTests; 19 var currentTest = 0; 20 21 function nextTest() 22 { 23 var fun = currentTest % 2 == 0 ? "postMessage" : "webkitPostMessage"; 24 var testFunNo = Math.floor(currentTest / 2); 25 if (testFunNo < allTests.length) 26 { 27 var test = allTests[testFunNo]; 28 currentTest++; 29 test(fun); 30 } 31 else 32 { 33 done(); 34 } 35 } 36 37 function test(postMessageFun) 19 38 { 20 39 var channel = new MessageChannel; 21 window.frames[0].postMessage("msg", [channel.port2], "*"); 40 41 window.frames[0][postMessageFun]("msg", [channel.port2], "*"); 22 42 mainPort = channel.port1; 23 mainPort .postMessage("ping");43 mainPort[postMessageFun]("ping"); 24 44 mainPort.onmessage = function(evt) { 25 45 if (evt.data == "pong" && evt.origin == "") … … 27 47 else 28 48 log("Simple exchange: FAIL. Got message '" + evt.data + "' from '" + evt.origin + "'."); 29 test2();49 nextTest(); 30 50 }; 31 51 } 32 52 33 function test2( )53 function test2(postMessageFun) 34 54 { 35 55 var channel = new MessageChannel; 36 mainPort .postMessage("newPort", [channel.port2]);56 mainPort[postMessageFun]("newPort", [channel.port2]); 37 57 channel.port1.onmessage = function(evt) { 38 58 if (evt.data == "yo" && evt.origin == "") … … 40 60 else 41 61 log("Posted port: FAIL. Got message '" + evt.data + "' from '" + evt.origin + "'."); 42 test3();62 nextTest(); 43 63 }; 44 64 } 45 65 46 function test3( )66 function test3(postMessageFun) 47 67 { 48 68 var channel = new MessageChannel; 49 channel.port1 .postMessage("1");69 channel.port1[postMessageFun]("1"); 50 70 var started = false; 51 71 channel.port2.addEventListener("message", function(evt) { 52 72 if (started) { 53 73 log("Event Listener: SUCCESS"); 54 test4();74 nextTest(); 55 75 } else 56 76 log("Event Listener: FAIL. Event listener called before start()"); … … 63 83 } 64 84 65 function test4( )85 function test4(postMessageFun) 66 86 { 67 87 var channel = new MessageChannel; 68 channel.port1 .postMessage("1");88 channel.port1[postMessageFun]("1"); 69 89 channel.port1.close(); 70 channel.port1 .postMessage("2");90 channel.port1[postMessageFun]("2"); 71 91 channel.port2.onmessage = function(evt) { 72 92 if (evt.data == "1") { 73 93 log("Closed port: SUCCESS"); 74 test5();94 nextTest(); 75 95 } else 76 96 log("Closed port: FAIL. Got message: " + evt.data + " after close"); … … 78 98 } 79 99 80 function test5( )100 function test5(postMessageFun) 81 101 { 82 102 // Create a channel and put some messages in it which will go undelivered and should not leak 83 103 var channel = new MessageChannel; 84 channel.port1 .postMessage("abcde");85 test6();104 channel.port1[postMessageFun]("abcde"); 105 nextTest(); 86 106 } 87 107 88 function test6( )108 function test6(postMessageFun) 89 109 { 90 110 var channel = new MessageChannel; 91 channel.port1 .postMessage("howdy");111 channel.port1[postMessageFun]("howdy"); 92 112 channel.port2.onmessage = function(event) { 93 113 log("MessageEvent.cancelable defaults to " + event.cancelable + ": " + (event.cancelable ? "FAIL" : "PASS")); 94 done();114 nextTest(); 95 115 } 96 116 } … … 105 125 } 106 126 127 allTests = [ test, test2, test3, test4, test5, test6 ] 128 107 129 </script> 108 <iframe src="resources/message-port-iframe.html" onload=" test()"></iframe>130 <iframe src="resources/message-port-iframe.html" onload="nextTest()"></iframe> 109 131 </body> -
trunk/LayoutTests/fast/workers/resources/worker-call.js
r46371 r95362 1 1 postMessage("SUCCESS: postMessage() called directly"); 2 webkitPostMessage("SUCCESS: webkitPostMessage() called directly"); 2 3 postMessage.call(null, "SUCCESS: postMessage() invoked via postMessage.call()"); 4 webkitPostMessage.call(null, "SUCCESS: webkitPostMessage() invoked via webkitPostMessage.call()"); 3 5 var saved = postMessage; 4 6 saved("SUCCESS: postMessage() called via intermediate variable"); 7 var saved1 = webkitPostMessage; 8 saved1("SUCCESS: webkitPostMessage() called via intermediate variable"); 5 9 postMessage("DONE"); -
trunk/LayoutTests/fast/workers/worker-call-expected.txt
r46371 r95362 2 2 3 3 SUCCESS: postMessage() called directly 4 SUCCESS: webkitPostMessage() called directly 4 5 SUCCESS: postMessage() invoked via postMessage.call() 6 SUCCESS: webkitPostMessage() invoked via webkitPostMessage.call() 5 7 SUCCESS: postMessage() called via intermediate variable 8 SUCCESS: webkitPostMessage() called via intermediate variable 6 9 DONE 7 10 -
trunk/LayoutTests/platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt
r93709 r95362 2 2 3 3 PASS: Posting message ('1', 1): threw exception TypeError: MessagePortArray argument must be an object 4 PASS: Posting message ('1', 1): threw exception TypeError: MessagePortArray argument must be an object 5 PASS: Posting message ('2', ): threw exception TypeError: MessagePortArray argument must be an object 4 6 PASS: Posting message ('2', ): threw exception TypeError: MessagePortArray argument must be an object 5 7 PASS: Posting message ('3', [object Object]): threw exception TypeError: MessagePortArray argument has no length attribute 8 PASS: Posting message ('3', [object Object]): threw exception TypeError: MessagePortArray argument has no length attribute 9 PASS: Posting message ('4', [object DOMWindow]) did not throw an exception 6 10 PASS: Posting message ('4', [object DOMWindow]) did not throw an exception 7 11 PASS: Posting message ('5', null) did not throw an exception 12 PASS: Posting message ('5', null) did not throw an exception 13 PASS: Posting message ('6', undefined) did not throw an exception 8 14 PASS: Posting message ('6', undefined) did not throw an exception 9 15 PASS: Posting message ('7', [object MessagePort],[object MessagePort]) did not throw an exception 16 PASS: Posting message ('7', [object MessagePort],[object MessagePort]) did not throw an exception 17 PASS: Posting message ('2147483648', null) did not throw an exception 10 18 PASS: Posting message ('2147483648', null) did not throw an exception 11 19 PASS: Posting message ('done', *) did not throw an exception 12 20 Received message '4' with 0 ports. 21 Received message '4' with 0 ports. 22 Received message '5' with 0 ports. 13 23 Received message '5' with 0 ports. 14 24 Received message '6' with 0 ports. 25 Received message '6' with 0 ports. 15 26 Received message '7' with 2 ports. 27 Received message '7' with 2 ports. 28 Received message '2147483648' with 0 ports. 16 29 Received message '2147483648' with 0 ports. 17 30 Received message 'done' with 0 ports. -
trunk/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt
r94385 r95362 46 46 FAIL inner.webkitIndexedDB.isInner should be true. Was false. 47 47 FAIL inner.webkitIndexedDB.constructor.isInner should be true. Was false. 48 FAIL inner.webkitPostMessage.isInner should be true. Was false. 49 FAIL inner.webkitPostMessage.constructor.isInner should be true. Was false. 48 50 PASS successfullyParsed is true 49 51 -
trunk/Source/WebCore/ChangeLog
r95361 r95362 1 2011-09-16 Dmitry Lomov <dslomov@google.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=66714 4 Add webkitPostMessage to allow for adding transferable support. 5 This adds webkitPostMessage, currently identical to postMessage, which 6 would later be a vehicle for adding transferable support for messaging. 7 8 Based on patch by Luke Zarko. 9 10 Reviewed by David Levin. 11 12 * bindings/js/JSDOMWindowCustom.cpp: 13 (WebCore::JSDOMWindow::webkitPostMessage): 14 * bindings/js/JSDedicatedWorkerContextCustom.cpp: 15 (WebCore::JSDedicatedWorkerContext::webkitPostMessage): 16 * bindings/js/JSMessageEventCustom.cpp: 17 (WebCore::JSMessageEvent::webkitInitMessageEvent): 18 * bindings/js/JSMessagePortCustom.cpp: 19 (WebCore::JSMessagePort::webkitPostMessage): 20 * bindings/js/JSWorkerCustom.cpp: 21 (WebCore::JSWorker::postMessage): 22 (WebCore::JSWorker::webkitPostMessage): 23 * bindings/v8/custom/V8DOMWindowCustom.cpp: 24 (WebCore::handlePostMessageCallback): 25 (WebCore::V8DOMWindow::postMessageCallback): 26 (WebCore::V8DOMWindow::webkitPostMessageCallback): 27 * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: 28 (WebCore::handlePostMessageCallback): 29 (WebCore::V8DedicatedWorkerContext::postMessageCallback): 30 (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback): 31 * bindings/v8/custom/V8MessageEventCustom.cpp: 32 (WebCore::V8MessageEvent::initMessageEventCallback): 33 (WebCore::V8MessageEvent::webkitInitMessageEventCallback): 34 * bindings/v8/custom/V8MessagePortCustom.cpp: 35 (WebCore::handlePostMessageCallback): 36 (WebCore::V8MessagePort::postMessageCallback): 37 (WebCore::V8MessagePort::webkitPostMessageCallback): 38 * bindings/v8/custom/V8WorkerCustom.cpp: 39 (WebCore::handlePostMessageCallback): 40 (WebCore::V8Worker::postMessageCallback): 41 (WebCore::V8Worker::webkitPostMessageCallback): 42 * dom/MessageEvent.idl: 43 * dom/MessagePort.idl: 44 * page/DOMWindow.idl: 45 * workers/DedicatedWorkerContext.idl: 46 * workers/Worker.idl: 47 1 48 2011-09-16 Alexei Svitkine <asvitkine@chromium.org> 2 49 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r93567 r95362 1 1 /* 2 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 725 726 } 726 727 728 JSValue JSDOMWindow::webkitPostMessage(ExecState* exec) 729 { 730 return postMessage(exec); 731 } 732 727 733 JSValue JSDOMWindow::setTimeout(ExecState* exec) 728 734 { -
trunk/Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp
r60392 r95362 1 1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved.3 2 * Copyright (C) 2009 Apple, Inc. All rights reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 48 48 } 49 49 50 JSC::JSValue JSDedicatedWorkerContext::webkitPostMessage(JSC::ExecState* exec) 51 { 52 return handlePostMessage(exec, impl()); 53 } 54 50 55 } // namespace WebCore 51 56 -
trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp
r94929 r95362 120 120 } 121 121 122 JSC::JSValue JSMessageEvent::webkitInitMessageEvent(JSC::ExecState* exec) 123 { 124 return initMessageEvent(exec); 125 } 126 122 127 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
r93986 r95362 1 1 /* 2 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 61 62 } 62 63 64 JSC::JSValue JSMessagePort::webkitPostMessage(JSC::ExecState* exec) 65 { 66 return handlePostMessage(exec, impl()); 67 } 68 63 69 void fillMessagePortArray(JSC::ExecState* exec, JSC::JSValue value, MessagePortArray& portArray) 64 70 { -
trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp
r93336 r95362 1 1 /* 2 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 45 46 } 46 47 48 JSC::JSValue JSWorker::webkitPostMessage(JSC::ExecState* exec) 49 { 50 return handlePostMessage(exec, impl()); 51 } 52 47 53 EncodedJSValue JSC_HOST_CALL JSWorkerConstructor::constructJSWorker(ExecState* exec) 48 54 { -
trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
r86067 r95362 1 1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved.2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 314 314 } 315 315 316 v8::Handle<v8::Value> V8DOMWindow::postMessageCallback(const v8::Arguments& args) 317 { 318 INC_STATS("DOM.DOMWindow.postMessage()"); 316 static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args) 317 { 319 318 DOMWindow* window = V8DOMWindow::toNative(args.Holder()); 320 319 … … 351 350 } 352 351 352 v8::Handle<v8::Value> V8DOMWindow::postMessageCallback(const v8::Arguments& args) 353 { 354 INC_STATS("DOM.DOMWindow.postMessage()"); 355 return handlePostMessageCallback(args); 356 } 357 358 v8::Handle<v8::Value> V8DOMWindow::webkitPostMessageCallback(const v8::Arguments& args) 359 { 360 INC_STATS("DOM.DOMWindow.webkitPostMessage()"); 361 return handlePostMessageCallback(args); 362 } 363 353 364 // FIXME(fqian): returning string is cheating, and we should 354 365 // fix this by calling toString function on the receiver. -
trunk/Source/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
r57207 r95362 1 1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved.2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 43 43 namespace WebCore { 44 44 45 v8::Handle<v8::Value> V8DedicatedWorkerContext::postMessageCallback(const v8::Arguments& args)45 static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args) 46 46 { 47 INC_STATS(L"DOM.DedicatedWorkerContext.postMessage");48 47 DedicatedWorkerContext* workerContext = V8DedicatedWorkerContext::toNative(args.Holder()); 49 48 bool didThrow = false; … … 61 60 } 62 61 62 v8::Handle<v8::Value> V8DedicatedWorkerContext::postMessageCallback(const v8::Arguments& args) 63 { 64 INC_STATS(L"DOM.DedicatedWorkerContext.postMessage"); 65 return handlePostMessageCallback(args); 66 } 67 68 v8::Handle<v8::Value> V8DedicatedWorkerContext::webkitPostMessageCallback(const v8::Arguments& args) 69 { 70 INC_STATS(L"DOM.DedicatedWorkerContext.postMessage"); 71 return handlePostMessageCallback(args); 72 } 73 63 74 } // namespace WebCore 64 75 -
trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
r94161 r95362 126 126 SerializedScriptValue::deserializeAndSetProperty(args.Holder(), "data", dataAttr, event->dataAsSerializedScriptValue()); 127 127 return v8::Undefined(); 128 } 128 } 129 130 v8::Handle<v8::Value> V8MessageEvent::webkitInitMessageEventCallback(const v8::Arguments& args) 131 { 132 INC_STATS("DOM.MessageEvent.webkitInitMessageEvent"); 133 return initMessageEventCallback(args); 134 } 135 129 136 130 137 } // namespace WebCore -
trunk/Source/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
r93986 r95362 1 1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved.2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 43 43 namespace WebCore { 44 44 45 v8::Handle<v8::Value> V8MessagePort::postMessageCallback(const v8::Arguments& args)45 static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args) 46 46 { 47 INC_STATS("DOM.MessagePort.postMessage");48 47 MessagePort* messagePort = V8MessagePort::toNative(args.Holder()); 49 48 bool didThrow = false; … … 59 58 messagePort->postMessage(message.release(), &portArray, ec); 60 59 return throwError(ec); 60 } 61 62 v8::Handle<v8::Value> V8MessagePort::postMessageCallback(const v8::Arguments& args) 63 { 64 INC_STATS("DOM.MessagePort.postMessage"); 65 return handlePostMessageCallback(args); 66 } 67 68 v8::Handle<v8::Value> V8MessagePort::webkitPostMessageCallback(const v8::Arguments& args) 69 { 70 INC_STATS("DOM.MessagePort.webkitPostMessage"); 71 return handlePostMessageCallback(args); 61 72 } 62 73 -
trunk/Source/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
r94381 r95362 48 48 namespace WebCore { 49 49 50 v8::Handle<v8::Value> V8Worker::postMessageCallback(const v8::Arguments& args)50 static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args) 51 51 { 52 52 INC_STATS("DOM.Worker.postMessage"); … … 66 66 } 67 67 68 v8::Handle<v8::Value> V8Worker::postMessageCallback(const v8::Arguments& args) 69 { 70 INC_STATS("DOM.Worker.postMessage"); 71 return handlePostMessageCallback(args); 72 } 73 74 v8::Handle<v8::Value> V8Worker::webkitPostMessageCallback(const v8::Arguments& args) 75 { 76 INC_STATS("DOM.Worker.webkitPostMessage"); 77 return handlePostMessageCallback(args); 78 } 79 80 68 81 } // namespace WebCore 69 82 -
trunk/Source/WebCore/dom/MessageEvent.idl
r93766 r95362 1 1 /* 2 2 * Copyright (C) 2007 Henry Mason <hmason@mac.com> 3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 45 46 in [Optional=CallWithDefaultValue] DOMWindow sourceArg, 46 47 in [Optional=CallWithDefaultValue] Array messagePorts); 48 49 [Custom] void webkitInitMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 50 in [Optional=CallWithDefaultValue] boolean canBubbleArg, 51 in [Optional=CallWithDefaultValue] boolean cancelableArg, 52 in [Optional=CallWithDefaultValue] SerializedScriptValue dataArg, 53 in [Optional=CallWithDefaultValue] DOMString originArg, 54 in [Optional=CallWithDefaultValue] DOMString lastEventIdArg, 55 in [Optional=CallWithDefaultValue] DOMWindow sourceArg, 56 in [Optional=CallWithDefaultValue] Array transferables); 47 57 #else 48 58 // Code generator for ObjC bindings does not support custom bindings, thus there is no good way to -
trunk/Source/WebCore/dom/MessagePort.idl
r92433 r95362 1 1 /* 2 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 39 40 [Custom] void postMessage(in DOMString message, in [Optional] Array messagePorts) 40 41 raises(DOMException); 42 [Custom] void webkitPostMessage(in DOMString message, in [Optional] Array transfer) 43 raises(DOMException); 41 44 void start(); 42 45 void close(); -
trunk/Source/WebCore/page/DOMWindow.idl
r95271 r95362 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 215 216 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 216 217 [DoNotCheckDomainSecurity, Custom] void postMessage(in SerializedScriptValue message, in [Optional] Array messagePorts, in DOMString targetOrigin) 218 raises(DOMException); 219 [DoNotCheckDomainSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in [Optional] Array transferList, in DOMString targetOrigin) 217 220 raises(DOMException); 218 221 #else -
trunk/Source/WebCore/workers/DedicatedWorkerContext.idl
r92458 r95362 1 1 /* 2 * Copyright (C) 2009 Google Inc. All rights reserved.2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 44 44 [Custom] void postMessage(in any message, in [Optional] Array messagePorts) 45 45 raises(DOMException); 46 [Custom] void webkitPostMessage(in any message, in [Optional] Array transferList) 47 raises(DOMException); 46 48 #else 47 49 // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port. -
trunk/Source/WebCore/workers/Worker.idl
r94381 r95362 1 1 /* 2 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 46 47 [Custom] void postMessage(in SerialisedScriptValue message, in [Optional] Array messagePorts) 47 48 raises(DOMException); 49 [Custom] void webkitPostMessage(in SerialisedScriptValue message, in [Optional] Array messagePorts) 50 raises(DOMException); 48 51 #else 49 52 // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port.
Note: See TracChangeset
for help on using the changeset viewer.