<!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>[167174] trunk/Source/JavaScriptCore</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/167174">167174</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2014-04-11 17:25:06 -0700 (Fri, 11 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Replay: code generator should consider enclosing class when computing duplicate type names
https://bugs.webkit.org/show_bug.cgi?id=131554
Reviewed by Timothy Hatcher.
We need to prepend an enum's enclosing class, if any, so that multiple enums with the same name
can coexist without triggering a "duplicate types" error. Now, such enums must be referenced
by the enclosing class and enum name.
Added tests for the new syntax, and rebaselined one test to reflect a previous patch's change.
* replay/scripts/CodeGeneratorReplayInputs.py:
(Type.type_name): Prepend the enclosing class name.
(Type.type_name.is):
* replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error: Added.
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h: Rebaseline.
* replay/scripts/tests/fail-on-duplicate-enum-type.json: Added.
* replay/scripts/tests/generate-enums-with-same-base-name.json: Added.</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="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedfailonduplicateenumtypejsonerror">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputscpp">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputsh">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsfailonduplicateenumtypejson">trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsgenerateenumswithsamebasenamejson">trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-04-11 Brian J. Burg <burg@cs.washington.edu>
+
+ Web Replay: code generator should consider enclosing class when computing duplicate type names
+ https://bugs.webkit.org/show_bug.cgi?id=131554
+
+ Reviewed by Timothy Hatcher.
+
+ We need to prepend an enum's enclosing class, if any, so that multiple enums with the same name
+ can coexist without triggering a "duplicate types" error. Now, such enums must be referenced
+ by the enclosing class and enum name.
+
+ Added tests for the new syntax, and rebaselined one test to reflect a previous patch's change.
+
+ * replay/scripts/CodeGeneratorReplayInputs.py:
+ (Type.type_name): Prepend the enclosing class name.
+ (Type.type_name.is):
+ * replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error: Added.
+ * replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp: Added.
+ * replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h: Added.
+ * replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h: Rebaseline.
+ * replay/scripts/tests/fail-on-duplicate-enum-type.json: Added.
+ * replay/scripts/tests/generate-enums-with-same-base-name.json: Added.
+
</ins><span class="cx"> 2014-04-11 Gavin Barraclough <baraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Rollout - Rewrite Function.bind as a builtin
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -330,7 +330,12 @@
</span><span class="cx"> return "::".join(components)
</span><span class="cx">
</span><span class="cx"> def type_name(self, qualified=False):
</span><del>- return "%s%s" % (self.qualified_prefix(), self._name) if qualified else self._name
</del><ins>+ if qualified:
+ return "%s%s" % (self.qualified_prefix(), self._name)
+ elif self.enclosing_class is not None:
+ return "%s::%s" % (self.enclosing_class, self._name)
+ else:
+ return self._name
</ins><span class="cx">
</span><span class="cx"> def storage_type(self, qualified=False):
</span><span class="cx"> if self.mode == TypeModes.OWNED:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedfailonduplicateenumtypejsonerror"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Duplicate type with name: PlatformEvent::Type
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,141 @@
</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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enums-with-same-base-name.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#include "config.h"
+#include "generate-enums-with-same-base-name.json-TestReplayInputs.h"
+
+#if ENABLE(WEB_REPLAY)
+#include "InternalNamespaceImplIncludeDummy.h"
+#include <platform/ExternalNamespaceImplIncludeDummy.h>
+
+namespace Test {
+FormCombo::FormCombo(PlatformEvent::Type eventType, FormData::Type formType)
+ : NondeterministicInput<FormCombo>()
+ , m_eventType(eventType)
+ , m_formType(formType)
+{
+}
+
+FormCombo::~FormCombo()
+{
+}
+} // namespace Test
+
+namespace JSC {
+const AtomicString& InputTraits<Test::FormCombo>::type()
+{
+ static NeverDestroyed<const AtomicString> type("FormCombo", AtomicString::ConstructFromLiteral);
+ return type;
+}
+
+void InputTraits<Test::FormCombo>::encode(EncodedValue& encodedValue, const Test::FormCombo& input)
+{
+ encodedValue.put<PlatformEvent::Type>(ASCIILiteral("eventType"), input.eventType());
+ encodedValue.put<WebCore::FormData::Type>(ASCIILiteral("formType"), input.formType());
+}
+
+bool InputTraits<Test::FormCombo>::decode(EncodedValue& encodedValue, std::unique_ptr<Test::FormCombo>& input)
+{
+ PlatformEvent::Type eventType;
+ if (!encodedValue.get<PlatformEvent::Type>(ASCIILiteral("eventType"), eventType))
+ return false;
+
+ WebCore::FormData::Type formType;
+ if (!encodedValue.get<WebCore::FormData::Type>(ASCIILiteral("formType"), formType))
+ return false;
+
+ input = std::make_unique<Test::FormCombo>(eventType, formType);
+ return true;
+}
+EncodedValue EncodingTraits<WebCore::FormData::Type>::encodeValue(const WebCore::FormData::Type& enumValue)
+{
+ EncodedValue encodedValue = EncodedValue::createArray();
+ if (enumValue & WebCore::FormData::Text) {
+ encodedValue.append<String>(ASCIILiteral("Text"));
+ if (enumValue == WebCore::FormData::Text)
+ return encodedValue;
+ }
+ if (enumValue & WebCore::FormData::Blob) {
+ encodedValue.append<String>(ASCIILiteral("Blob"));
+ if (enumValue == WebCore::FormData::Blob)
+ return encodedValue;
+ }
+ return encodedValue;
+}
+
+bool EncodingTraits<WebCore::FormData::Type>::decodeValue(EncodedValue& encodedValue, WebCore::FormData::Type& enumValue)
+{
+ Vector<String> enumStrings;
+ if (!EncodingTraits<Vector<String>>::decodeValue(encodedValue, enumStrings))
+ return false;
+
+ for (String enumString : enumStrings) {
+ if (enumString == "Text")
+ enumValue = static_cast<WebCore::FormData::Type>(enumValue | WebCore::FormData::Text);
+ if (enumString == "Blob")
+ enumValue = static_cast<WebCore::FormData::Type>(enumValue | WebCore::FormData::Blob);
+ }
+
+ return true;
+}
+
+EncodedValue EncodingTraits<PlatformEvent::Type>::encodeValue(const PlatformEvent::Type& enumValue)
+{
+ EncodedValue encodedValue = EncodedValue::createArray();
+ if (enumValue & PlatformEvent::Mouse) {
+ encodedValue.append<String>(ASCIILiteral("Mouse"));
+ if (enumValue == PlatformEvent::Mouse)
+ return encodedValue;
+ }
+ if (enumValue & PlatformEvent::Keyboard) {
+ encodedValue.append<String>(ASCIILiteral("Keyboard"));
+ if (enumValue == PlatformEvent::Keyboard)
+ return encodedValue;
+ }
+ return encodedValue;
+}
+
+bool EncodingTraits<PlatformEvent::Type>::decodeValue(EncodedValue& encodedValue, PlatformEvent::Type& enumValue)
+{
+ Vector<String> enumStrings;
+ if (!EncodingTraits<Vector<String>>::decodeValue(encodedValue, enumStrings))
+ return false;
+
+ for (String enumString : enumStrings) {
+ if (enumString == "Mouse")
+ enumValue = static_cast<PlatformEvent::Type>(enumValue | PlatformEvent::Mouse);
+ if (enumString == "Keyboard")
+ enumValue = static_cast<PlatformEvent::Type>(enumValue | PlatformEvent::Keyboard);
+ }
+
+ return true;
+}
+} // namespace JSC
+
+#endif // ENABLE(WEB_REPLAY)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputshfromrev167173trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h (from rev 167173, trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h) (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h         (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,89 @@
</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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enums-with-same-base-name.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#ifndef generate_enums_with_same_base_name_json_TestReplayInputs_h
+#define generate_enums_with_same_base_name_json_TestReplayInputs_h
+
+#if ENABLE(WEB_REPLAY)
+#include "InternalNamespaceHeaderIncludeDummy.h"
+#include <platform/ExternalNamespaceHeaderIncludeDummy.h>
+#include <replay/FormData.h>
+#include <replay/PlatformEvent.h>
+
+
+
+namespace Test {
+class FormCombo;
+} // namespace Test
+
+namespace JSC {
+template<> struct InputTraits<Test::FormCombo> {
+ static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
+ static const AtomicString& type();
+
+ static void encode(JSC::EncodedValue&, const Test::FormCombo&);
+ static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::FormCombo>&);
+};
+template<> struct EncodingTraits<WebCore::FormData::Type> {
+ typedef WebCore::FormData::Type DecodedType;
+
+ static EncodedValue encodeValue(const WebCore::FormData::Type& value);
+ static bool decodeValue(EncodedValue&, WebCore::FormData::Type& value);
+};
+
+template<> struct EncodingTraits<PlatformEvent::Type> {
+ typedef PlatformEvent::Type DecodedType;
+
+ static EncodedValue encodeValue(const PlatformEvent::Type& value);
+ static bool decodeValue(EncodedValue&, PlatformEvent::Type& value);
+};
+} // namespace JSC
+
+namespace Test {
+class FormCombo : public NondeterministicInput<FormCombo> {
+public:
+ FormCombo(PlatformEvent::Type eventType, FormData::Type formType);
+ virtual ~FormCombo();
+
+ PlatformEvent::Type eventType() const { return m_eventType; }
+ FormData::Type formType() const { return m_formType; }
+private:
+ PlatformEvent::Type m_eventType;
+ FormData::Type m_formType;
+};
+} // namespace Test
+
+#define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
+ macro(FormCombo) \
+ \
+// end of TEST_REPLAY_INPUT_NAMES_FOR_EACH
+
+#endif // ENABLE(WEB_REPLAY)
+
+#endif // generate-enums-with-same-base-name.json-TestReplayInputs_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -34,15 +34,8 @@
</span><span class="cx"> #include "InternalNamespaceHeaderIncludeDummy.h"
</span><span class="cx"> #include <platform/ExternalNamespaceHeaderIncludeDummy.h>
</span><span class="cx">
</span><del>-namespace WebCore {
-class WebThing;
-}
</del><span class="cx">
</span><del>-namespace JSC {
-class JSThing;
-}
</del><span class="cx">
</span><del>-
</del><span class="cx"> namespace Test {
</span><span class="cx"> class ArrayOfThings;
</span><span class="cx"> } // namespace Test
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsfailonduplicateenumtypejson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+{
+ "types": {
+ "JavaScriptCore": [
+ {
+ "name": "Type", "mode": "SCALAR", "storage": "uint64_t",
+ "enclosing_class": "PlatformEvent",
+ "flags": ["ENUM"],
+ "values": ["Mouse", "Keyboard"],
+ "header": "replay/PlatformEvent.h"
+ }
+ ],
+ "WebCore": [
+ {
+ "name": "Type", "mode": "SCALAR", "storage": "uint64_t",
+ "enclosing_class": "PlatformEvent",
+ "flags": ["ENUM"],
+ "values": ["Mouse", "Keyboard"],
+ "header": "replay/PlatformEvent.h"
+ }
+ ]
+ },
+
+ "inputs": [
+ {
+ "name": "FormCombo",
+ "description": "Combines an event type and form data type.",
+ "queue": "SCRIPT_MEMOIZED",
+ "members": [
+ { "name": "eventType", "type": "PlatformEvent::Type" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsgenerateenumswithsamebasenamejson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json         (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+{
+ "types": {
+ "JavaScriptCore": [
+ {
+ "name": "Type", "mode": "SCALAR", "storage": "uint64_t",
+ "enclosing_class": "PlatformEvent",
+ "flags": ["ENUM"],
+ "values": ["Mouse", "Keyboard"],
+ "header": "replay/PlatformEvent.h"
+ }
+ ],
+ "WebCore": [
+ {
+ "name": "Type", "mode": "SCALAR", "storage": "uint64_t",
+ "enclosing_class": "FormData",
+ "flags": ["ENUM"],
+ "values": ["Text", "Blob"],
+ "header": "replay/FormData.h"
+ }
+ ]
+ },
+
+ "inputs": [
+ {
+ "name": "FormCombo",
+ "description": "Combines an event type and form data type.",
+ "queue": "SCRIPT_MEMOIZED",
+ "members": [
+ { "name": "eventType", "type": "PlatformEvent::Type" },
+ { "name": "formType", "type": "FormData::Type" }
+ ]
+ }
+ ]
+}
</ins></span></pre>
</div>
</div>
</body>
</html>