| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempts to pass duplicate transferable object should be caught by
postMessage(),
http://www.whatwg.org/specs/web-apps/current-work/#dom-window-postmessage
http://www.whatwg.org/specs/web-apps/current-work/#dom-messageport-postmessage
Add the required case for ArrayBuffer.
R=mkwst,dslomov
BUG=334397
Review URL: https://codereview.chromium.org/138273013
git-svn-id: svn://svn.chromium.org/blink/trunk@165224 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The spec tells us that cloning of neutered objects should throw
DataCloneError:
http://www.whatwg.org/specs/web-apps/current-work/#safe-passing-of-structured-data
And if an attempt, like in the above, to re-transfer a neutered object
is made, DataCloneError should also be thrown:
http://www.whatwg.org/specs/web-apps/current-work/#dom-window-postmessage
http://www.whatwg.org/specs/web-apps/current-work/#dom-messageport-postmessage
The implementation used InvalidStateError instead.
Switch to throwing DataCloneError in SerializedScriptValue, both
during the handling of transferables and the actual cloning step. Hand
in hand with that switch away from the older InvalidStateError,
improve the quality of the error messages that go with the failed
cloning operations. i.e.,
* SerializedScriptValue::create() now takes an ExceptionState for
reporting exceptions. This allows context (e.g., what postMessage()
that is attempting to clone) to be included in the error message.
(As a result, removed the old method for signalling errors via a
bool reference.)
* Rephrase the unmarshalling/extraction of transferable arrays to
also be reported over an incoming ExceptionState.
* Make the error messages emitted by MessagePort.postMessage() a
little bit more consistent.
R=mkwst@chromium.org,dslomov@chromium.org
BUG=327994
Review URL: https://codereview.chromium.org/114363002
git-svn-id: svn://svn.chromium.org/blink/trunk@164106 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
R=jochen@chromium.org,kbr@chromium.org
BUG=259731
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154741
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155611
Review URL: https://chromiumcodereview.appspot.com/19230002
git-svn-id: svn://svn.chromium.org/blink/trunk@155697 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change seems to be causing intermittent failures of webaudio tests. E.g.,
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/15532
BUG=259731
TBR=dslomov@chromium.org,jochen,kbr@chromium.org
Review URL: https://codereview.chromium.org/22267007
git-svn-id: svn://svn.chromium.org/blink/trunk@155615 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
| |
R=jochen@chromium.org,kbr@chromium.org
BUG=259731
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154741
Review URL: https://chromiumcodereview.appspot.com/19230002
git-svn-id: svn://svn.chromium.org/blink/trunk@155611 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broke webgl conformance tests for DataView.
> Use V8 implementation of TypedArrays and DataView in Blink
>
> R=jochen@chromium.org,kbr@chromium.org
> BUG=259731
>
> Review URL: https://chromiumcodereview.appspot.com/19230002
TBR=dslomov@chromium.org
Review URL: https://codereview.chromium.org/20063002
git-svn-id: svn://svn.chromium.org/blink/trunk@154783 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
| |
R=jochen@chromium.org,kbr@chromium.org
BUG=259731
Review URL: https://chromiumcodereview.appspot.com/19230002
git-svn-id: svn://svn.chromium.org/blink/trunk@154741 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://bugs.webkit.org/show_bug.cgi?id=96577
Reviewed by Ojan Vafai.
.:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
Source/JavaScriptCore:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* Configurations/FeatureDefines.xcconfig:
Source/WebCore:
webkitPostMessage works the same as postMessage. The spec and the
implementation have been stable for a while. We should no longer be
exposing this vendor-prefixed API.
This patch places the webkitPostMessage API behind an ENABLE flag.
We're going to try removing this API in the Chromium port. If we don't
run into trouble, we'll remove it in all the other ports as well.
This topic has been discussed on webkit-dev in
http://lists.webkit.org/pipermail/webkit-dev/2012-April/020237.html and
http://lists.webkit.org/pipermail/webkit-dev/2012-September/022189.html
This patch introduces the ENABLE(LEGACY_VENDOR_PREFIXES) flag. Rather
than having a flag for each vendor-prefixed API we're experimenting
with removing, we'll add vendor prefixed APIs to this ENABLE when we
want to try removing them. If we succeed, we'll just delete the APIs.
If we fail, we'll remove them from the ENABLE. That way we avoid the
churn of adding and removing many ENABLE macros.
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* GNUmakefile.features.am:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore):
* bindings/js/JSDedicatedWorkerContextCustom.cpp:
(WebCore):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore):
* bindings/js/JSWorkerCustom.cpp:
(WebCore):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore):
* dom/MessagePort.idl:
* page/DOMWindow.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:
Source/WebKit/chromium:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* features.gypi:
Source/WebKit/mac:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* Configurations/FeatureDefines.xcconfig:
Tools:
Add ENABLE_LEGACY_VENDOR_PREFIXES flag.
* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:
LayoutTests:
Update tests to rely only upon the unprefixed API.
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
(wrapSend):
(wrapFailSend):
* fast/dom/Window/post-message-crash.html:
* fast/dom/Window/window-postmessage-args-expected.txt:
* fast/dom/Window/window-postmessage-args.html:
* fast/events/message-port.html:
* fast/events/resources/message-port-multi.js:
* fast/workers/resources/worker-call.js:
* fast/workers/worker-call-expected.txt:
git-svn-id: svn://svn.chromium.org/blink/trunk@128658 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://bugs.webkit.org/show_bug.cgi?id=73493.
Implement ArrayBuffer transfer, per Khronos spec: http://www.khronos.org/registry/typedarray/specs/latest/#9.
This brings parity with V8 implementation of transferable typed arrays.
Reviewed by Oliver Hunt.
Source/JavaScriptCore:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Extra export.
* wtf/ArrayBuffer.h:
(ArrayBuffer): Added extra export.
Source/WebCore:
Covered by existing tests.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::fillMessagePortArray):
* bindings/js/JSMessagePortCustom.h:
(WebCore):
(WebCore::handlePostMessage):
* bindings/js/ScriptValue.cpp:
(WebCore::ScriptValue::serialize):
* bindings/js/SerializedScriptValue.cpp:
(WebCore):
(WebCore::CloneSerializer::serialize):
(CloneSerializer):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::fillTransferMap):
(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(CloneDeserializer):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
* bindings/js/SerializedScriptValue.h:
(WebCore):
(SerializedScriptValue):
LayoutTests:
* fast/canvas/webgl/arraybuffer-transfer-of-control-expected.txt:
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js: Added tests for Uint8ClampedArray
* fast/dom/Window/window-postmessage-args-expected.txt:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
git-svn-id: svn://svn.chromium.org/blink/trunk@109196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec.
- postMessage should support transfer of MessagePorts
- the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer])
Reviewed by David Levin.
Source/WebCore:
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::handlePostMessageCallback):
LayoutTests:
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
(wrapSend):
(wrapFailSend):
* fast/dom/Window/window-postmessage-args.html:
* platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt:
git-svn-id: svn://svn.chromium.org/blink/trunk@101831 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
|
[Chromium][V8] Implement ArrayBuffer transfer in chromium.
Portions of this patch come from Luke Zarko.
Source/JavaScriptCore:
Reviewed by David Levin.
* wtf/ArrayBuffer.cpp:
(WTF::ArrayBuffer::transfer): Changed prototype from pointers to RefPtr.
* wtf/ArrayBuffer.h:
(WTF::ArrayBufferContents::transfer): Changed prototype from pointers to RefPtr.
(WTF::ArrayBuffer::isNeutered):
* wtf/TypedArrayBase.h:
(WTF::TypedArrayBase::neuter):
Source/WebCore:
Reviewed by David Levin.
Test: fast/canvas/webgl/arraybuffer-transfer-of-control.html
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::V8ObjectMap::Writer::writeTransferredArrayBuffer):
(WebCore::V8ObjectMap::Serializer::Serializer):
(WebCore::V8ObjectMap::Serializer::writeAndGreyArrayBufferView):
(WebCore::V8ObjectMap::Serializer::writeArrayBuffer):
(WebCore::V8ObjectMap::Serializer::writeTransferredArrayBuffer):
(WebCore::V8ObjectMap::Serializer::doSerialize):
(WebCore::V8ObjectMap::Reader::read):
(WebCore::V8ObjectMap::Reader::readArrayBufferView):
(WebCore::V8ObjectMap::Deserializer::Deserializer):
(WebCore::V8ObjectMap::Deserializer::tryGetTransferredArrayBuffer):
(WebCore::SerializedScriptValue::create):
(WebCore::neuterBinding):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::deserialize):
* bindings/v8/SerializedScriptValue.h:
LayoutTests:
Reviewed by David Levin.
* fast/canvas/webgl/arraybuffer-transfer-of-control-expected.txt: Added.
* fast/canvas/webgl/arraybuffer-transfer-of-control.html: Added.
* fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js: Added.
(isTypedArray):
(isDataView):
(isArrayBuffer):
(assertBufferClosed):
(createBuffer):
(checkBuffer):
(createView):
(createEveryView):
(checkView):
(checkEmptyArray):
(wrapSend):
(wrapFailSend):
(testList.name.send):
(testList.test):
(.name.send):
(.test):
(testList.testList.concat.):
(viewAndBuffer.return.name.bufferType.0.send):
(viewAndBuffer.return.test):
():
(squashUnrelatedViews.return.name.bufferType.0.send):
(squashUnrelatedViews.return.test):
(squashUnrelatedViews):
(testList):
(doneTest):
(windowHandleMessage):
* fast/dom/Window/window-postmessage-args.html:
* platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt:
* platform/gtk/Skipped: Skipped arraybuffer-transfer-of-control.js on JSC platfroms.
* platform/mac/Skipped: Skipped arraybuffer-transfer-of-control.js on JSC platfroms.
* platform/qt/Skipped: Skipped arraybuffer-transfer-of-control.js on JSC platfroms.
* platform/win/Skipped: Skipped arraybuffer-transfer-of-control.js on JSC platfroms.
git-svn-id: svn://svn.chromium.org/blink/trunk@101682 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|