Skip to content
Permalink
Browse files
Update DOMException name: DataCloneError
https://bugs.webkit.org/show_bug.cgi?id=102521

Reviewed by Kentaro Hara.

Source/WebCore:

Patch 25 of 25 to update DOMException name to match the spec and Firefox.

Updated existing tests.

* dom/DOMCoreException.cpp:

LayoutTests:

Updated tests and expectations.

* fast/dom/Window/anonymous-slot-with-changes-expected.txt:
* fast/dom/Window/window-postmessage-clone-expected.txt:
* fast/dom/shadow/shadowroot-clonenode-expected.txt:
* fast/dom/shadow/shadowroot-clonenode.html:
* fast/events/message-port-multi-expected.txt:
* fast/filesystem/filesystem-unserializable-expected.txt:
* platform/chromium/fast/dom/Window/window-postmessage-clone-expected.txt:
* platform/chromium/fast/dom/Window/window-postmessage-clone-really-deep-array-expected.txt:
* platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:
* webintents/web-intents-obj-constructor-expected.txt:
* webintents/web-intents-obj-constructor.html:


Canonical link: https://commits.webkit.org/120843@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
arv committed Nov 19, 2012
1 parent ea60168 commit be72cdd722721d76dd046c17fe4aef2ae3e0519c
Showing 14 changed files with 57 additions and 23 deletions.
@@ -1,3 +1,24 @@
2012-11-19 Erik Arvidsson <arv@chromium.org>

Update DOMException name: DataCloneError
https://bugs.webkit.org/show_bug.cgi?id=102521

Reviewed by Kentaro Hara.

Updated tests and expectations.

* fast/dom/Window/anonymous-slot-with-changes-expected.txt:
* fast/dom/Window/window-postmessage-clone-expected.txt:
* fast/dom/shadow/shadowroot-clonenode-expected.txt:
* fast/dom/shadow/shadowroot-clonenode.html:
* fast/events/message-port-multi-expected.txt:
* fast/filesystem/filesystem-unserializable-expected.txt:
* platform/chromium/fast/dom/Window/window-postmessage-clone-expected.txt:
* platform/chromium/fast/dom/Window/window-postmessage-clone-really-deep-array-expected.txt:
* platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:
* webintents/web-intents-obj-constructor-expected.txt:
* webintents/web-intents-obj-constructor.html:

2012-11-19 Thiago Marcos P. Santos <thiago.santos@intel.com>

Apply the resolved viewport rules
@@ -1,5 +1,5 @@
Tests that we clone object hierarchies
PASS: 'postMessage((function(){}))' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage((function(){}))' threw Error: DataCloneError: DOM Exception 25
PASS: eventData is null of type object
PASS: eventData is null of type object
PASS: eventData is null of type object
@@ -1,8 +1,8 @@
Tests that we clone object hierarchies

PASS: 'postMessage((function(){}))' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage((function(){}))' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(({get a() { throw "x" }}))' threw x
PASS: 'postMessage((function() {return {get a() { throw "accessor-exn"; }};})())' threw accessor-exn
PASS: 'postMessage((function() {var obja = {get p() { throw "accessor-exn"; }}; return {get a() { return obja; }};})())' threw accessor-exn
@@ -3,7 +3,7 @@ Calling ShadowRoot.cloneNode() should throw a DATA_CLONE_ERR exception.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS shadowRoot.cloneNode() threw exception Error: DATA_CLONE_ERR: DOM Exception 25.
PASS shadowRoot.cloneNode() threw exception Error: DataCloneError: DOM Exception 25.
PASS successfullyParsed is true

TEST COMPLETE
@@ -10,7 +10,7 @@

var host = document.createElement('div');
var shadowRoot = new WebKitShadowRoot(host);
shouldThrow('shadowRoot.cloneNode()', '"Error: DATA_CLONE_ERR: DOM Exception 25"');
shouldThrow('shadowRoot.cloneNode()', '"Error: DataCloneError: DOM Exception 25"');
</script>
<script src="../../js/resources/js-test-post.js"></script>
</html>
@@ -15,10 +15,10 @@ PASS event.ports is non-null and zero length when no port sent
PASS event.ports is non-null and zero length when empty array sent
PASS event.ports contains two ports when two ports sent
PASS event.ports contains two ports when two ports re-sent after error
PASS Sending host object has thrown Error: DATA_CLONE_ERR: DOM Exception 25
PASS Sending host object has thrown Error: DATA_CLONE_ERR: DOM Exception 25
PASS Sending Function object has thrown Error: DATA_CLONE_ERR: DOM Exception 25
PASS Sending Error object has thrown Error: DATA_CLONE_ERR: DOM Exception 25
PASS Sending host object has thrown Error: DataCloneError: DOM Exception 25
PASS Sending host object has thrown Error: DataCloneError: DOM Exception 25
PASS Sending Function object has thrown Error: DataCloneError: DOM Exception 25
PASS Sending Error object has thrown Error: DataCloneError: DOM Exception 25
PASS send-port: transferred one port
PASS send-port-twice: transferred one port twice
PASS send-two-ports: transferred two ports
@@ -3,7 +3,7 @@ This tests if the filesystem object is unserializable by default
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


