[webkit-reviews] review granted: [Bug 91704] ShadowRoot.cloneNode() must always throw a DATA_CLONE_ERR exception. : [Attachment 162208] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 5 03:47:14 PDT 2012


Kentaro Hara <haraken at chromium.org> has granted Hajime Morrita
<morrita at google.com>'s request for review:
Bug 91704: ShadowRoot.cloneNode() must always throw a DATA_CLONE_ERR exception.
https://bugs.webkit.org/show_bug.cgi?id=91704

Attachment 162208: Patch
https://bugs.webkit.org/attachment.cgi?id=162208&action=review

------- Additional Comments from Kentaro Hara <haraken at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=162208&action=review


> Source/WebCore/dom/ShadowRoot.idl:42
> +#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT

I'm not sure if this is the best way to keep the GObject API compatible, but it
looks reasonable.

> LayoutTests/fast/dom/shadow/shadowroot-clonenode.html:21
> +var exceptionCode = null;
> +try {
> +    shadowRoot.cloneNode()
> +} catch (e) {
> +    exceptionCode = e.code;
> +}
> +
> +shouldBe('exceptionCode', 'DOMException.DATA_CLONE_ERR')

You can use shouldThrow('shadowRoot.cloneNode()', ...).

> LayoutTests/fast/dom/shadow/shadowroot-clonenode.html:23
> +finishJSTest();

Remove this.


More information about the webkit-reviews mailing list