summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
commita73d1c176f2f3e0458861de8590dc20321a501ae (patch)
treed897fc5974797c3cb300d7f5916f258df765401f /Source/WebCore/bindings/js
parentc311cf639cc1d6570d67b0a80a8ba04dc992a658 (diff)
downloadqtwebkit-a73d1c176f2f3e0458861de8590dc20321a501ae.tar.gz
Imported WebKit commit a5ae8a56a48e44ebfb9b81aaa5488affaffdb175 (http://svn.webkit.org/repository/webkit/trunk@126420)
New snapshot with OS X 10.6 build fix
Diffstat (limited to 'Source/WebCore/bindings/js')
-rw-r--r--Source/WebCore/bindings/js/JSMessagePortCustom.cpp11
-rw-r--r--Source/WebCore/bindings/js/JSUndoManagerCustom.cpp6
2 files changed, 14 insertions, 3 deletions
diff --git a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
index f44bbb7b4..7a439d360 100644
--- a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
@@ -90,15 +90,20 @@ void fillMessagePortArray(JSC::ExecState* exec, JSC::JSValue value, MessagePortA
return;
// Validation of non-null objects, per HTML5 spec 10.3.3.
if (value.isUndefinedOrNull()) {
- setDOMException(exec, DATA_CLONE_ERR);
+ setDOMException(exec, INVALID_STATE_ERR);
return;
}
// Validation of Objects implementing an interface, per WebIDL spec 4.1.15.
RefPtr<MessagePort> port = toMessagePort(value);
- if (port)
+ if (port) {
+ // Check for duplicate ports.
+ if (portArray.contains(port)) {
+ setDOMException(exec, INVALID_STATE_ERR);
+ return;
+ }
portArray.append(port.release());
- else {
+ } else {
RefPtr<ArrayBuffer> arrayBuffer = toArrayBuffer(value);
if (arrayBuffer)
arrayBuffers.append(arrayBuffer);
diff --git a/Source/WebCore/bindings/js/JSUndoManagerCustom.cpp b/Source/WebCore/bindings/js/JSUndoManagerCustom.cpp
index 94cc0b60f..8fc09c511 100644
--- a/Source/WebCore/bindings/js/JSUndoManagerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSUndoManagerCustom.cpp
@@ -38,6 +38,12 @@ JSValue JSUndoManager::transact(ExecState*)
return jsUndefined();
}
+JSValue JSUndoManager::item(ExecState*)
+{
+ // FIXME: implement JSC bindings
+ return jsUndefined();
+}
+
}
#endif