DATA_CLONE_ERR: DOM Exception 25
DataCloneError: DOM Exception 25
PASS successfullyParsed is true

TEST COMPLETE
@@ -1,8 +1,8 @@
Tests that we clone object hierarchies

PASS: 'postMessage((function(){}))' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage((function(){}))' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(({get a() { throw "x" }}))' threw x
PASS: 'postMessage((function() {return {get a() { throw "accessor-exn"; }};})())' threw accessor-exn
PASS: 'postMessage((function() {var obja = {get p() { throw "accessor-exn"; }}; return {get a() { return obja; }};})())' threw accessor-exn
@@ -1,5 +1,5 @@
Tests that we abort cloning overdeep arrays.

PASS: 'postMessage(reallyDeepArray)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(reallyDeepArray)' threw Error: DataCloneError: DOM Exception 25
PASS: eventData is done of type string

@@ -1,8 +1,8 @@
Tests that we clone object hierarchies

PASS: 'postMessage((function(){}))' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DATA_CLONE_ERR: DOM Exception 25
PASS: 'postMessage((function(){}))' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(window)' threw Error: DataCloneError: DOM Exception 25
PASS: 'postMessage(({get a() { throw "x" }}))' threw x
PASS: eventData is null of type object
PASS: eventData is undefined of type undefined
@@ -32,7 +32,7 @@ PASS new WebKitIntent({'action':'a','type':'b','service':''}) did not throw exce
PASS new WebKitIntent({'action':'a','type':'b','service':null}) threw exception Error: SyntaxError: DOM Exception 12.
PASS new WebKitIntent({'action':'a','type':'b','service':undefined}) threw exception Error: SyntaxError: DOM Exception 12.
PASS new WebKitIntent({'action':'a','type':'b','service':'not a url'}) threw exception Error: SyntaxError: DOM Exception 12.
PASS new WebKitIntent({'action':'a','type':'b','data':window}) threw exception Error: DATA_CLONE_ERR: DOM Exception 25.
PASS new WebKitIntent({'action':'a','type':'b','data':window}) threw exception Error: DataCloneError: DOM Exception 25.
PASS new WebKitIntent({'action':'a','type':'b','extras':null}) did not throw exception.
PASS new WebKitIntent({'action':'a','type':'b','extras':undefined}) did not throw exception.
PASS new WebKitIntent({'action':'a','type':'b','extras':''}) did not throw exception.
@@ -43,7 +43,7 @@ PASS new WebKitIntent({'action':'a','type':'b','extras':['a','b']}) did not thro
* sent explicit intent
* sent intent with extras
* sent intent with port
PASS new WebKitIntent(badPortIntentObj) threw exception Error: DATA_CLONE_ERR: DOM Exception 25.
PASS new WebKitIntent(badPortIntentObj) threw exception Error: DataCloneError: DOM Exception 25.
PASS new WebKitIntent(suggestionsIntent) threw exception Error: SyntaxError: DOM Exception 12.
PASS new WebKitIntent(suggestionsIntent) threw exception Error: SyntaxError: DOM Exception 12.
* sent intent with suggestions
@@ -46,7 +46,7 @@
shouldThrow("new WebKitIntent({'action':'a','type':'b','service':'not a url'})", "'Error: SyntaxError: DOM Exception 12'");

// |data| must be cloneable.
shouldThrow("new WebKitIntent({'action':'a','type':'b','data':window})", "'Error: DATA_CLONE_ERR: DOM Exception 25'");
shouldThrow("new WebKitIntent({'action':'a','type':'b','data':window})", "'Error: DataCloneError: DOM Exception 25'");

// |extras|, if present, must be a dictionary.
shouldNotThrow("new WebKitIntent({'action':'a','type':'b','extras':null})");
@@ -100,7 +100,7 @@
{"action":"action1",
"type":"text/plain+badport",
"data":badchannel.port1};
shouldThrow("new WebKitIntent(badPortIntentObj)", "'Error: DATA_CLONE_ERR: DOM Exception 25'");
shouldThrow("new WebKitIntent(badPortIntentObj)", "'Error: DataCloneError: DOM Exception 25'");

suggestionsIntent =
{"action":"action1",
@@ -1,3 +1,16 @@
2012-11-19 Erik Arvidsson <arv@chromium.org>

Update DOMException name: DataCloneError
https://bugs.webkit.org/show_bug.cgi?id=102521

Reviewed by Kentaro Hara.

Patch 25 of 25 to update DOMException name to match the spec and Firefox.

Updated existing tests.

* dom/DOMCoreException.cpp:

2012-11-19 Tom Hudson <tomhudson@chromium.org>

Improve performance of RenderBoxModelObject::paintTranslucentBorderSides()
@@ -60,7 +60,7 @@ static struct CoreException {
{ "QuotaExceededError", "An attempt was made to add something to storage that exceeded the quota." },
{ "TIMEOUT_ERR", "A timeout occurred." },
{ "INVALID_NODE_TYPE_ERR", "The supplied node is invalid or has an invalid ancestor for this operation." },
{ "DATA_CLONE_ERR", "An object could not be cloned." }
{ "DataCloneError", "An object could not be cloned." }
};

bool DOMCoreException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)

0 comments on commit be72cdd

Please sign in to comment.