Commit 2e143a89 authored by ap@webkit.org's avatar ap@webkit.org

Rubber-stamped by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=22306
        Disable channel messaging support

WebCore:
        * bindings/js/JSDOMWindowBase.cpp:
        (jsDOMWindowBaseMessageChannel):
        * page/DOMWindow.idl:
        Hide MesssagePort and MessageChannel global constructors. Due to the way MessageChannel
        constructor is added, it remains enumerable, but undefined.

LayoutTests:
        * fast/events/message-port-no-wrapper.html-disabled: Added a test that I had in my tree.

        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/constructors-cached-expected.txt:
        * fast/dom/constructors-cached-navigate-expected.txt:
        * fast/js/global-constructors-expected.txt:
        Updated results.

        * fast/events/destroyed-atomic-string.html: Removed.
        * fast/events/destroyed-atomic-string.html-disabled: Copied from LayoutTests/fast/events/destroyed-atomic-string.html.
        * fast/events/message-channel-gc-2.html: Removed.
        * fast/events/message-channel-gc-2.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc-2.html.
        * fast/events/message-channel-gc-3.html: Removed.
        * fast/events/message-channel-gc-3.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc-3.html.
        * fast/events/message-channel-gc.html: Removed.
        * fast/events/message-channel-gc.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc.html.
        * fast/events/message-channel-listener-circular-ownership.html: Removed.
        * fast/events/message-channel-listener-circular-ownership.html-disabled: Copied from LayoutTests/fast/events/message-channel-listener-circular-ownership.html.
        * fast/events/message-port-constructor-for-deleted-document.html: Removed.
        * fast/events/message-port-constructor-for-deleted-document.html-disabled: Copied from LayoutTests/fast/events/message-port-constructor-for-deleted-document.html.
        * fast/events/message-port-deleted-document.html: Removed.
        * fast/events/message-port-deleted-document.html-disabled: Copied from LayoutTests/fast/events/message-port-deleted-document.html.
        * fast/events/message-port-deleted-frame.html: Removed.
        * fast/events/message-port-deleted-frame.html-disabled: Copied from LayoutTests/fast/events/message-port-deleted-frame.html.
        * fast/events/message-port-inactive-document.html: Removed.
        * fast/events/message-port-inactive-document.html-disabled: Copied from LayoutTests/fast/events/message-port-inactive-document.html.
        * fast/events/message-port-onclose.html: Removed.
        * fast/events/message-port-onclose.html-disabled: Copied from LayoutTests/fast/events/message-port-onclose.html.
        * fast/events/message-port.html: Removed.
        * fast/events/message-port.html-disabled: Copied from LayoutTests/fast/events/message-port.html.
        * http/tests/security/MessagePort/event-listener-context.html: Removed.
        * http/tests/security/MessagePort/event-listener-context.html-disabled: Copied from LayoutTests/http/tests/security/MessagePort/event-listener-context.html.
        Disabled MessagePort tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bb9f15d5
