<!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>[193101] trunk/Source/WebCore</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/193101">193101</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-03 10:46:51 -0800 (Thu, 03 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add GetterRaisesExceptionWithMessage and SetterRaisesExceptionWithMessage to the code generator.
https://bugs.webkit.org/show_bug.cgi?id=151807

Reviewed by Alex Christensen.

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

While we're at it, rework the existing 'RaisesExceptionWithMessage' concept to use a struct instead of
two separate variables to reduce complexity.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
(GenerateParametersCheck): Deleted.
(GenerateReturnParameters): Deleted.

* bindings/scripts/IDLAttributes.txt:

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):
(webkit_dom_test_obj_get_attr_with_getter_exception_with_message):
(webkit_dom_test_obj_set_attr_with_getter_exception_with_message):
(webkit_dom_test_obj_get_attr_with_setter_exception_with_message):
(webkit_dom_test_obj_set_attr_with_setter_exception_with_message):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
(WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
(WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
(WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
* bindings/scripts/test/ObjC/DOMTestObj.h:

* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj attrWithGetterExceptionWithMessage]):
(-[DOMTestObj setAttrWithGetterExceptionWithMessage:]):
(-[DOMTestObj attrWithSetterExceptionWithMessage]):
(-[DOMTestObj setAttrWithSetterExceptionWithMessage:]):

* bindings/scripts/test/TestObj.idl:

* dom/ExceptionCode.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCoredomExceptionCodeh">trunk/Source/WebCore/dom/ExceptionCode.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/ChangeLog        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2015-12-03  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Add GetterRaisesExceptionWithMessage and SetterRaisesExceptionWithMessage to the code generator.
+        https://bugs.webkit.org/show_bug.cgi?id=151807
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by changes to existing bindings tests).
+
+        While we're at it, rework the existing 'RaisesExceptionWithMessage' concept to use a struct instead of
+        two separate variables to reduce complexity.
+        
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (GenerateImplementationFunctionCall):
+        (GenerateConstructorDefinition):
+        (GenerateParametersCheck): Deleted.
+        (GenerateReturnParameters): Deleted.
+        
+        * bindings/scripts/IDLAttributes.txt:
+        
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_set_property):
+        (webkit_dom_test_obj_get_property):
+        (webkit_dom_test_obj_class_init):
+        (webkit_dom_test_obj_get_attr_with_getter_exception_with_message):
+        (webkit_dom_test_obj_set_attr_with_getter_exception_with_message):
+        (webkit_dom_test_obj_get_attr_with_setter_exception_with_message):
+        (webkit_dom_test_obj_set_attr_with_setter_exception_with_message):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
+        (WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
+        (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
+        (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj attrWithGetterExceptionWithMessage]):
+        (-[DOMTestObj setAttrWithGetterExceptionWithMessage:]):
+        (-[DOMTestObj attrWithSetterExceptionWithMessage]):
+        (-[DOMTestObj setAttrWithSetterExceptionWithMessage:]):
+        
+        * bindings/scripts/test/TestObj.idl:
+        
+        * dom/ExceptionCode.h:
+
</ins><span class="cx"> 2015-12-03  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [css-grid] margin-left:auto and margin-top:auto discards the margin on opposite side
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -2281,8 +2281,13 @@
</span><span class="cx">             $codeGenerator-&gt;AssertNotSequenceType($type);
</span><span class="cx">             my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $interface, $attribute);
</span><span class="cx">             my $implGetterFunctionName = $codeGenerator-&gt;WK_lcfirst($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;} || $name);
</span><del>-            my $getterExceptions = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesException&quot;};
</del><ins>+            my $getterExceptionsWithMessage = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesExceptionWithMessage&quot;};
+            my $getterExceptions = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesException&quot;} || $getterExceptionsWithMessage;
</ins><span class="cx"> 
</span><ins>+            if ($getterExceptions) {
+                $implIncludes{&quot;ExceptionCode.h&quot;} = 1;
+            }
+
</ins><span class="cx">             my $attributeConditionalString = $codeGenerator-&gt;GenerateConditionalString($attribute-&gt;signature);
</span><span class="cx">             push(@implContent, &quot;#if ${attributeConditionalString}\n&quot;) if $attributeConditionalString;
</span><span class="cx"> 
</span><span class="lines">@@ -2315,7 +2320,11 @@
</span><span class="cx">             my @arguments = ();
</span><span class="cx">             if ($getterExceptions &amp;&amp; !HasCustomGetter($attribute-&gt;signature-&gt;extendedAttributes)) {
</span><span class="cx">                 push(@arguments, &quot;ec&quot;);
</span><del>-                push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
</del><ins>+                if ($getterExceptionsWithMessage) {
+                    push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                } else {
+                    push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
+                }
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Global constructors can be disabled at runtime.
</span><span class="lines">@@ -2359,7 +2368,7 @@
</span><span class="cx"> 
</span><span class="cx">                 my $nativeType = GetNativeType($type);
</span><span class="cx">                 my $memoizedType = GetNativeTypeForMemoization($type);
</span><del>-                my $exceptionCode = $getterExceptions ? &quot;ec&quot; : &quot;0&quot;;
</del><ins>+                my $exceptionCode = $getterExceptionsWithMessage ? &quot;ec.code&quot; : ($getterExceptions ? &quot;ec&quot; : &quot;0&quot;);
</ins><span class="cx">                 push(@implContent, &quot;    static NeverDestroyed&lt;const AtomicString&gt; bindingName(\&quot;$interfaceName.$name\&quot;, AtomicString::ConstructFromLiteral);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    if (cursor.isCapturing()) {\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;        $memoizedType memoizedResult = castedThis-&gt;wrapped().$implGetterFunctionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</span><span class="lines">@@ -2408,7 +2417,7 @@
</span><span class="cx">                     AddToImplIncludes(&quot;JS&quot; . $constructorType . &quot;.h&quot;, $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;});
</span><span class="cx">                     push(@implContent, &quot;    return JSValue::encode(JS&quot; . $constructorType . &quot;::getConstructor(state-&gt;vm(), castedThis-&gt;globalObject()));\n&quot;);
</span><span class="cx">                 }
</span><del>-            } elsif (!$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesException&quot;}) {
</del><ins>+            } elsif (!$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesException&quot;} &amp;&amp; !$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;GetterRaisesExceptionWithMessage&quot;}) {
</ins><span class="cx">                 my $cacheIndex = 0;
</span><span class="cx">                 if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CachedAttribute&quot;}) {
</span><span class="cx">                     $cacheIndex = $currentCachedAttribute;
</span><span class="lines">@@ -2606,8 +2615,13 @@
</span><span class="cx">             my $type = $attribute-&gt;signature-&gt;type;
</span><span class="cx">             my $putFunctionName = GetAttributeSetterName($interfaceName, $className, $interface, $attribute);
</span><span class="cx">             my $implSetterFunctionName = $codeGenerator-&gt;WK_ucfirst($name);
</span><del>-            my $setterRaisesException = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;SetterRaisesException&quot;};
</del><ins>+            my $setterRaisesExceptionWithMessage = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;SetterRaisesExceptionWithMessage&quot;};
+            my $setterRaisesException = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;SetterRaisesException&quot;} || $setterRaisesExceptionWithMessage;
</ins><span class="cx"> 
</span><ins>+            if ($setterRaisesException) {
+                $implIncludes{&quot;ExceptionCode.h&quot;} = 1;
+            }
+
</ins><span class="cx">             my $attributeConditionalString = $codeGenerator-&gt;GenerateConditionalString($attribute-&gt;signature);
</span><span class="cx">             push(@implContent, &quot;#if ${attributeConditionalString}\n&quot;) if $attributeConditionalString;
</span><span class="cx"> 
</span><span class="lines">@@ -2702,7 +2716,11 @@
</span><span class="cx">                         push(@implContent, &quot;    auto&amp; impl = castedThis-&gt;wrapped();\n&quot;);
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-                push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;) if $setterRaisesException;
</del><ins>+                if ($setterRaisesExceptionWithMessage) {
+                    push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                } elsif ($setterRaisesException) {
+                    push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
+                }
</ins><span class="cx"> 
</span><span class="cx">                 # If the &quot;StrictTypeChecking&quot; extended attribute is present, and the attribute's type is an
</span><span class="cx">                 # interface type, then if the incoming value does not implement that interface, a TypeError
</span><span class="lines">@@ -2760,7 +2778,10 @@
</span><span class="cx">                         push(@implContent, &quot;    setDOMException(state, ec);\n&quot;) if $setterRaisesException;
</span><span class="cx">                     }
</span><span class="cx">                     if ($svgPropertyType) {
</span><del>-                        if ($setterRaisesException) {
</del><ins>+                        if ($setterRaisesExceptionWithMessage) {
+                            push(@implContent, &quot;    if (!ec.code)\n&quot;);
+                            push(@implContent, &quot;        impl.commitChange();\n&quot;);
+                        } elsif ($setterRaisesException) {
</ins><span class="cx">                             push(@implContent, &quot;    if (!ec)\n&quot;);
</span><span class="cx">                             push(@implContent, &quot;        impl.commitChange();\n&quot;);
</span><span class="cx">                         } else {
</span><span class="lines">@@ -2850,9 +2871,11 @@
</span><span class="cx"> 
</span><span class="cx">             my $isCustom = HasCustomMethod($function-&gt;signature-&gt;extendedAttributes);
</span><span class="cx">             my $isOverloaded = $function-&gt;{overloads} &amp;&amp; @{$function-&gt;{overloads}} &gt; 1;
</span><del>-            my $raisesException = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;};
</del><ins>+
+            die &quot;RaisesException and RaisesExceptionWithMessage are mutually exclusive&quot; if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;} &amp;&amp; $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
+
</ins><span class="cx">             my $raisesExceptionWithMessage = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</span><del>-            die &quot;RaisesException and RaisesExceptionWithMessage are mutually exclusive&quot; if $raisesException &amp;&amp; $raisesExceptionWithMessage;
</del><ins>+            my $raisesException = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;} || $raisesExceptionWithMessage;
</ins><span class="cx"> 
</span><span class="cx">             next if $isCustom &amp;&amp; $isOverloaded &amp;&amp; $function-&gt;{overloadIndex} &gt; 1;
</span><span class="cx"> 
</span><span class="lines">@@ -2904,8 +2927,11 @@
</span><span class="cx">                 } else {
</span><span class="cx">                     GenerateArgumentsCountCheck(\@implContent, $function, $interface);
</span><span class="cx"> 
</span><del>-                    push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;) if $raisesException || $raisesExceptionWithMessage;
-                    push(@implContent, &quot;    String exceptionMessage;\n&quot;) if $raisesExceptionWithMessage;
</del><ins>+                    if ($raisesExceptionWithMessage) {
+                        push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                    } elsif ($raisesException) {
+                        push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
+                    }
</ins><span class="cx"> 
</span><span class="cx">                     my $numParameters = @{$function-&gt;parameters};
</span><span class="cx">                     my ($functionString, $dummy) = GenerateParametersCheck(\@implContent, $function, $interface, $numParameters, $interfaceName, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType);
</span><span class="lines">@@ -2941,11 +2967,14 @@
</span><span class="cx">                     } else {
</span><span class="cx">                         GenerateArgumentsCountCheck(\@implContent, $function, $interface);
</span><span class="cx"> 
</span><del>-                        push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;) if $raisesException || $raisesExceptionWithMessage;
-                        push(@implContent, &quot;    String exceptionMessage;\n&quot;) if $raisesExceptionWithMessage;
</del><ins>+                        if ($raisesExceptionWithMessage) {
+                            push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                        } elsif ($raisesException) {
+                            push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
+                        }
</ins><span class="cx"> 
</span><span class="cx">                         if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CheckSecurityForNode&quot;}) {
</span><del>-                            push(@implContent, &quot;    if (!shouldAllowAccessToNode(state, impl.&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . ($raisesException ? &quot;ec&quot; : $raisesExceptionWithMessage ? &quot;ec, exceptionMessage&quot; : &quot;&quot;) .&quot;)))\n&quot;);
</del><ins>+                            push(@implContent, &quot;    if (!shouldAllowAccessToNode(state, impl.&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . ($raisesException ? &quot;ec&quot; : &quot;&quot;) .&quot;)))\n&quot;);
</ins><span class="cx">                             push(@implContent, &quot;        return JSValue::encode(jsNull());\n&quot;);
</span><span class="cx">                             $implIncludes{&quot;JSDOMBinding.h&quot;} = 1;
</span><span class="cx">                         }
</span><span class="lines">@@ -3292,8 +3321,6 @@
</span><span class="cx"> 
</span><span class="cx">     my $argsIndex = 0;
</span><span class="cx">     my $hasOptionalArguments = 0;
</span><del>-    my $raisesException = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;};
-    my $raisesExceptionWithMessage = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</del><span class="cx"> 
</span><span class="cx">     my $className = $interface-&gt;name;
</span><span class="cx">     my @arguments;
</span><span class="lines">@@ -3539,7 +3566,6 @@
</span><span class="cx"> 
</span><span class="cx">     push(@arguments, &quot;DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred)&quot;) if IsReturningPromise($function);
</span><span class="cx">     push(@arguments, &quot;ec&quot;) if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;} || $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</span><del>-    push(@arguments, &quot;exceptionMessage&quot;) if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</del><span class="cx">     return @arguments;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3821,8 +3847,8 @@
</span><span class="cx">     my $interfaceName = shift;
</span><span class="cx"> 
</span><span class="cx">     my $nondeterministic = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Nondeterministic&quot;};
</span><del>-    my $raisesException = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;};
</del><span class="cx">     my $raisesExceptionWithMessage = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</span><ins>+    my $raisesException = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;} || $raisesExceptionWithMessage;
</ins><span class="cx"> 
</span><span class="cx">     if ($function-&gt;signature-&gt;type eq &quot;void&quot; || IsReturningPromise($function)) {
</span><span class="cx">         if ($nondeterministic) {
</span><span class="lines">@@ -3832,23 +3858,23 @@
</span><span class="cx">             push(@implContent, $indent . &quot;if (!cursor.isReplaying()) {\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    $functionString;\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    setDOMException(state, ec);\n&quot;) if $raisesException;
</span><del>-            push(@implContent, $indent . &quot;    setDOMException(state, ec, exceptionMessage);\n&quot;) if $raisesExceptionWithMessage;
</del><span class="cx">             push(@implContent, $indent . &quot;}\n&quot;);
</span><span class="cx">             push(@implContent, &quot;#else\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;$functionString;\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;setDOMException(state, ec);\n&quot;) if $raisesException;
</span><del>-            push(@implContent, $indent . &quot;setDOMException(state, ec, exceptionMessage);\n&quot;) if $raisesExceptionWithMessage;
</del><span class="cx">             push(@implContent, &quot;#endif\n&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             push(@implContent, $indent . &quot;$functionString;\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;setDOMException(state, ec);\n&quot;) if $raisesException;
</span><del>-            push(@implContent, $indent . &quot;setDOMException(state, ec, exceptionMessage);\n&quot;) if $raisesExceptionWithMessage;
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ($svgPropertyType and !$function-&gt;isStatic) {
</span><del>-            if ($raisesException || $raisesExceptionWithMessage) {
-                push(@implContent, $indent . &quot;if (!ec)\n&quot;); 
</del><ins>+            if ($raisesExceptionWithMessage) {
+                push(@implContent, $indent . &quot;if (!ec.code)\n&quot;);
</ins><span class="cx">                 push(@implContent, $indent . &quot;    impl.commitChange();\n&quot;);
</span><ins>+            } elsif ($raisesException) {
+                push(@implContent, $indent . &quot;if (!ec)\n&quot;);
+                push(@implContent, $indent . &quot;    impl.commitChange();\n&quot;);
</ins><span class="cx">             } else {
</span><span class="cx">                 push(@implContent, $indent . &quot;impl.commitChange();\n&quot;);
</span><span class="cx">             }
</span><span class="lines">@@ -3871,7 +3897,7 @@
</span><span class="cx">             push(@implContent, $indent . &quot;static NeverDestroyed&lt;const AtomicString&gt; bindingName(\&quot;$bindingName\&quot;, AtomicString::ConstructFromLiteral);\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;if (cursor.isCapturing()) {\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    $nativeType memoizedResult = $functionString;\n&quot;);
</span><del>-            my $exceptionCode = $raisesException || $raisesExceptionWithMessage ? &quot;ec&quot; : &quot;0&quot;;
</del><ins>+            my $exceptionCode = $raisesExceptionWithMessage ? &quot;ec.code&quot; : ($raisesException ? &quot;ec&quot; : &quot;0&quot;);
</ins><span class="cx">             push(@implContent, $indent . &quot;    cursor.appendInput&lt;MemoizedDOMResult&lt;$memoizedType&gt;&gt;(bindingName.get().string(), memoizedResult, $exceptionCode);\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;    result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;} else if (cursor.isReplaying()) {\n&quot;);
</span><span class="lines">@@ -3880,7 +3906,8 @@
</span><span class="cx">             # FIXME: the generated code should report an error if an input cannot be fetched or converted.
</span><span class="cx">             push(@implContent, $indent . &quot;    if (input &amp;&amp; input-&gt;convertTo&lt;$memoizedType&gt;(memoizedResult)) {\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, &quot;memoizedResult&quot;, $thisObject) . &quot;;\n&quot;);
</span><del>-            push(@implContent, $indent . &quot;        ec = input-&gt;exceptionCode();\n&quot;) if $raisesException || $raisesExceptionWithMessage;
</del><ins>+            push(@implContent, $indent . &quot;        ec.code = input-&gt;exceptionCode();\n&quot;) if $raisesExceptionWithMessage;
+            push(@implContent, $indent . &quot;        ec = input-&gt;exceptionCode();\n&quot;) if $raisesException &amp;&amp; !$raisesExceptionWithMessage;
</ins><span class="cx">             push(@implContent, $indent . &quot;    } else\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;        result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;} else\n&quot;);
</span><span class="lines">@@ -3892,7 +3919,6 @@
</span><span class="cx">             push(@implContent, $indent . &quot;JSValue result = &quot; . NativeToJSValue($function-&gt;signature, 1, $interfaceName, $functionString, $thisObject) . &quot;;\n&quot;);
</span><span class="cx">         }
</span><span class="cx">         push(@implContent, &quot;\n&quot; . $indent . &quot;setDOMException(state, ec);\n&quot;) if $raisesException;
</span><del>-        push(@implContent, &quot;\n&quot; . $indent . &quot;setDOMException(state, ec, exceptionMessage);\n&quot;) if $raisesExceptionWithMessage;
</del><span class="cx"> 
</span><span class="cx">         if ($codeGenerator-&gt;ExtendedAttributeContains($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CallWith&quot;}, &quot;ScriptState&quot;)) {
</span><span class="cx">             push(@implContent, $indent . &quot;if (UNLIKELY(state-&gt;hadException()))\n&quot;);
</span><span class="lines">@@ -4798,8 +4824,11 @@
</span><span class="cx"> 
</span><span class="cx">             if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesException&quot;} || $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;} || $interface-&gt;extendedAttributes-&gt;{&quot;ConstructorRaisesException&quot;}) {
</span><span class="cx">                 $implIncludes{&quot;ExceptionCode.h&quot;} = 1;
</span><del>-                push(@$outputArray, &quot;    ExceptionCode ec = 0;\n&quot;);
-                push(@$outputArray, &quot;    String exceptionMessage;\n&quot;) if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;};
</del><ins>+                if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;RaisesExceptionWithMessage&quot;}) {
+                    push(@$outputArray, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                } else {
+                    push(@$outputArray, &quot;    ExceptionCode ec = 0;\n&quot;);
+                }
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # FIXME: For now, we do not support SVG constructors.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> ForwardDeclareInHeader
</span><span class="cx"> GenerateIsReachable=|Impl|ImplWebGLRenderingContext|ImplDocument|ImplElementRoot|ImplFrame|ImplOwnerNodeRoot
</span><span class="cx"> GetterRaisesException
</span><ins>+GetterRaisesExceptionWithMessage
</ins><span class="cx"> GlobalContext=DOMWindow|WorkerGlobalScope|DedicatedWorkerGlobalScope
</span><span class="cx"> Immutable
</span><span class="cx"> ImplementationLacksVTable
</span><span class="lines">@@ -112,6 +113,7 @@
</span><span class="cx"> ReportExtraMemoryCost
</span><span class="cx"> RequiresExistingAtomicString
</span><span class="cx"> SetterRaisesException
</span><ins>+SetterRaisesExceptionWithMessage
</ins><span class="cx"> SetterCallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack|ActiveWindow|FirstWindow
</span><span class="cx"> SkipVTableValidation
</span><span class="cx"> StrictTypeChecking
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -102,7 +102,9 @@
</span><span class="cx">     PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR,
</span><span class="cx">     PROP_REFLECTED_CUSTOM_URL_ATTR,
</span><span class="cx">     PROP_ATTR_WITH_GETTER_EXCEPTION,
</span><ins>+    PROP_ATTR_WITH_GETTER_EXCEPTION_WITH_MESSAGE,
</ins><span class="cx">     PROP_ATTR_WITH_SETTER_EXCEPTION,
</span><ins>+    PROP_ATTR_WITH_SETTER_EXCEPTION_WITH_MESSAGE,
</ins><span class="cx">     PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
</span><span class="cx">     PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
</span><span class="cx">     PROP_STRICT_TYPE_CHECKING_ATTRIBUTE,
</span><span class="lines">@@ -211,9 +213,15 @@
</span><span class="cx">     case PROP_ATTR_WITH_GETTER_EXCEPTION:
</span><span class="cx">         webkit_dom_test_obj_set_attr_with_getter_exception(self, g_value_get_long(value));
</span><span class="cx">         break;
</span><ins>+    case PROP_ATTR_WITH_GETTER_EXCEPTION_WITH_MESSAGE:
+        webkit_dom_test_obj_set_attr_with_getter_exception_with_message(self, g_value_get_long(value));
+        break;
</ins><span class="cx">     case PROP_ATTR_WITH_SETTER_EXCEPTION:
</span><span class="cx">         webkit_dom_test_obj_set_attr_with_setter_exception(self, g_value_get_long(value), nullptr);
</span><span class="cx">         break;
</span><ins>+    case PROP_ATTR_WITH_SETTER_EXCEPTION_WITH_MESSAGE:
+        webkit_dom_test_obj_set_attr_with_setter_exception_with_message(self, g_value_get_long(value));
+        break;
</ins><span class="cx">     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
</span><span class="cx">         webkit_dom_test_obj_set_string_attr_with_getter_exception(self, g_value_get_string(value));
</span><span class="cx">         break;
</span><span class="lines">@@ -327,9 +335,15 @@
</span><span class="cx">     case PROP_ATTR_WITH_GETTER_EXCEPTION:
</span><span class="cx">         g_value_set_long(value, webkit_dom_test_obj_get_attr_with_getter_exception(self, nullptr));
</span><span class="cx">         break;
</span><ins>+    case PROP_ATTR_WITH_GETTER_EXCEPTION_WITH_MESSAGE:
+        g_value_set_long(value, webkit_dom_test_obj_get_attr_with_getter_exception_with_message(self));
+        break;
</ins><span class="cx">     case PROP_ATTR_WITH_SETTER_EXCEPTION:
</span><span class="cx">         g_value_set_long(value, webkit_dom_test_obj_get_attr_with_setter_exception(self));
</span><span class="cx">         break;
</span><ins>+    case PROP_ATTR_WITH_SETTER_EXCEPTION_WITH_MESSAGE:
+        g_value_set_long(value, webkit_dom_test_obj_get_attr_with_setter_exception_with_message(self));
+        break;
</ins><span class="cx">     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
</span><span class="cx">         g_value_take_string(value, webkit_dom_test_obj_get_string_attr_with_getter_exception(self, nullptr));
</span><span class="cx">         break;
</span><span class="lines">@@ -700,6 +714,16 @@
</span><span class="cx"> 
</span><span class="cx">     g_object_class_install_property(
</span><span class="cx">         gobjectClass,
</span><ins>+        PROP_ATTR_WITH_GETTER_EXCEPTION_WITH_MESSAGE,
+        g_param_spec_long(
+            &quot;attr-with-getter-exception-with-message&quot;,
+            &quot;TestObj:attr-with-getter-exception-with-message&quot;,
+            &quot;read-write glong TestObj:attr-with-getter-exception-with-message&quot;,
+            G_MINLONG, G_MAXLONG, 0,
+            WEBKIT_PARAM_READWRITE));
+
+    g_object_class_install_property(
+        gobjectClass,
</ins><span class="cx">         PROP_ATTR_WITH_SETTER_EXCEPTION,
</span><span class="cx">         g_param_spec_long(
</span><span class="cx">             &quot;attr-with-setter-exception&quot;,
</span><span class="lines">@@ -710,6 +734,16 @@
</span><span class="cx"> 
</span><span class="cx">     g_object_class_install_property(
</span><span class="cx">         gobjectClass,
</span><ins>+        PROP_ATTR_WITH_SETTER_EXCEPTION_WITH_MESSAGE,
+        g_param_spec_long(
+            &quot;attr-with-setter-exception-with-message&quot;,
+            &quot;TestObj:attr-with-setter-exception-with-message&quot;,
+            &quot;read-write glong TestObj:attr-with-setter-exception-with-message&quot;,
+            G_MINLONG, G_MAXLONG, 0,
+            WEBKIT_PARAM_READWRITE));
+
+    g_object_class_install_property(
+        gobjectClass,
</ins><span class="cx">         PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
</span><span class="cx">         g_param_spec_string(
</span><span class="cx">             &quot;string-attr-with-getter-exception&quot;,
</span><span class="lines">@@ -1997,6 +2031,23 @@
</span><span class="cx">     item-&gt;setAttrWithGetterException(value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+glong webkit_dom_test_obj_get_attr_with_getter_exception_with_message(WebKitDOMTestObj* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
+    WebCore::TestObj* item = WebKit::core(self);
+    glong result = item-&gt;attrWithGetterExceptionWithMessage();
+    return result;
+}
+
+void webkit_dom_test_obj_set_attr_with_getter_exception_with_message(WebKitDOMTestObj* self, glong value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;setAttrWithGetterExceptionWithMessage(value);
+}
+
</ins><span class="cx"> glong webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self)
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><span class="lines">@@ -2020,6 +2071,23 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+glong webkit_dom_test_obj_get_attr_with_setter_exception_with_message(WebKitDOMTestObj* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
+    WebCore::TestObj* item = WebKit::core(self);
+    glong result = item-&gt;attrWithSetterExceptionWithMessage();
+    return result;
+}
+
+void webkit_dom_test_obj_set_attr_with_setter_exception_with_message(WebKitDOMTestObj* self, glong value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;setAttrWithSetterExceptionWithMessage(value);
+}
+
</ins><span class="cx"> gchar* webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError** error)
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -1124,6 +1124,27 @@
</span><span class="cx"> webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_get_attr_with_getter_exception_with_message:
+ * @self: A #WebKitDOMTestObj
+ *
+ * Returns: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API glong
+webkit_dom_test_obj_get_attr_with_getter_exception_with_message(WebKitDOMTestObj* self);
+
+/**
+ * webkit_dom_test_obj_set_attr_with_getter_exception_with_message:
+ * @self: A #WebKitDOMTestObj
+ * @value: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_set_attr_with_getter_exception_with_message(WebKitDOMTestObj* self, glong value);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_get_attr_with_setter_exception:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  *
</span><span class="lines">@@ -1146,6 +1167,27 @@
</span><span class="cx"> webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError** error);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_get_attr_with_setter_exception_with_message:
+ * @self: A #WebKitDOMTestObj
+ *
+ * Returns: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API glong
+webkit_dom_test_obj_get_attr_with_setter_exception_with_message(WebKitDOMTestObj* self);
+
+/**
+ * webkit_dom_test_obj_set_attr_with_setter_exception_with_message:
+ * @self: A #WebKitDOMTestObj
+ * @value: A #glong
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_set_attr_with_setter_exception_with_message(WebKitDOMTestObj* self, glong value);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_get_string_attr_with_getter_exception:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  * @error: #GError
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -237,8 +237,12 @@
</span><span class="cx"> void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><ins>+JSC::EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+void setJSTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><ins>+JSC::EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+void setJSTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="lines">@@ -511,7 +515,9 @@
</span><span class="cx">     { &quot;reflectedCustomURLAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjReflectedCustomURLAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjReflectedCustomURLAttr) } },
</span><span class="cx">     { &quot;typedArrayAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjTypedArrayAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjTypedArrayAttr) } },
</span><span class="cx">     { &quot;attrWithGetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjAttrWithGetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjAttrWithGetterException) } },
</span><ins>+    { &quot;attrWithGetterExceptionWithMessage&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjAttrWithGetterExceptionWithMessage), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjAttrWithGetterExceptionWithMessage) } },
</ins><span class="cx">     { &quot;attrWithSetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjAttrWithSetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjAttrWithSetterException) } },
</span><ins>+    { &quot;attrWithSetterExceptionWithMessage&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjAttrWithSetterExceptionWithMessage), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjAttrWithSetterExceptionWithMessage) } },
</ins><span class="cx">     { &quot;stringAttrWithGetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStringAttrWithGetterException) } },
</span><span class="cx">     { &quot;stringAttrWithSetterException&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStringAttrWithSetterException) } },
</span><span class="cx">     { &quot;strictTypeCheckingAttribute&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStrictTypeCheckingAttribute), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStrictTypeCheckingAttribute) } },
</span><span class="lines">@@ -1248,6 +1254,25 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(slotBase);
+    UNUSED_PARAM(thisValue);
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        if (jsDynamicCast&lt;JSTestObjPrototype*&gt;(slotBase))
+            return reportDeprecatedGetterError(*state, &quot;TestObj&quot;, &quot;attrWithGetterExceptionWithMessage&quot;);
+        return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithGetterExceptionWithMessage&quot;);
+    }
+    ExceptionCodeWithMessage ec;
+    auto&amp; impl = castedThis-&gt;wrapped();
+    JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
+    setDOMException(state, ec);
+    return JSValue::encode(result);
+}
+
+
</ins><span class="cx"> EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -1265,6 +1290,23 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(slotBase);
+    UNUSED_PARAM(thisValue);
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        if (jsDynamicCast&lt;JSTestObjPrototype*&gt;(slotBase))
+            return reportDeprecatedGetterError(*state, &quot;TestObj&quot;, &quot;attrWithSetterExceptionWithMessage&quot;);
+        return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithSetterExceptionWithMessage&quot;);
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
+    return JSValue::encode(result);
+}
+
+
</ins><span class="cx"> EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -2481,6 +2523,26 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+void setJSTestObjAttrWithGetterExceptionWithMessage(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    JSValue value = JSValue::decode(encodedValue);
+    UNUSED_PARAM(baseObject);
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        if (jsDynamicCast&lt;JSTestObjPrototype*&gt;(JSValue::decode(thisValue)))
+            reportDeprecatedSetterError(*state, &quot;TestObj&quot;, &quot;attrWithGetterExceptionWithMessage&quot;);
+        else
+            throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithGetterExceptionWithMessage&quot;);
+        return;
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    int nativeValue = toInt32(state, value, NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return;
+    impl.setAttrWithGetterExceptionWithMessage(nativeValue);
+}
+
+
</ins><span class="cx"> void setJSTestObjAttrWithSetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><span class="lines">@@ -2503,6 +2565,28 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+void setJSTestObjAttrWithSetterExceptionWithMessage(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    JSValue value = JSValue::decode(encodedValue);
+    UNUSED_PARAM(baseObject);
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (UNLIKELY(!castedThis)) {
+        if (jsDynamicCast&lt;JSTestObjPrototype*&gt;(JSValue::decode(thisValue)))
+            reportDeprecatedSetterError(*state, &quot;TestObj&quot;, &quot;attrWithSetterExceptionWithMessage&quot;);
+        else
+            throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;attrWithSetterExceptionWithMessage&quot;);
+        return;
+    }
+    auto&amp; impl = castedThis-&gt;wrapped();
+    ExceptionCodeWithMessage ec;
+    int nativeValue = toInt32(state, value, NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return;
+    impl.setAttrWithSetterExceptionWithMessage(nativeValue, ec);
+    setDOMException(state, ec);
+}
+
+
</ins><span class="cx"> void setJSTestObjStringAttrWithGetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><span class="lines">@@ -3492,10 +3576,9 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithExceptionWithMessage&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    ExceptionCode ec = 0;
-    String exceptionMessage;
-    impl.methodWithExceptionWithMessage(ec, exceptionMessage);
-    setDOMException(state, ec, exceptionMessage);
</del><ins>+    ExceptionCodeWithMessage ec;
+    impl.methodWithExceptionWithMessage(ec);
+    setDOMException(state, ec);
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -85,7 +85,9 @@
</span><span class="cx"> @property BOOL reflectedCustomBooleanAttr;
</span><span class="cx"> @property (copy) NSString *reflectedCustomURLAttr;
</span><span class="cx"> @property int attrWithGetterException;
</span><ins>+@property int attrWithGetterExceptionWithMessage;
</ins><span class="cx"> @property int attrWithSetterException;
</span><ins>+@property int attrWithSetterExceptionWithMessage;
</ins><span class="cx"> @property (copy) NSString *stringAttrWithGetterException;
</span><span class="cx"> @property (copy) NSString *stringAttrWithSetterException;
</span><span class="cx"> @property (strong) DOMTestObj *strictTypeCheckingAttribute;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -381,6 +381,18 @@
</span><span class="cx">     IMPL-&gt;setAttrWithGetterException(newAttrWithGetterException);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (int)attrWithGetterExceptionWithMessage
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;attrWithGetterExceptionWithMessage();
+}
+
+- (void)setAttrWithGetterExceptionWithMessage:(int)newAttrWithGetterExceptionWithMessage
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;setAttrWithGetterExceptionWithMessage(newAttrWithGetterExceptionWithMessage);
+}
+
</ins><span class="cx"> - (int)attrWithSetterException
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><span class="lines">@@ -395,6 +407,18 @@
</span><span class="cx">     WebCore::raiseOnDOMError(ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (int)attrWithSetterExceptionWithMessage
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL-&gt;attrWithSetterExceptionWithMessage();
+}
+
+- (void)setAttrWithSetterExceptionWithMessage:(int)newAttrWithSetterExceptionWithMessage
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;setAttrWithSetterExceptionWithMessage(newAttrWithSetterExceptionWithMessage);
+}
+
</ins><span class="cx"> - (NSString *)stringAttrWithGetterException
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -106,7 +106,9 @@
</span><span class="cx">     [RaisesException] void methodWithException();
</span><span class="cx">     [RaisesExceptionWithMessage] void methodWithExceptionWithMessage();
</span><span class="cx">     [GetterRaisesException] attribute long attrWithGetterException;
</span><ins>+    [GetterRaisesExceptionWithMessage] attribute long attrWithGetterExceptionWithMessage;
</ins><span class="cx">     [SetterRaisesException] attribute long attrWithSetterException;
</span><ins>+    [SetterRaisesExceptionWithMessage] attribute long attrWithSetterExceptionWithMessage;
</ins><span class="cx">     [GetterRaisesException] attribute DOMString stringAttrWithGetterException;
</span><span class="cx">     [SetterRaisesException] attribute DOMString stringAttrWithSetterException;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomExceptionCodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ExceptionCode.h (193100 => 193101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ExceptionCode.h        2015-12-03 18:46:48 UTC (rev 193100)
+++ trunk/Source/WebCore/dom/ExceptionCode.h        2015-12-03 18:46:51 UTC (rev 193101)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- *  Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -19,55 +19,62 @@
</span><span class="cx"> #ifndef ExceptionCode_h
</span><span class="cx"> #define ExceptionCode_h
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/text/WTFString.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-    // The DOM standards use unsigned short for exception codes.
-    // In our DOM implementation we use int instead, and use different
-    // numerical ranges for different types of DOM exception, so that
-    // an exception of any type can be expressed with a single integer.
-    typedef int ExceptionCode;
</del><ins>+// The DOM standards use unsigned short for exception codes.
+// In our DOM implementation we use int instead, and use different
+// numerical ranges for different types of DOM exception, so that
+// an exception of any type can be expressed with a single integer.
+typedef int ExceptionCode;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-    // Some of these are considered historical since they have been
-    // changed or removed from the specifications.
-    enum {
-        INDEX_SIZE_ERR = 1,
-        HIERARCHY_REQUEST_ERR = 3,
-        WRONG_DOCUMENT_ERR = 4,
-        INVALID_CHARACTER_ERR = 5,
-        NO_MODIFICATION_ALLOWED_ERR = 7,
-        NOT_FOUND_ERR = 8,
-        NOT_SUPPORTED_ERR = 9,
-        INUSE_ATTRIBUTE_ERR = 10, // Historical. Only used in setAttributeNode etc which have been removed from the DOM specs.
</del><ins>+// Some of these are considered historical since they have been
+// changed or removed from the specifications.
+enum {
+    INDEX_SIZE_ERR = 1,
+    HIERARCHY_REQUEST_ERR = 3,
+    WRONG_DOCUMENT_ERR = 4,
+    INVALID_CHARACTER_ERR = 5,
+    NO_MODIFICATION_ALLOWED_ERR = 7,
+    NOT_FOUND_ERR = 8,
+    NOT_SUPPORTED_ERR = 9,
+    INUSE_ATTRIBUTE_ERR = 10, // Historical. Only used in setAttributeNode etc which have been removed from the DOM specs.
</ins><span class="cx"> 
</span><del>-        // Introduced in DOM Level 2:
-        INVALID_STATE_ERR = 11,
-        SYNTAX_ERR = 12,
-        INVALID_MODIFICATION_ERR = 13,
-        NAMESPACE_ERR = 14,
-        INVALID_ACCESS_ERR = 15,
</del><ins>+    // Introduced in DOM Level 2:
+    INVALID_STATE_ERR = 11,
+    SYNTAX_ERR = 12,
+    INVALID_MODIFICATION_ERR = 13,
+    NAMESPACE_ERR = 14,
+    INVALID_ACCESS_ERR = 15,
</ins><span class="cx"> 
</span><del>-        // Introduced in DOM Level 3:
-        TYPE_MISMATCH_ERR = 17, // Historical; use TypeError instead
</del><ins>+    // Introduced in DOM Level 3:
+    TYPE_MISMATCH_ERR = 17, // Historical; use TypeError instead
</ins><span class="cx"> 
</span><del>-        // XMLHttpRequest extension:
-        SECURITY_ERR = 18,
</del><ins>+    // XMLHttpRequest extension:
+    SECURITY_ERR = 18,
</ins><span class="cx"> 
</span><del>-        // Others introduced in HTML5:
-        NETWORK_ERR = 19,
-        ABORT_ERR = 20,
-        URL_MISMATCH_ERR = 21,
-        QUOTA_EXCEEDED_ERR = 22,
-        TIMEOUT_ERR = 23,
-        INVALID_NODE_TYPE_ERR = 24,
-        DATA_CLONE_ERR = 25,
</del><ins>+    // Others introduced in HTML5:
+    NETWORK_ERR = 19,
+    ABORT_ERR = 20,
+    URL_MISMATCH_ERR = 21,
+    QUOTA_EXCEEDED_ERR = 22,
+    TIMEOUT_ERR = 23,
+    INVALID_NODE_TYPE_ERR = 24,
+    DATA_CLONE_ERR = 25,
</ins><span class="cx"> 
</span><del>-        // WebIDL exception types, handled by the binding layer.
-        // FIXME: Add GeneralError, EvalError, etc. when implemented in the bindings.
-        TypeError = 105,
-        RangeError = 106,
-    };
</del><ins>+    // WebIDL exception types, handled by the binding layer.
+    // FIXME: Add GeneralError, EvalError, etc. when implemented in the bindings.
+    TypeError = 105,
+    RangeError = 106,
+};
</ins><span class="cx"> 
</span><ins>+struct ExceptionCodeWithMessage {
+    ExceptionCode code { 0 };
+    String message;
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ExceptionCode_h
</span></span></pre>
</div>
</div>

</body>
</html>