<!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>[165521] trunk/Source</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/165521">165521</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2014-03-12 17:41:58 -0700 (Wed, 12 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Replay: add infrastructure for memoizing nondeterministic DOM APIs
https://bugs.webkit.org/show_bug.cgi?id=129445
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
There was a bug in the replay inputs code generator that would include
headers for definitions of enum classes, even though they can be safely
forward-declared.
* replay/scripts/CodeGeneratorReplayInputs.py:
(Generator.generate_includes): Only include for copy constructor if the
type is a heavy scalar (i.e., String, URL), not a normal scalar
(i.e., int, double, enum classes).
(Generator.generate_type_forward_declarations): Forward-declare scalars
that are enums or enum classes.
Source/WebCore:
Add two pieces of infrastructure to support memoization of selected DOM APIs.
The first piece is MemoizedDOMResult, a templated replay input class that knows
how to serialize a DOM API's return value, ctype, and exception code.
The second piece is the addition of a new IDL attribute called `Nondeterministic`.
When placed on a DOM function or attribute, the code generator will emit code
to save the DOM API's return value or use a memoized return value instead,
depending on the current replay state. This new emitted code path is behind
a feature flag.
No new tests, as no new inputs are addressed by this change. Per-DOM API replay
regression tests will be added when those APIs are marked as nondeterministic.
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm: Add support of the `Nondeterministic` attribute.
(GenerateImplementation): Handle cases for attributes and getters with exceptions.
(GenerateImplementationFunctionCall): Handle function calls with and without exceptions.
(GetNativeTypeForMemoization): Added. Converts DOMString to WTF::String.
* bindings/scripts/IDLAttributes.txt: Add new `Nondeterministic` attribute.
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjNullableStringValue):
(WebCore::jsTestObjPrototypeFunctionByteMethod):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethod):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethod):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
* replay/AllReplayInputs.h:
* replay/MemoizedDOMResult.cpp: Added.
(WebCore::MemoizedDOMResultBase::type):
(WebCore::MemoizedDOMResultBase::createFromEncodedResult):
(InputTraits<MemoizedDOMResultBase>::type):
(InputTraits<MemoizedDOMResultBase>::encode):
(InputTraits<MemoizedDOMResultBase>::decode):
* replay/MemoizedDOMResult.h: Added. Every specialization of MemoizedDOMResult<T>
stores a binding name, ctype, result value of type T, and optional exception code.
The ctype-specific code uses the CTypeTraits struct to abstract over enum names and
compiler types. The actual encode/decode methods just use methods from EncodingTraits<T>.
(WebCore::MemoizedDOMResultBase::MemoizedDOMResultBase):
(WebCore::MemoizedDOMResultBase::~MemoizedDOMResultBase):
(WebCore::MemoizedDOMResultBase::attribute):
(WebCore::MemoizedDOMResultBase::ctype):
(WebCore::MemoizedDOMResultBase::exceptionCode):
(WebCore::CTypeTraits::decode):
(WebCore::MemoizedDOMResultBase::convertTo):
(JSC::InputTraits<MemoizedDOMResultBase>::queue):
* replay/ReplayInputTypes.cpp: See below.
(WebCore::ReplayInputTypes::ReplayInputTypes):
* replay/ReplayInputTypes.h: See below.
* replay/SerializationMethods.cpp: We need to special-case the encoding
and decoding of MemoizedDOMResult inputs because the input is not part of
the generated per-framework replay inputs enum.
(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
(JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
* replay/WebInputs.json: Add the EncodedCType enum as an external enum type,
so that we can use a generated EncodingTraits specialization to encode the enum.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy">trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayAllReplayInputsh">trunk/Source/WebCore/replay/AllReplayInputs.h</a></li>
<li><a href="#trunkSourceWebCorereplayReplayInputTypescpp">trunk/Source/WebCore/replay/ReplayInputTypes.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplayInputTypesh">trunk/Source/WebCore/replay/ReplayInputTypes.h</a></li>
<li><a href="#trunkSourceWebCorereplaySerializationMethodscpp">trunk/Source/WebCore/replay/SerializationMethods.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayWebInputsjson">trunk/Source/WebCore/replay/WebInputs.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorereplayMemoizedDOMResultcpp">trunk/Source/WebCore/replay/MemoizedDOMResult.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayMemoizedDOMResulth">trunk/Source/WebCore/replay/MemoizedDOMResult.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-03-12 Brian Burg <bburg@apple.com>
+
+ Web Replay: add infrastructure for memoizing nondeterministic DOM APIs
+ https://bugs.webkit.org/show_bug.cgi?id=129445
+
+ Reviewed by Timothy Hatcher.
+
+ There was a bug in the replay inputs code generator that would include
+ headers for definitions of enum classes, even though they can be safely
+ forward-declared.
+
+ * replay/scripts/CodeGeneratorReplayInputs.py:
+ (Generator.generate_includes): Only include for copy constructor if the
+ type is a heavy scalar (i.e., String, URL), not a normal scalar
+ (i.e., int, double, enum classes).
+
+ (Generator.generate_type_forward_declarations): Forward-declare scalars
+ that are enums or enum classes.
+
</ins><span class="cx"> 2014-03-12 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -630,7 +630,7 @@
</span><span class="cx"> # headers with the relevant class declaration.
</span><span class="cx"> include_for_enclosing_class = _type.is_enum() and _type.enclosing_class is not None
</span><span class="cx"> # Include headers for types like URL and String which are copied, not owned or shared.
</span><del>- include_for_copyable_member = _type.mode is TypeModes.HEAVY_SCALAR or _type.mode is TypeModes.SCALAR
</del><ins>+ include_for_copyable_member = _type.mode is TypeModes.HEAVY_SCALAR
</ins><span class="cx"> if (not includes_for_types) ^ (include_for_destructor or include_for_enclosing_class or include_for_copyable_member):
</span><span class="cx"> continue
</span><span class="cx">
</span><span class="lines">@@ -665,8 +665,10 @@
</span><span class="cx"> continue
</span><span class="cx"> if _type.enclosing_class is not None:
</span><span class="cx"> continue
</span><del>- if _type.mode == TypeModes.SCALAR or _type.mode == TypeModes.HEAVY_SCALAR:
</del><ins>+ if _type.mode == TypeModes.HEAVY_SCALAR:
</ins><span class="cx"> continue
</span><ins>+ if _type.mode == TypeModes.SCALAR and not (_type.is_enum() or _type.is_enum_class()):
+ continue
</ins><span class="cx"> if _type.is_enum():
</span><span class="cx"> declaration = "enum %s : %s;" % (_type.type_name(), _type.underlying_storage)
</span><span class="cx"> else:
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/ChangeLog        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -1,3 +1,109 @@
</span><ins>+2014-03-12 Brian Burg <bburg@apple.com>
+
+ Web Replay: add infrastructure for memoizing nondeterministic DOM APIs
+ https://bugs.webkit.org/show_bug.cgi?id=129445
+
+ Reviewed by Timothy Hatcher.
+
+ Add two pieces of infrastructure to support memoization of selected DOM APIs.
+
+ The first piece is MemoizedDOMResult, a templated replay input class that knows
+ how to serialize a DOM API's return value, ctype, and exception code.
+
+ The second piece is the addition of a new IDL attribute called `Nondeterministic`.
+ When placed on a DOM function or attribute, the code generator will emit code
+ to save the DOM API's return value or use a memoized return value instead,
+ depending on the current replay state. This new emitted code path is behind
+ a feature flag.
+
+ No new tests, as no new inputs are addressed by this change. Per-DOM API replay
+ regression tests will be added when those APIs are marked as nondeterministic.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/CodeGeneratorJS.pm: Add support of the `Nondeterministic` attribute.
+ (GenerateImplementation): Handle cases for attributes and getters with exceptions.
+ (GenerateImplementationFunctionCall): Handle function calls with and without exceptions.
+ (GetNativeTypeForMemoization): Added. Converts DOMString to WTF::String.
+ * bindings/scripts/IDLAttributes.txt: Add new `Nondeterministic` attribute.
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ (WebCore::jsTestEventTargetPrototypeFunctionItem):
+ (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
+ (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjAttrWithGetterException):
+ (WebCore::jsTestObjStringAttrWithGetterException):
+ (WebCore::jsTestObjWithScriptStateAttributeRaises):
+ (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
+ (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
+ (WebCore::jsTestObjNullableStringValue):
+ (WebCore::jsTestObjPrototypeFunctionByteMethod):
+ (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionOctetMethod):
+ (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionLongMethod):
+ (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionObjMethod):
+ (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
+ (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
+ (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
+ (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
+ (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
+ (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
+ (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
+ (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
+ (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
+ (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
+ (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
+ (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
+ (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
+ (WebCore::jsTestObjPrototypeFunctionStrictFunction):
+ (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
+ (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::jsTestTypedefsAttrWithGetterException):
+ (WebCore::jsTestTypedefsStringAttrWithGetterException):
+ (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
+ (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
+ (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
+ (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
+ (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
+
+ * replay/AllReplayInputs.h:
+ * replay/MemoizedDOMResult.cpp: Added.
+ (WebCore::MemoizedDOMResultBase::type):
+ (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
+ (InputTraits<MemoizedDOMResultBase>::type):
+ (InputTraits<MemoizedDOMResultBase>::encode):
+ (InputTraits<MemoizedDOMResultBase>::decode):
+
+ * replay/MemoizedDOMResult.h: Added. Every specialization of MemoizedDOMResult<T>
+ stores a binding name, ctype, result value of type T, and optional exception code.
+ The ctype-specific code uses the CTypeTraits struct to abstract over enum names and
+ compiler types. The actual encode/decode methods just use methods from EncodingTraits<T>.
+
+ (WebCore::MemoizedDOMResultBase::MemoizedDOMResultBase):
+ (WebCore::MemoizedDOMResultBase::~MemoizedDOMResultBase):
+ (WebCore::MemoizedDOMResultBase::attribute):
+ (WebCore::MemoizedDOMResultBase::ctype):
+ (WebCore::MemoizedDOMResultBase::exceptionCode):
+ (WebCore::CTypeTraits::decode):
+ (WebCore::MemoizedDOMResultBase::convertTo):
+ (JSC::InputTraits<MemoizedDOMResultBase>::queue):
+ * replay/ReplayInputTypes.cpp: See below.
+ (WebCore::ReplayInputTypes::ReplayInputTypes):
+ * replay/ReplayInputTypes.h: See below.
+ * replay/SerializationMethods.cpp: We need to special-case the encoding
+ and decoding of MemoizedDOMResult inputs because the input is not part of
+ the generated per-framework replay inputs enum.
+ (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
+ (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
+
+ * replay/WebInputs.json: Add the EncodedCType enum as an external enum type,
+ so that we can use a generated EncodingTraits specialization to encode the enum.
+
</ins><span class="cx"> 2014-03-11 Jae Hyun Park <jaepark@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make HTMLCanvasElement::is3D private
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -3510,6 +3510,8 @@
</span><span class="cx">                 990A1A0518ADA48400183FD1 /* ReplayInputTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 990A19F518ADA48400183FD1 /* ReplayInputTypes.h */; };
</span><span class="cx">                 9920398218B95BC600B39AF9 /* UserInputBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9920398018B95BC600B39AF9 /* UserInputBridge.cpp */; };
</span><span class="cx">                 9920398318B95BC600B39AF9 /* UserInputBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 9920398118B95BC600B39AF9 /* UserInputBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                99C7CCB318C663E40032E413 /* MemoizedDOMResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */; };
+                99C7CCB518C6B8990032E413 /* MemoizedDOMResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 99C7CCB418C6B8990032E413 /* MemoizedDOMResult.cpp */; };
</ins><span class="cx">                 99CC0B4D18BE9849006CEBCC /* AllReplayInputs.h in Headers */ = {isa = PBXBuildFile; fileRef = 99CC0B3818BE9849006CEBCC /* AllReplayInputs.h */; };
</span><span class="cx">                 99CC0B4E18BE9849006CEBCC /* CapturingInputCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 99CC0B3918BE9849006CEBCC /* CapturingInputCursor.cpp */; };
</span><span class="cx">                 99CC0B4F18BE9849006CEBCC /* CapturingInputCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 99CC0B3A18BE9849006CEBCC /* CapturingInputCursor.h */; };
</span><span class="lines">@@ -10512,6 +10514,8 @@
</span><span class="cx">                 990A19F518ADA48400183FD1 /* ReplayInputTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplayInputTypes.h; sourceTree = "<group>"; };
</span><span class="cx">                 9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = "<group>"; };
</span><ins>+                99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoizedDOMResult.h; sourceTree = "<group>"; };
+                99C7CCB418C6B8990032E413 /* MemoizedDOMResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoizedDOMResult.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 99CC0B3818BE9849006CEBCC /* AllReplayInputs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllReplayInputs.h; sourceTree = "<group>"; };
</span><span class="cx">                 99CC0B3918BE9849006CEBCC /* CapturingInputCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CapturingInputCursor.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 99CC0B3A18BE9849006CEBCC /* CapturingInputCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CapturingInputCursor.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -17935,6 +17939,8 @@
</span><span class="cx">                                 99CC0B3B18BE9849006CEBCC /* EventLoopInputDispatcher.cpp */,
</span><span class="cx">                                 99CC0B3C18BE9849006CEBCC /* EventLoopInputDispatcher.h */,
</span><span class="cx">                                 99CC0B3D18BE9849006CEBCC /* FunctorInputCursor.h */,
</span><ins>+                                99C7CCB418C6B8990032E413 /* MemoizedDOMResult.cpp */,
+                                99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */,
</ins><span class="cx">                                 99CC0B3E18BE9849006CEBCC /* ReplayController.cpp */,
</span><span class="cx">                                 99CC0B3F18BE9849006CEBCC /* ReplayController.h */,
</span><span class="cx">                                 99CC0B4018BE9849006CEBCC /* ReplayingInputCursor.cpp */,
</span><span class="lines">@@ -23846,6 +23852,7 @@
</span><span class="cx">                                 977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */,
</span><span class="cx">                                 977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */,
</span><span class="cx">                                 A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */,
</span><ins>+                                99C7CCB318C663E40032E413 /* MemoizedDOMResult.h in Headers */,
</ins><span class="cx">                                 A8CFF7A60A156978000A4234 /* HTMLFontElement.h in Headers */,
</span><span class="cx">                                 977B386F122883E900B81FF8 /* HTMLFormattingElementList.h in Headers */,
</span><span class="cx">                                 A81369CE097374F600D74463 /* HTMLFormControlElement.h in Headers */,
</span><span class="lines">@@ -28905,6 +28912,7 @@
</span><span class="cx">                                 B237C8A70D344D110013F707 /* SVGFontData.cpp in Sources */,
</span><span class="cx">                                 B2A1F2AA0CEF0ABF00442F6A /* SVGFontElement.cpp in Sources */,
</span><span class="cx">                                 B2227A140D00BF220071B782 /* SVGFontFaceElement.cpp in Sources */,
</span><ins>+                                99C7CCB518C6B8990032E413 /* MemoizedDOMResult.cpp in Sources */,
</ins><span class="cx">                                 B2227A170D00BF220071B782 /* SVGFontFaceFormatElement.cpp in Sources */,
</span><span class="cx">                                 B2227A1A0D00BF220071B782 /* SVGFontFaceNameElement.cpp in Sources */,
</span><span class="cx">                                 B2227A1D0D00BF220071B782 /* SVGFontFaceSrcElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
</span><span class="cx"> # Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
</span><span class="cx"> # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
</span><del>-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
</span><span class="cx"> # Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><span class="cx"> # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
</span><span class="lines">@@ -2118,6 +2118,7 @@
</span><span class="cx"> $codeGenerator->AssertNotSequenceType($type);
</span><span class="cx"> my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $attribute);
</span><span class="cx"> my $implGetterFunctionName = $codeGenerator->WK_lcfirst($attribute->signature->extendedAttributes->{"ImplementedAs"} || $name);
</span><ins>+ my $getterExceptions = $attribute->signature->extendedAttributes->{"GetterRaisesException"};
</ins><span class="cx">
</span><span class="cx"> my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
</span><span class="cx"> push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
</span><span class="lines">@@ -2151,6 +2152,12 @@
</span><span class="cx"> push(@implContent, " UNUSED_PARAM(slotBase);\n");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ my @arguments = ();
+ if ($getterExceptions && !HasCustomGetter($attribute->signature->extendedAttributes)) {
+ push(@arguments, "ec");
+ push(@implContent, " ExceptionCode ec = 0;\n");
+ }
+
</ins><span class="cx"> # Global constructors can be disabled at runtime.
</span><span class="cx"> if ($attribute->signature->type =~ /Constructor$/) {
</span><span class="cx"> if ($attribute->signature->extendedAttributes->{"EnabledAtRuntime"}) {
</span><span class="lines">@@ -2181,6 +2188,38 @@
</span><span class="cx"> push(@implContent, " return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if ($attribute->signature->extendedAttributes->{"Nondeterministic"}) {
+ $implIncludes{"<replay/InputCursor.h>"} = 1;
+ push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
+ push(@implContent, " JSGlobalObject* globalObject = exec->lexicalGlobalObject();\n");
+ push(@implContent, " InputCursor& cursor = globalObject->inputCursor();\n");
+
+ $implIncludes{"MemoizedDOMResult.h"} = 1;
+ my $nativeType = GetNativeType($type);
+ my $memoizedType = GetNativeTypeForMemoization($type);
+ my $exceptionCode = $getterExceptions ? "ec" : "0";
+ push(@implContent, " DEFINE_STATIC_LOCAL(const AtomicString, bindingName, (\"$interfaceName.$name\", AtomicString::ConstructFromLiteral));\n");
+ push(@implContent, " if (cursor.isCapturing()) {\n");
+ push(@implContent, " $memoizedType memoizedResult = castedThis->impl().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
+ push(@implContent, " cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName, memoizedResult, $exceptionCode);\n");
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "memoizedResult", "castedThis") . ";\n");
+ push(@implContent, " setDOMException(exec, ec);\n") if $getterExceptions;
+ push(@implContent, " return JSValue::encode(result);\n");
+ push(@implContent, " }\n");
+ push(@implContent, "\n");
+ push(@implContent, " if (cursor.isReplaying()) {\n");
+ push(@implContent, " $memoizedType memoizedResult;\n");
+ push(@implContent, " MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
+ push(@implContent, " if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
+ # FIXME: the generated code should report an error if an input cannot be fetched or converted.
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "memoizedResult", "castedThis") . ";\n");
+ push(@implContent, " setDOMException(exec, input->exceptionCode());\n") if $getterExceptions;
+ push(@implContent, " return JSValue::encode(result);\n");
+ push(@implContent, " }\n");
+ push(@implContent, " }\n");
+ push(@implContent, "#endif\n");
+ } # attribute Nondeterministic
+
</ins><span class="cx"> if (HasCustomGetter($attribute->signature->extendedAttributes)) {
</span><span class="cx"> push(@implContent, " return JSValue::encode(castedThis->$implGetterFunctionName(exec));\n");
</span><span class="cx"> } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
</span><span class="lines">@@ -2273,9 +2312,6 @@
</span><span class="cx"> push(@implContent, " return JSValue::encode(result);\n");
</span><span class="cx">
</span><span class="cx"> } else {
</span><del>- my @arguments = ("ec");
- push(@implContent, " ExceptionCode ec = 0;\n");
-
</del><span class="cx"> if ($isNullable) {
</span><span class="cx"> push(@implContent, " bool isNull = false;\n");
</span><span class="cx"> unshift(@arguments, "isNull");
</span><span class="lines">@@ -2285,10 +2321,10 @@
</span><span class="cx">
</span><span class="cx"> if ($svgPropertyOrListPropertyType) {
</span><span class="cx"> push(@implContent, " $svgPropertyOrListPropertyType impl(*castedThis->impl());\n");
</span><del>- push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</ins><span class="cx"> } else {
</span><span class="cx"> push(@implContent, " $interfaceName& impl = castedThis->impl();\n");
</span><del>- push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($isNullable) {
</span><span class="lines">@@ -3501,11 +3537,26 @@
</span><span class="cx"> my $svgPropertyType = shift;
</span><span class="cx"> my $interfaceName = shift;
</span><span class="cx">
</span><ins>+ my $nondeterministic = $function->signature->extendedAttributes->{"Nondeterministic"};
</ins><span class="cx"> my $raisesException = $function->signature->extendedAttributes->{"RaisesException"};
</span><span class="cx">
</span><span class="cx"> if ($function->signature->type eq "void") {
</span><del>- push(@implContent, $indent . "$functionString;\n");
- push(@implContent, $indent . "setDOMException(exec, ec);\n") if $raisesException;
</del><ins>+ if ($nondeterministic) {
+ $implIncludes{"<replay/InputCursor.h>"} = 1;
+ push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
+ push(@implContent, $indent . "InputCursor& cursor = exec->lexicalGlobalObject()->inputCursor();\n");
+ push(@implContent, $indent . "if (!cursor.isReplaying()) {\n");
+ push(@implContent, $indent . " $functionString;\n");
+ push(@implContent, $indent . " setDOMException(exec, ec);\n") if $raisesException;
+ push(@implContent, $indent . "}\n");
+ push(@implContent, "#else\n");
+ push(@implContent, $indent . "$functionString;\n");
+ push(@implContent, $indent . "setDOMException(exec, ec);\n") if $raisesException;
+ push(@implContent, "#endif\n");
+ } else {
+ push(@implContent, $indent . "$functionString;\n");
+ push(@implContent, $indent . "setDOMException(exec, ec);\n") if $raisesException;
+ }
</ins><span class="cx">
</span><span class="cx"> if ($svgPropertyType and !$function->isStatic) {
</span><span class="cx"> if ($raisesException) {
</span><span class="lines">@@ -3519,8 +3570,39 @@
</span><span class="cx"> push(@implContent, $indent . "return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> } else {
</span><span class="cx"> my $thisObject = $function->isStatic ? 0 : "castedThis";
</span><del>- push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $interfaceName, $functionString, $thisObject) . ";\n");
- push(@implContent, $indent . "setDOMException(exec, ec);\n") if $raisesException;
</del><ins>+ if ($nondeterministic) {
+ $implIncludes{"MemoizedDOMResult.h"} = 1;
+ $implIncludes{"<replay/InputCursor.h>"} = 1;
+ my $nativeType = GetNativeTypeFromSignature($function->signature);
+ my $memoizedType = GetNativeTypeForMemoization($function->signature->type);
+ my $bindingName = $interfaceName . "." . $function->signature->name;
+ push(@implContent, $indent . "JSValue result;\n");
+ push(@implContent, "#if ENABLE(WEB_REPLAY)\n");
+ push(@implContent, $indent . "InputCursor& cursor = exec->lexicalGlobalObject()->inputCursor();\n");
+ push(@implContent, $indent . "DEFINE_STATIC_LOCAL(const AtomicString, bindingName, (\"$bindingName\", AtomicString::ConstructFromLiteral));\n");
+ push(@implContent, $indent . "if (cursor.isCapturing()) {\n");
+ push(@implContent, $indent . " $nativeType memoizedResult = $functionString;\n");
+ my $exceptionCode = $raisesException ? "ec" : "0";
+ push(@implContent, $indent . " cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName, memoizedResult, $exceptionCode);\n");
+ push(@implContent, $indent . " result = " . NativeToJSValue($function->signature, 1, $interfaceName, "memoizedResult", $thisObject) . ";\n");
+ push(@implContent, $indent . "} else if (cursor.isReplaying()) {\n");
+ push(@implContent, $indent . " MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
+ push(@implContent, $indent . " $memoizedType memoizedResult;\n");
+ # FIXME: the generated code should report an error if an input cannot be fetched or converted.
+ push(@implContent, $indent . " if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
+ push(@implContent, $indent . " result = " . NativeToJSValue($function->signature, 1, $interfaceName, "memoizedResult", $thisObject) . ";\n");
+ push(@implContent, $indent . " ec = input->exceptionCode();\n") if $raisesException;
+ push(@implContent, $indent . " } else\n");
+ push(@implContent, $indent . " result = " . NativeToJSValue($function->signature, 1, $interfaceName, $functionString, $thisObject) . ";\n");
+ push(@implContent, $indent . "} else\n");
+ push(@implContent, $indent . " result = " . NativeToJSValue($function->signature, 1, $interfaceName, $functionString, $thisObject) . ";\n");
+ push(@implContent, "#else\n");
+ push(@implContent, $indent . "result = " . NativeToJSValue($function->signature, 1, $interfaceName, $functionString, $thisObject) . ";\n");
+ push(@implContent, "#endif\n");
+ } else {
+ push(@implContent, $indent . "JSValue result = " . NativeToJSValue($function->signature, 1, $interfaceName, $functionString, $thisObject) . ";\n");
+ }
+ push(@implContent, "\n" . $indent . "setDOMException(exec, ec);\n") if $raisesException;
</ins><span class="cx">
</span><span class="cx"> if ($codeGenerator->ExtendedAttributeContains($function->signature->extendedAttributes->{"CallWith"}, "ScriptState")) {
</span><span class="cx"> push(@implContent, $indent . "if (UNLIKELY(exec->hadException()))\n");
</span><span class="lines">@@ -3608,6 +3690,14 @@
</span><span class="cx"> return GetNativeType($type);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub GetNativeTypeForMemoization
+{
+ my $type = shift;
+ return "String" if $type eq "DOMString";
+
+ return GetNativeType($type);
+}
+
</ins><span class="cx"> sub GetSVGPropertyTypes
</span><span class="cx"> {
</span><span class="cx"> my $implType = shift;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> NamedConstructor=*
</span><span class="cx"> NewImpurePropertyFiresWatchpoints
</span><span class="cx"> NoInterfaceObject
</span><ins>+Nondeterministic
</ins><span class="cx"> NotEnumerable
</span><span class="cx"> NotDeletable
</span><span class="cx"> ObjCCustomImplementation
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -210,8 +210,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.item(index)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.item(index)));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -259,8 +258,8 @@
</span><span class="cx"> Event* evt(toEvent(exec->argument(0)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = jsBoolean(impl.dispatchEvent(evt, ec));
</ins><span class="cx">
</span><del>- JSC::JSValue result = jsBoolean(impl.dispatchEvent(evt, ec));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -685,8 +685,8 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(1)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsMethod2(scriptContext, strArg, objArg, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsMethod2(scriptContext, strArg, objArg, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -751,8 +751,8 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(1)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalMethod2(&impl, scriptContext, strArg, objArg, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalMethod2(&impl, scriptContext, strArg, objArg, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx"> }
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = jsNumber(impl.attrWithGetterException(ec));
</del><ins>+ JSValue result = jsNumber(impl.attrWithGetterException(ec));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -978,7 +978,7 @@
</span><span class="cx"> }
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
</del><ins>+ JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -1072,7 +1072,7 @@
</span><span class="cx"> }
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -1095,7 +1095,7 @@
</span><span class="cx"> if (!scriptContext)
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -1139,7 +1139,7 @@
</span><span class="cx"> if (!scriptContext)
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -1658,7 +1658,7 @@
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> bool isNull = false;
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>- JSC::JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
</del><ins>+ JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
</ins><span class="cx"> if (isNull)
</span><span class="cx"> return JSValue::encode(jsNull());
</span><span class="cx"> setDOMException(exec, ec);
</span><span class="lines">@@ -2673,8 +2673,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = jsNumber(impl.byteMethod());
</del><ins>+ JSValue result = jsNumber(impl.byteMethod());
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2697,8 +2696,7 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(2)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, objArg));
</del><ins>+ JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, objArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2710,8 +2708,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = jsNumber(impl.octetMethod());
</del><ins>+ JSValue result = jsNumber(impl.octetMethod());
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2734,8 +2731,7 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(2)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, objArg));
</del><ins>+ JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, objArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2747,8 +2743,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = jsNumber(impl.longMethod());
</del><ins>+ JSValue result = jsNumber(impl.longMethod());
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2771,8 +2766,7 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(2)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, objArg));
</del><ins>+ JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, objArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2784,8 +2778,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2808,8 +2801,7 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(2)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, objArg)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, objArg)));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2843,8 +2835,7 @@
</span><span class="cx"> int longArg(toInt32(exec, exec->argument(0), NormalConversion));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl.methodReturningSequence(longArg));
</del><ins>+ JSValue result = jsArray(exec, castedThis->globalObject(), impl.methodReturningSequence(longArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2884,8 +2875,8 @@
</span><span class="cx"> TestObj* objArg(toTestObj(exec->argument(1)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3011,8 +3002,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
</ins><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> return JSValue::encode(result);
</span><span class="lines">@@ -3041,8 +3031,8 @@
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><span class="cx"> ExceptionCode ec = 0;
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -3091,8 +3081,8 @@
</span><span class="cx"> ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!scriptContext)
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -3110,8 +3100,7 @@
</span><span class="cx"> ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!scriptContext)
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
</ins><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> return JSValue::encode(result);
</span><span class="lines">@@ -3353,8 +3342,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = jsStringWithCache(exec, impl.conditionalMethod1());
</del><ins>+ JSValue result = jsStringWithCache(exec, impl.conditionalMethod1());
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3633,16 +3621,14 @@
</span><span class="cx">
</span><span class="cx"> size_t argsCount = exec->argumentCount();
</span><span class="cx"> if (argsCount <= 0) {
</span><del>-
- JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional());
</del><ins>+ JSValue result = jsNumber(TestObj::classMethodWithOptional());
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int arg(toInt32(exec, exec->argument(0), NormalConversion));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
</del><ins>+ JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3761,8 +3747,8 @@
</span><span class="cx"> Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction(values, ec));
</ins><span class="cx">
</span><del>- JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction(values, ec));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3781,8 +3767,8 @@
</span><span class="cx"> RefPtr<DOMStringList> values(toDOMStringList(exec, exec->argument(0)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.domStringListFunction(values, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.domStringListFunction(values, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3798,8 +3784,8 @@
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> if (!shouldAllowAccessToNode(exec, impl.getSVGDocument(ec)))
</span><span class="cx"> return JSValue::encode(jsNull());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.getSVGDocument(ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.getSVGDocument(ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3880,8 +3866,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3893,8 +3878,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx"> TestObj& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3930,8 +3914,8 @@
</span><span class="cx"> int b(toInt32(exec, exec->argument(2), NormalConversion));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunction(str, a, b, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunction(str, a, b, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3955,8 +3939,8 @@
</span><span class="cx"> Vector<unsigned> a(toNativeArray<unsigned>(exec, exec->argument(1)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithSequence(objArg, a, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithSequence(objArg, a, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -3980,8 +3964,8 @@
</span><span class="cx"> Vector<int> array(toNativeArray<int>(exec, exec->argument(1)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithArray(objArg, array, ec)));
</ins><span class="cx">
</span><del>- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithArray(objArg, array, ec)));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx"> }
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> TestTypedefs& impl = castedThis->impl();
</span><del>- JSC::JSValue result = jsNumber(impl.attrWithGetterException(ec));
</del><ins>+ JSValue result = jsNumber(impl.attrWithGetterException(ec));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx"> }
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> TestTypedefs& impl = castedThis->impl();
</span><del>- JSC::JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
</del><ins>+ JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -506,8 +506,7 @@
</span><span class="cx"> Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &toSerializedScriptValue)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsNumber(impl.methodWithSequenceArg(sequenceArg));
</del><ins>+ JSValue result = jsNumber(impl.methodWithSequenceArg(sequenceArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -573,8 +572,7 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
</span><span class="cx"> TestTypedefs& impl = castedThis->impl();
</span><del>-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
</del><ins>+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -592,8 +590,8 @@
</span><span class="cx"> Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction(values, ec));
</ins><span class="cx">
</span><del>- JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction(values, ec));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -612,8 +610,8 @@
</span><span class="cx"> Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><ins>+ JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction2(values, ec));
</ins><span class="cx">
</span><del>- JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction2(values, ec));
</del><span class="cx"> setDOMException(exec, ec);
</span><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -631,8 +629,7 @@
</span><span class="cx"> Vector<RefPtr<TestEventTarget>> sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &toTestEventTarget)));
</span><span class="cx"> if (UNLIKELY(exec->hadException()))
</span><span class="cx"> return JSValue::encode(jsUndefined());
</span><del>-
- JSC::JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(sequenceArg));
</del><ins>+ JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(sequenceArg));
</ins><span class="cx"> return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayAllReplayInputsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/AllReplayInputs.h (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/AllReplayInputs.h        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/replay/AllReplayInputs.h        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx">
</span><ins>+#include "MemoizedDOMResult.h"
</ins><span class="cx"> #include "WebReplayInputs.h"
</span><span class="cx"> #include <JavaScriptCore/JSReplayInputs.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayMemoizedDOMResultcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/replay/MemoizedDOMResult.cpp (0 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/MemoizedDOMResult.cpp         (rev 0)
+++ trunk/Source/WebCore/replay/MemoizedDOMResult.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MemoizedDOMResult.h"
+
+#if ENABLE(WEB_REPLAY)
+
+#include "ReplayInputTypes.h"
+#include "SerializationMethods.h"
+#include "WebReplayInputs.h"
+
+namespace WebCore {
+
+const AtomicString& MemoizedDOMResultBase::type() const
+{
+ return inputTypes().MemoizedDOMResult;
+}
+
+std::unique_ptr<MemoizedDOMResultBase> MemoizedDOMResultBase::createFromEncodedResult(const String& attribute, EncodedCType ctype, EncodedValue encodedValue, ExceptionCode exceptionCode)
+{
+ switch (ctype) {
+#define CREATE_DECODE_SWITCH_CASE(name, type) \
+ case CTypeTraits<type>::encodedType: { \
+ CTypeTraits<type>::CType result; \
+ if (!EncodingTraits<type>::decodeValue(encodedValue, result)) \
+ return nullptr; \
+ return std::make_unique<MemoizedDOMResult<type>>(attribute, result, exceptionCode); \
+ } \
+\
+
+FOR_EACH_MEMOIZED_CTYPE(CREATE_DECODE_SWITCH_CASE)
+#undef CREATE_DECODE_SWITCH_CASE
+ }
+}
+
+} // namespace WebCore
+
+namespace JSC {
+
+using WebCore::EncodedCType;
+using WebCore::ExceptionCode;
+using WebCore::MemoizedDOMResult;
+using WebCore::SerializedScriptValue;
+
+const AtomicString& InputTraits<MemoizedDOMResultBase>::type()
+{
+ return WebCore::inputTypes().MemoizedDOMResult;
+}
+
+void InputTraits<MemoizedDOMResultBase>::encode(EncodedValue& encodedValue, const MemoizedDOMResultBase& input)
+{
+ encodedValue.put<String>(ASCIILiteral("attribute"), input.attribute());
+ encodedValue.put<EncodedCType>(ASCIILiteral("ctype"), input.ctype());
+ encodedValue.put<EncodedValue>(ASCIILiteral("result"), input.encodedResult());
+ if (input.exceptionCode())
+ encodedValue.put<ExceptionCode>(ASCIILiteral("exceptionCode"), input.exceptionCode());
+}
+
+bool InputTraits<MemoizedDOMResultBase>::decode(EncodedValue& encodedValue, std::unique_ptr<MemoizedDOMResultBase>& input)
+{
+ String attribute;
+ if (!encodedValue.get<String>(ASCIILiteral("attribute"), attribute))
+ return false;
+
+ EncodedCType ctype;
+ if (!encodedValue.get<EncodedCType>(ASCIILiteral("ctype"), ctype))
+ return false;
+
+ EncodedValue encodedResult;
+ if (!encodedValue.get<EncodedValue>(ASCIILiteral("result"), encodedResult))
+ return false;
+
+ ExceptionCode exceptionCode = 0;
+ encodedValue.get<ExceptionCode>(ASCIILiteral("exceptionCode"), exceptionCode);
+
+ std::unique_ptr<MemoizedDOMResultBase> decodedInput = MemoizedDOMResultBase::createFromEncodedResult(attribute, ctype, encodedResult, exceptionCode);
+ if (!decodedInput)
+ return false;
+ input = std::move(decodedInput);
+ return true;
+}
+
+} // namespace JSC
+
+#endif // ENABLE(WEB_REPLAY)
</ins></span></pre></div>
<a id="trunkSourceWebCorereplayMemoizedDOMResulth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/replay/MemoizedDOMResult.h (0 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/MemoizedDOMResult.h         (rev 0)
+++ trunk/Source/WebCore/replay/MemoizedDOMResult.h        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+/*
+ * Copyright (C) 2012 University of Washington. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MemoizedDOMResult_h
+#define MemoizedDOMResult_h
+
+#if ENABLE(WEB_REPLAY)
+
+#include <replay/EncodedValue.h>
+#include <replay/NondeterministicInput.h>
+
+namespace WebCore {
+
+class SerializedScriptValue;
+
+typedef int ExceptionCode;
+
+// Add new memoized ctypes here. The first argument is the enum value,
+// which cannot conflict with built-in primitive types. The second is
+// the actual C type that is used to specialize CTypeTraits. New enum
+// values should also be added to the definition in WebInputs.json.
+#define FOR_EACH_MEMOIZED_CTYPE(macro) \
+ macro(Boolean, bool) \
+ macro(Int, int) \
+ macro(String, String) \
+ macro(Unsigned, unsigned) \
+ \
+// end of FOR_EACH_MEMOIZED_CTYPE
+
+// We encode this enum so that we can recover MemoizedType when decoding the input
+// and then call the correct specialized MemoizedDOMResult<T> constructor.
+enum class EncodedCType {
+#define CREATE_ENUM_VALUE(name, type) name,
+
+FOR_EACH_MEMOIZED_CTYPE(CREATE_ENUM_VALUE)
+#undef CREATE_ENUM_VALUE
+};
+
+class MemoizedDOMResultBase : public NondeterministicInputBase {
+public:
+ MemoizedDOMResultBase(const String& attribute, EncodedCType ctype, ExceptionCode exceptionCode = 0)
+ : m_attribute(attribute)
+ , m_ctype(ctype)
+ , m_exceptionCode(exceptionCode) { }
+
+ virtual ~MemoizedDOMResultBase() { }
+
+ static std::unique_ptr<MemoizedDOMResultBase> createFromEncodedResult(const String& attribute, EncodedCType, EncodedValue, ExceptionCode);
+
+ template<typename T>
+ bool convertTo(T& decodedValue);
+
+ virtual EncodedValue encodedResult() const = 0;
+ virtual InputQueue queue() const final override { return InputQueue::ScriptMemoizedData; }
+ virtual const AtomicString& type() const final override;
+
+ const String& attribute() const { return m_attribute; }
+ EncodedCType ctype() const { return m_ctype; }
+ ExceptionCode exceptionCode() const { return m_exceptionCode; }
+private:
+ String m_attribute;
+ EncodedCType m_ctype;
+ ExceptionCode m_exceptionCode;
+};
+
+template<typename T>
+struct CTypeTraits {
+ static bool decode(EncodedValue& encodedValue, T& decodedValue)
+ {
+ return EncodingTraits<T>::decodeValue(encodedValue, decodedValue);
+ }
+};
+
+#define CREATE_CTYPE_TRAITS(_name, _type) \
+template<> \
+struct CTypeTraits<_type> { \
+ typedef _type CType; \
+ static const EncodedCType encodedType = EncodedCType::_name; \
+}; \
+
+FOR_EACH_MEMOIZED_CTYPE(CREATE_CTYPE_TRAITS)
+#undef CREATE_CTYPE_TRAITS
+
+template<typename MemoizedType>
+class MemoizedDOMResult final : public MemoizedDOMResultBase {
+public:
+ MemoizedDOMResult(const String& attribute, typename CTypeTraits<MemoizedType>::CType result, ExceptionCode exceptionCode)
+ : MemoizedDOMResultBase(attribute, CTypeTraits<MemoizedType>::encodedType, exceptionCode)
+ , m_result(result) { }
+ virtual ~MemoizedDOMResult() { }
+
+ virtual EncodedValue encodedResult() const override
+ {
+ return EncodingTraits<MemoizedType>::encodeValue(m_result);
+ }
+
+ typename CTypeTraits<MemoizedType>::CType result() const { return m_result; }
+private:
+ typename CTypeTraits<MemoizedType>::CType m_result;
+};
+
+// This is used by clients of the memoized DOM result to get out the memoized
+// value without performing a cast to MemoizedDOMResult<T> and calling result().
+template<typename T>
+bool MemoizedDOMResultBase::convertTo(T& convertedValue)
+{
+ // Type tag doesn't match; fail to decode the value.
+ if (m_ctype != CTypeTraits<T>::encodedType)
+ return false;
+
+ MemoizedDOMResult<T>& castedResult = static_cast<MemoizedDOMResult<T>&>(*this);
+ convertedValue = castedResult.result();
+ return true;
+}
+
+} // namespace WebCore
+
+using WebCore::MemoizedDOMResultBase;
+
+namespace JSC {
+
+template<>
+struct InputTraits<MemoizedDOMResultBase> {
+ static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
+ static const AtomicString& type();
+
+ static void encode(EncodedValue&, const MemoizedDOMResultBase& input);
+ static bool decode(EncodedValue&, std::unique_ptr<MemoizedDOMResultBase>& input);
+};
+
+} // namespace JSC
+
+#endif // ENABLE(WEB_REPLAY)
+
+#endif // MemoizedDOMResult_h
</ins></span></pre></div>
<a id="trunkSourceWebCorereplayReplayInputTypescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayInputTypes.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayInputTypes.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/replay/ReplayInputTypes.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> : dummy(0)
</span><span class="cx"> JS_REPLAY_INPUT_NAMES_FOR_EACH(INITIALIZE_INPUT_TYPE)
</span><span class="cx"> WEB_REPLAY_INPUT_NAMES_FOR_EACH(INITIALIZE_INPUT_TYPE)
</span><ins>+INITIALIZE_INPUT_TYPE(MemoizedDOMResult)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(dummy);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayInputTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayInputTypes.h (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayInputTypes.h        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/replay/ReplayInputTypes.h        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #define DECLARE_REPLAY_INPUT_TYPES(name) AtomicString name;
</span><span class="cx"> JS_REPLAY_INPUT_NAMES_FOR_EACH(DECLARE_REPLAY_INPUT_TYPES)
</span><span class="cx"> WEB_REPLAY_INPUT_NAMES_FOR_EACH(DECLARE_REPLAY_INPUT_TYPES)
</span><ins>+ DECLARE_REPLAY_INPUT_TYPES(MemoizedDOMResult);
</ins><span class="cx"> #undef DECLARE_REPLAY_INPUT_TYPES
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplaySerializationMethodscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/SerializationMethods.cpp (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/SerializationMethods.cpp        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/replay/SerializationMethods.cpp        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -63,6 +63,12 @@
</span><span class="cx"> WEB_REPLAY_INPUT_NAMES_FOR_EACH(ENCODE_IF_TYPE_TAG_MATCHES)
</span><span class="cx"> #undef ENCODE_IF_TYPE_TAG_MATCHES
</span><span class="cx">
</span><ins>+ // The macro won't work here because of the class template argument.
+ if (type == inputTypes().MemoizedDOMResult) {
+ InputTraits<MemoizedDOMResultBase>::encode(encodedValue, static_cast<const MemoizedDOMResultBase&>(input));
+ return encodedValue;
+ }
+
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return EncodedValue();
</span><span class="cx"> }
</span><span class="lines">@@ -87,6 +93,15 @@
</span><span class="cx"> WEB_REPLAY_INPUT_NAMES_FOR_EACH(DECODE_IF_TYPE_TAG_MATCHES)
</span><span class="cx"> #undef DECODE_IF_TYPE_TAG_MATCHES
</span><span class="cx">
</span><ins>+ if (type == inputTypes().MemoizedDOMResult) {
+ std::unique_ptr<MemoizedDOMResultBase> decodedInput;
+ if (!InputTraits<MemoizedDOMResultBase>::decode(encodedValue, decodedInput))
+ return false;
+
+ input = std::move(decodedInput);
+ return true;
+ }
+
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayWebInputsjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/WebInputs.json (165520 => 165521)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/WebInputs.json        2014-03-13 00:38:38 UTC (rev 165520)
+++ trunk/Source/WebCore/replay/WebInputs.json        2014-03-13 00:41:58 UTC (rev 165521)
</span><span class="lines">@@ -31,6 +31,17 @@
</span><span class="cx"> "header": "platform/URL.h"
</span><span class="cx"> },
</span><span class="cx"> {
</span><ins>+ "name": "EncodedCType", "mode": "SCALAR", "storage": "uint8_t",
+ "flags": ["ENUM_CLASS"],
+ "values": [
+ "Boolean",
+ "Int",
+ "String",
+ "Unsigned"
+ ],
+ "header": "replay/MemoizedDOMResult.h"
+ },
+ {
</ins><span class="cx"> "name": "SecurityOrigin", "mode": "SHARED",
</span><span class="cx"> "header": "page/SecurityOrigin.h"
</span><span class="cx"> },
</span></span></pre>
</div>
</div>
</body>
</html>