2008-11-18 Alexey Proskuryakov <ap@webkit.org>
Rubber-stamped by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22306
Disable channel messaging support
* fast/events/message-port-no-wrapper.html-disabled: Added a test that I had in my tree.
* fast/dom/Window/window-properties-expected.txt:
* fast/dom/constructors-cached-expected.txt:
* fast/dom/constructors-cached-navigate-expected.txt:
* fast/js/global-constructors-expected.txt:
Updated results.
* fast/events/destroyed-atomic-string.html: Removed.
* fast/events/destroyed-atomic-string.html-disabled: Copied from LayoutTests/fast/events/destroyed-atomic-string.html.
* fast/events/message-channel-gc-2.html: Removed.
* fast/events/message-channel-gc-2.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc-2.html.
* fast/events/message-channel-gc-3.html: Removed.
* fast/events/message-channel-gc-3.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc-3.html.
* fast/events/message-channel-gc.html: Removed.
* fast/events/message-channel-gc.html-disabled: Copied from LayoutTests/fast/events/message-channel-gc.html.
* fast/events/message-channel-listener-circular-ownership.html: Removed.
* fast/events/message-channel-listener-circular-ownership.html-disabled: Copied from LayoutTests/fast/events/message-channel-listener-circular-ownership.html.
* fast/events/message-port-constructor-for-deleted-document.html: Removed.
* fast/events/message-port-constructor-for-deleted-document.html-disabled: Copied from LayoutTests/fast/events/message-port-constructor-for-deleted-document.html.
* fast/events/message-port-deleted-document.html: Removed.
* fast/events/message-port-deleted-document.html-disabled: Copied from LayoutTests/fast/events/message-port-deleted-document.html.
* fast/events/message-port-deleted-frame.html: Removed.
* fast/events/message-port-deleted-frame.html-disabled: Copied from LayoutTests/fast/events/message-port-deleted-frame.html.
* fast/events/message-port-inactive-document.html: Removed.
* fast/events/message-port-inactive-document.html-disabled: Copied from LayoutTests/fast/events/message-port-inactive-document.html.
* fast/events/message-port-onclose.html: Removed.
* fast/events/message-port-onclose.html-disabled: Copied from LayoutTests/fast/events/message-port-onclose.html.
* fast/events/message-port.html: Removed.
* fast/events/message-port.html-disabled: Copied from LayoutTests/fast/events/message-port.html.
* http/tests/security/MessagePort/event-listener-context.html: Removed.
* http/tests/security/MessagePort/event-listener-context.html-disabled: Copied from LayoutTests/http/tests/security/MessagePort/event-listener-context.html.
Disabled MessagePort tests.
2008-11-17 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
Reviewed by George Staikos.
......
......@@ -906,19 +906,9 @@ window.MediaList.prototype [object MediaListPrototype]
window.MediaList.prototype.appendMedium [function]
window.MediaList.prototype.deleteMedium [function]
window.MediaList.prototype.item [function]
window.MessageChannel [object MessageChannelConstructor]
window.MessageChannel.prototype [object MessageChannelPrototype]
window.MessageChannel [undefined]
window.MessageEvent [object MessageEventConstructor]
window.MessageEvent.prototype [printed above as window.Event.prototype]
window.MessagePort [object MessagePortConstructor]
window.MessagePort.prototype [object MessagePortPrototype]
window.MessagePort.prototype.addEventListener [function]
window.MessagePort.prototype.close [function]
window.MessagePort.prototype.dispatchEvent [function]
window.MessagePort.prototype.postMessage [function]
window.MessagePort.prototype.removeEventListener [function]
window.MessagePort.prototype.start [function]
window.MessagePort.prototype.startConversation [function]
window.MimeType [object MimeTypeConstructor]
window.MimeType.prototype [object MimeTypePrototype]
window.MimeTypeArray [object MimeTypeArrayConstructor]
......
......@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS Image is Image
PASS Image.testProperty is "property set successfully"
PASS MessageChannel is MessageChannel
PASS MessageChannel.testProperty is "property set successfully"
FAIL Testing MessageChannel threw TypeError: Result of expression 'this[constructor]' [undefined] is not an object.
PASS Option is Option
PASS Option.testProperty is "property set successfully"
PASS XMLHttpRequest is XMLHttpRequest
......
......@@ -6,8 +6,8 @@ PASS testFrame.contentWindow.Image is testFrame.contentWindow.Image
PASS testFrame.contentWindow.Image !== window.Image is true
PASS testFrame.contentWindow.Image.testProperty is "property set successfully"
PASS testFrame.contentWindow.MessageChannel is testFrame.contentWindow.MessageChannel
PASS testFrame.contentWindow.MessageChannel !== window.MessageChannel is true
PASS testFrame.contentWindow.MessageChannel.testProperty is "property set successfully"
FAIL testFrame.contentWindow.MessageChannel !== window.MessageChannel should be true. Was false.
FAIL Testing MessageChannel threw TypeError: Result of expression 'testFrame.contentWindow[constructor]' [undefined] is not an object.
PASS testFrame.contentWindow.Option is testFrame.contentWindow.Option
PASS testFrame.contentWindow.Option !== window.Option is true
PASS testFrame.contentWindow.Option.testProperty is "property set successfully"
......@@ -24,11 +24,11 @@ PASS storedConstructors.Image.testProperty is "property set successfully"
PASS testFrame.contentWindow.Image.testProperty is undefined.
PASS testFrame.contentWindow.Image.cachedOnOwnerDocument is true
PASS testFrame.contentWindow.MessageChannel is testFrame.contentWindow.MessageChannel
PASS testFrame.contentWindow.MessageChannel !== window.MessageChannel is true
PASS testFrame.contentWindow.MessageChannel !== storedConstructors.MessageChannel is true
PASS storedConstructors.MessageChannel.testProperty is "property set successfully"
PASS testFrame.contentWindow.MessageChannel.testProperty is undefined.
PASS testFrame.contentWindow.MessageChannel.cachedOnOwnerDocument is true
FAIL testFrame.contentWindow.MessageChannel !== window.MessageChannel should be true. Was false.
FAIL testFrame.contentWindow.MessageChannel !== storedConstructors.MessageChannel should be true. Was false.
FAIL storedConstructors.MessageChannel.testProperty should be property set successfully. Threw exception TypeError: Result of expression 'storedConstructors.MessageChannel' [undefined] is not an object.
FAIL testFrame.contentWindow.MessageChannel.testProperty should be undefined. Threw exception TypeError: Result of expression 'testFrame.contentWindow.MessageChannel' [undefined] is not an object.
FAIL testFrame.contentWindow.MessageChannel.cachedOnOwnerDocument should be true. Threw exception TypeError: Result of expression 'testFrame.contentWindow.MessageChannel' [undefined] is not an object.
PASS testFrame.contentWindow.Option is testFrame.contentWindow.Option
PASS testFrame.contentWindow.Option !== window.Option is true
PASS testFrame.contentWindow.Option !== storedConstructors.Option is true
......
<body>
<p>Test that delivering a message to a port that was never referenced from JS doesn't cause a crash.</p>
<pre id=log></pre>
<script>
function gc()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
var s = new String("abc");
}
}
function log(message)
{
document.getElementById("log").innerHTML += message + "<br>";
}
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var channel = new MessageChannel;
channel.port1.postMessage("msg");
channel.port1.start();
channel = 0;
gc();
setTimeout("log('PASS'); if (window.layoutTestController) layoutTestController.notifyDone()", 100);
</script>
</body>
......@@ -105,9 +105,7 @@ PASS Image.toString() is '[object ImageConstructor]'
PASS KeyboardEvent.toString() is '[object KeyboardEventConstructor]'
PASS MediaError.toString() is '[object MediaErrorConstructor]'
PASS MediaList.toString() is '[object MediaListConstructor]'
PASS MessageChannel.toString() is '[object MessageChannelConstructor]'
PASS MessageEvent.toString() is '[object MessageEventConstructor]'
PASS MessagePort.toString() is '[object MessagePortConstructor]'
PASS MimeType.toString() is '[object MimeTypeConstructor]'
PASS MimeTypeArray.toString() is '[object MimeTypeArrayConstructor]'
PASS MouseEvent.toString() is '[object MouseEventConstructor]'
......
2008-11-18 Alexey Proskuryakov <ap@webkit.org>
Rubber-stamped by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22306
Disable channel messaging support
* bindings/js/JSDOMWindowBase.cpp:
(jsDOMWindowBaseMessageChannel):
* page/DOMWindow.idl:
Hide MesssagePort and MessageChannel global constructors. Due to the way MessageChannel
constructor is added, it remains enumerable, but undefined.
2008-11-17 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
Reviewed by Mark Rowe.
......@@ -419,9 +419,13 @@ JSValue* jsDOMWindowBaseImage(ExecState* exec, const Identifier&, const Property
JSValue* jsDOMWindowBaseMessageChannel(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
#if ENABLE(CHANNEL_MESSAGING)
if (!static_cast<JSDOMWindowBase*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))
return jsUndefined();
return getDOMConstructor<JSMessageChannelConstructor>(exec, static_cast<JSDOMWindowBase*>(asObject(slot.slotBase())));
#else
return jsUndefined();
#endif
}
JSValue* jsDOMWindowBaseOption(ExecState* exec, const Identifier&, const PropertySlot& slot)
......
......@@ -343,7 +343,9 @@ module window {
attribute MessageEventConstructor MessageEvent;
attribute EventExceptionConstructor EventException;
#if ENABLE(CHANNEL_MESSAGING)
attribute MessagePortConstructor MessagePort;
#endif
attribute ClipboardConstructor Clipboard;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment