[JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports
https://bugs.webkit.org/show_bug.cgi?id=87118
Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-30
Reviewed by Adam Barth.
Source/WebCore:
Make SerializedScriptValue.create() throw an exception if one of the
MessagePort objects cannot be found in the transferred ports. This
matches the behavior of the V8 implementation.
Test: webintents/web-intents-obj-constructor.html
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
LayoutTests:
Unskip webintents/web-intents-obj-constructor.html now that
SerializedScriptValue.create() throws an exception if one of the
MessagePort objects cannot be found in the transferred ports.
* platform/efl/test_expectations.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 59fbb79..93f4e9d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2012-05-30 Christophe Dumez <christophe.dumez@intel.com>
+
+ [JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports
+ https://bugs.webkit.org/show_bug.cgi?id=87118
+
+ Reviewed by Adam Barth.
+
+ Unskip webintents/web-intents-obj-constructor.html now that
+ SerializedScriptValue.create() throws an exception if one of the
+ MessagePort objects cannot be found in the transferred ports.
+
+ * platform/efl/test_expectations.txt:
+
2012-05-30 Jessie Berlin <jberlin@apple.com>
[Win] Need results for ietestcenter CSS3 tests
diff --git a/LayoutTests/platform/efl/test_expectations.txt b/LayoutTests/platform/efl/test_expectations.txt
index 180e10c..21b5e13 100644
--- a/LayoutTests/platform/efl/test_expectations.txt
+++ b/LayoutTests/platform/efl/test_expectations.txt
@@ -651,7 +651,6 @@
// Incomplete Web Intents support
BUGWK86866 SKIP : webintents/intent-tag.html = TEXT
BUGWK86865 SKIP : webintents/web-intents-delivery.html = TEXT
-BUGWK87118 : webintents/web-intents-obj-constructor.html = TEXT
// EFL's LayoutTestController does not implement setAutomaticLinkDetectionEnabled
BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e39c382..07b65eb 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2012-05-30 Christophe Dumez <christophe.dumez@intel.com>
+
+ [JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports
+ https://bugs.webkit.org/show_bug.cgi?id=87118
+
+ Reviewed by Adam Barth.
+
+ Make SerializedScriptValue.create() throw an exception if one of the
+ MessagePort objects cannot be found in the transferred ports. This
+ matches the behavior of the V8 implementation.
+
+ Test: webintents/web-intents-obj-constructor.html
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneSerializer::dumpIfTerminal):
+
2012-05-30 Mark Pilgrim <pilgrim@chromium.org>
[Chromium] Call fileUtilities methods directly
diff --git a/Source/WebCore/bindings/js/SerializedScriptValue.cpp b/Source/WebCore/bindings/js/SerializedScriptValue.cpp
index 970c850..c25f768 100644
--- a/Source/WebCore/bindings/js/SerializedScriptValue.cpp
+++ b/Source/WebCore/bindings/js/SerializedScriptValue.cpp
@@ -634,7 +634,9 @@
write(index->second);
return true;
}
- return false;
+ // MessagePort object could not be found in transferred message ports
+ code = ValidationError;
+ return true;
}
if (obj->inherits(&JSArrayBuffer::s_info)) {
RefPtr<ArrayBuffer> arrayBuffer = toArrayBuffer(obj);