<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203313] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203313">203313</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-07-15 17:46:23 -0700 (Fri, 15 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update XPathException to use the description in toString().
https://bugs.webkit.org/show_bug.cgi?id=159848

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by changes to existing tests).

* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException):
* xml/XPathException.h:
(WebCore::XPathException::XPathException):

LayoutTests:

* fast/dom/DOMException/XPathException-expected.txt:
* fast/dom/DOMException/resources/XPathException.js:
* fast/xpath/4XPath/Core/test_parser-expected.txt:
* fast/xpath/invalid-functions-expected.txt:
* fast/xpath/py-dom-xpath/expressions-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMExceptionXPathExceptionexpectedtxt">trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMExceptionresourcesXPathExceptionjs">trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_parserexpectedtxt">trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastxpathinvalidfunctionsexpectedtxt">trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastxpathpydomxpathexpressionsexpectedtxt">trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXPathExceptionh">trunk/Source/WebCore/xml/XPathException.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/ChangeLog        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2016-07-15  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Update XPathException to use the description in toString().
+        https://bugs.webkit.org/show_bug.cgi?id=159848
+
+        Reviewed by Alex Christensen.
+
+        * fast/dom/DOMException/XPathException-expected.txt:
+        * fast/dom/DOMException/resources/XPathException.js:
+        * fast/xpath/4XPath/Core/test_parser-expected.txt:
+        * fast/xpath/invalid-functions-expected.txt:
+        * fast/xpath/py-dom-xpath/expressions-expected.txt:
+
+2016-07-15  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Change toString() behavior for exceptions constructed with &quot;createWithDescriptionAsMessage&quot;.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=159839
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMExceptionXPathExceptionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS e.toString() is &quot;Error: TYPE_ERR: DOM XPath Exception 52&quot;
</del><ins>+PASS e.toString() is &quot;TYPE_ERR (DOM XPath Exception 52): The expression could not be converted to return the specified type.&quot;
</ins><span class="cx"> PASS Object.prototype.toString.call(e) is &quot;[object XPathException]&quot;
</span><span class="cx"> PASS Object.prototype.toString.call(e.__proto__) is &quot;[object XPathExceptionPrototype]&quot;
</span><span class="cx"> PASS e.constructor.toString() is &quot;function XPathException() {\n    [native code]\n}&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMExceptionresourcesXPathExceptionjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">     e = err;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-shouldBeEqualToString(&quot;e.toString()&quot;, &quot;Error: TYPE_ERR: DOM XPath Exception 52&quot;);
</del><ins>+shouldBeEqualToString(&quot;e.toString()&quot;, &quot;TYPE_ERR (DOM XPath Exception 52): The expression could not be converted to return the specified type.&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;Object.prototype.toString.call(e)&quot;, &quot;[object XPathException]&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;Object.prototype.toString.call(e.__proto__)&quot;, &quot;[object XPathExceptionPrototype]&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;e.constructor.toString()&quot;, &quot;function XPathException() {\n    [native code]\n}&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_parserexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> PASS CHILD2/@CODE
</span><span class="cx"> PASS DOM.evaluate(&quot;CHILD2/@CODE * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
</span><span class="cx"> PASS föø
</span><del>-PASS DOM.evaluate(&quot;\\&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
</del><ins>+PASS DOM.evaluate(&quot;\\&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpathinvalidfunctionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><del>-PASS document.createExpression(&quot;foobar()&quot;, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.evaluate(&quot;foobar()&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.createExpression(&quot;position(//div)&quot;, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.evaluate(&quot;position(//div)&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.createExpression(&quot;ceiling(1,2)&quot;, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.evaluate(&quot;ceiling(1,2)&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.createExpression(&quot;ceiling(1,2)&quot;, null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.createExpression(&quot;boolean()&quot;, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS document.evaluate(&quot;boolean()&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
</del><ins>+PASS document.createExpression(&quot;foobar()&quot;, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.evaluate(&quot;foobar()&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.createExpression(&quot;position(//div)&quot;, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.evaluate(&quot;position(//div)&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.createExpression(&quot;ceiling(1,2)&quot;, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.evaluate(&quot;ceiling(1,2)&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.createExpression(&quot;ceiling(1,2)&quot;, null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.createExpression(&quot;boolean()&quot;, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS document.evaluate(&quot;boolean()&quot;, document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpathpydomxpathexpressionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -1,16 +1,16 @@
</span><span class="cx"> PASS //item[@id &gt;= 2 and @id &lt;= &quot;4&quot;]
</span><span class="cx"> PASS //item[@id &gt;= 2 and @id &lt;= 3]
</span><del>-PASS doc.evaluate(&quot;position(1)&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate(&quot;not()&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
</del><ins>+PASS doc.evaluate(&quot;position(1)&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate(&quot;not()&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
</ins><span class="cx"> PASS string-length(100)
</span><del>-PASS doc.evaluate(&quot;count(100)&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate(&quot;adumbrate()&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
</del><ins>+PASS doc.evaluate(&quot;count(100)&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate(&quot;adumbrate()&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
</ins><span class="cx"> PASS //item[@id mod 2 = 0] | //item[@id mod 3 = 0]
</span><del>-PASS doc.evaluate(&quot;//item | 42&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate(&quot;/doc/(item[@id = 2] | item[@id = 6])/@id&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate('&quot;monty&quot;/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
-PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
</del><ins>+PASS doc.evaluate(&quot;//item | 42&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate(&quot;/doc/(item[@id = 2] | item[@id = 6])/@id&quot;, doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('&quot;monty&quot;/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
+PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator..
</ins><span class="cx"> PASS (1)
</span><span class="cx"> PASS ((1 + 1))
</span><span class="cx"> PASS 1 or 1
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/Source/WebCore/ChangeLog        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2016-07-15  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Update XPathException to use the description in toString().
+        https://bugs.webkit.org/show_bug.cgi?id=159848
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by changes to existing tests).
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::createDOMException):
+        * xml/XPathException.h:
+        (WebCore::XPathException::XPathException):
+
+2016-07-15  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Change toString() behavior for exceptions constructed with &quot;createWithDescriptionAsMessage&quot;.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=159839
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -273,7 +273,21 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue errorObject;
</span><span class="cx">     switch (description.type) {
</span><del>-        DOM_EXCEPTION_INTERFACES_FOR_EACH(TRY_TO_CREATE_EXCEPTION)
</del><ins>+    case DOMCoreExceptionType:
+        errorObject = toJS(exec, globalObject, DOMCoreException::create(description));
+        break;
+    case FileExceptionType:
+        errorObject = toJS(exec, globalObject, FileException::create(description));
+        break;
+    case SQLExceptionType:
+        errorObject = toJS(exec, globalObject, SQLException::create(description));
+        break;
+    case SVGExceptionType:
+        errorObject = toJS(exec, globalObject, SVGException::create(description));
+        break;
+    case XPathExceptionType:
+        errorObject = toJS(exec, globalObject, XPathException::create(description));
+        break;
</ins><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">     case IDBDatabaseExceptionType:
</span><span class="cx">         errorObject = toJS(exec, globalObject, DOMCoreException::createWithDescriptionAsMessage(description));
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXPathExceptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XPathException.h (203312 => 203313)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XPathException.h        2016-07-16 00:39:50 UTC (rev 203312)
+++ trunk/Source/WebCore/xml/XPathException.h        2016-07-16 00:46:23 UTC (rev 203313)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit XPathException(const ExceptionCodeDescription&amp; description)
</span><del>-        : ExceptionBase(description)
</del><ins>+        : ExceptionBase(description, ExceptionBase::MessageSource::UseDescription)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>