<!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>[210675] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210675">210675</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2017-01-12 12:38:31 -0800 (Thu, 12 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update bindings test results.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
(WebCore::JSTestEventTarget::getOwnPropertyNames):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::put):
(WebCore::JSTestInterface::putByIndex):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlotByIndex):
(WebCore::JSTestObj::getOwnPropertyNames):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
(WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/ChangeLog        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2017-01-12 Sam Weinig <sam@webkit.org>
+
+ Update bindings test results.
+
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+ (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
+ (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ (WebCore::JSTestEventTarget::getOwnPropertySlot):
+ (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
+ (WebCore::JSTestEventTarget::getOwnPropertyNames):
+ * bindings/scripts/test/JS/JSTestEventTarget.h:
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::JSTestInterface::put):
+ (WebCore::JSTestInterface::putByIndex):
+ * bindings/scripts/test/JS/JSTestInterface.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::JSTestObj::getOwnPropertySlot):
+ (WebCore::JSTestObj::getOwnPropertySlotByIndex):
+ (WebCore::JSTestObj::getOwnPropertyNames):
+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+ (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
+ (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
+ (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
+
</ins><span class="cx"> 2017-01-12 Zan Dobersek <zdobersek@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] WebKitWebProcess at 100% CPU loading hyphenation dictionaries
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><del>-#include "wtf/text/AtomicString.h"
</del><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="lines">@@ -140,10 +139,10 @@
</span><span class="cx"> if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (thisObject->classInfo() == info()) {
</del><ins>+ if (thisObject->classInfo() == info() && !propertyName.isSymbol()) {
</ins><span class="cx"> JSValue value;
</span><span class="cx"> if (thisObject->nameGetter(state, propertyName, value)) {
</span><del>- slot.setValue(thisObject, ReadOnly | DontEnum, value);
</del><ins>+ slot.setValue(thisObject, ReadOnly, value);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -158,7 +157,7 @@
</span><span class="cx"> if (thisObject->classInfo() == info()) {
</span><span class="cx"> JSValue value;
</span><span class="cx"> if (thisObject->nameGetter(state, propertyName, value)) {
</span><del>- slot.setValue(thisObject, ReadOnly | DontDelete | DontEnum, value);
</del><ins>+ slot.setValue(thisObject, ReadOnly, value);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> JSTestCustomNamedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCustomNamedGetter>&&);
</span><span class="cx">
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><del>-private:
</del><span class="cx"> bool nameGetter(JSC::ExecState*, JSC::PropertyName, JSC::JSValue&);
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSNode.h"
</span><del>-#include "wtf/text/AtomicString.h"
</del><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/PropertyNameArray.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="lines">@@ -128,11 +127,10 @@
</span><span class="cx"> {
</span><span class="cx"> auto* thisObject = jsCast<JSTestEventTarget*>(object);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><del>- std::optional<uint32_t> optionalIndex = parseIndex(propertyName);
</del><ins>+ auto optionalIndex = parseIndex(propertyName);
</ins><span class="cx"> if (optionalIndex && optionalIndex.value() < thisObject->wrapped().length()) {
</span><del>- unsigned index = optionalIndex.value();
- unsigned attributes = ReadOnly;
- slot.setValue(thisObject, attributes, toJS(state, thisObject->globalObject(), thisObject->wrapped().item(index)));
</del><ins>+ auto index = optionalIndex.value();
+ slot.setValue(thisObject, ReadOnly, toJS<IDLInterface<Node>>(*state, *thisObject->globalObject(), thisObject->wrapped().item(index)));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
</span><span class="lines">@@ -141,10 +139,10 @@
</span><span class="cx"> if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!optionalIndex && thisObject->classInfo() == info()) {
- JSValue value;
- if (thisObject->nameGetter(state, propertyName, value)) {
- slot.setValue(thisObject, ReadOnly | DontEnum, value);
</del><ins>+ if (!optionalIndex && thisObject->classInfo() == info() && !propertyName.isSymbol()) {
+ auto item = thisObject->wrapped().namedItem(propertyNameToAtomicString(propertyName));
+ if (!IDLInterface<Node>::isNullValue(item)) {
+ slot.setValue(thisObject, ReadOnly, toJS<IDLInterface<Node>>(*state, *thisObject->globalObject(), item));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -156,13 +154,23 @@
</span><span class="cx"> auto* thisObject = jsCast<JSTestEventTarget*>(object);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><span class="cx"> if (LIKELY(index < thisObject->wrapped().length())) {
</span><del>- unsigned attributes = DontDelete | ReadOnly;
- slot.setValue(thisObject, attributes, toJS(state, thisObject->globalObject(), thisObject->wrapped().item(index)));
</del><ins>+ slot.setValue(thisObject, ReadOnly, toJS<IDLInterface<Node>>(*state, *thisObject->globalObject(), thisObject->wrapped().item(index)));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ auto* thisObject = jsCast<JSTestEventTarget*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
+ propertyNames.add(Identifier::from(state, i));
+ for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
+ propertyNames.add(Identifier::fromString(state, propertyName));
+ Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
+}
+
</ins><span class="cx"> template<> inline JSTestEventTarget* BindingCaller<JSTestEventTarget>::castForOperation(ExecState& state)
</span><span class="cx"> {
</span><span class="cx"> return jsDynamicDowncast<JSTestEventTarget*>(state.thisValue());
</span><span class="lines">@@ -192,19 +200,6 @@
</span><span class="cx"> return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
- auto* thisObject = jsCast<JSTestEventTarget*>(object);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
- propertyNames.add(Identifier::from(state, i));
- if (mode.includeDontEnumProperties()) {
- for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
- propertyNames.add(Identifier::fromString(state, propertyName));
- }
- Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
-}
-
</del><span class="cx"> JSValue JSTestEventTarget::getConstructor(VM& vm, const JSGlobalObject* globalObject)
</span><span class="cx"> {
</span><span class="cx"> return getDOMConstructor<JSTestEventTargetConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -64,8 +64,6 @@
</span><span class="cx"> JSTestEventTarget(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventTarget>&&);
</span><span class="cx">
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><del>-private:
- bool nameGetter(JSC::ExecState*, JSC::PropertyName, JSC::JSValue&);
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget&);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -398,6 +398,28 @@
</span><span class="cx"> thisObject->JSTestInterface::~JSTestInterface();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool JSTestInterface::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
+{
+ auto* thisObject = jsCast<JSTestInterface*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ bool putResult = false;
+ if (thisObject->putDelegate(state, propertyName, value, slot, putResult))
+ return putResult;
+ return Base::put(thisObject, state, propertyName, value, slot);
+}
+
+bool JSTestInterface::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)
+{
+ auto* thisObject = jsCast<JSTestInterface*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Identifier propertyName = Identifier::from(state, index);
+ PutPropertySlot slot(thisObject, shouldThrow);
+ bool putResult = false;
+ if (thisObject->putDelegate(state, propertyName, value, slot, putResult))
+ return putResult;
+ return Base::putByIndex(cell, state, index, value, shouldThrow);
+}
+
</ins><span class="cx"> template<> inline JSTestInterface* BindingCaller<JSTestInterface>::castForAttribute(ExecState&, EncodedJSValue thisValue)
</span><span class="cx"> {
</span><span class="cx"> return jsDynamicDowncast<JSTestInterface*>(JSValue::decode(thisValue));
</span><span class="lines">@@ -652,28 +674,6 @@
</span><span class="cx"> return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool JSTestInterface::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
-{
- auto* thisObject = jsCast<JSTestInterface*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- bool putResult = false;
- if (thisObject->putDelegate(state, propertyName, value, slot, putResult))
- return putResult;
- return Base::put(thisObject, state, propertyName, value, slot);
-}
-
-bool JSTestInterface::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)
-{
- auto* thisObject = jsCast<JSTestInterface*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- Identifier propertyName = Identifier::from(state, index);
- PutPropertySlot slot(thisObject, shouldThrow);
- bool putResult = false;
- if (thisObject->putDelegate(state, propertyName, value, slot, putResult))
- return putResult;
- return Base::putByIndex(cell, state, index, value, shouldThrow);
-}
-
</del><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> bool setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* statePointer, EncodedJSValue, EncodedJSValue encodedValue)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> static TestInterface* toWrapped(JSC::JSValue);
</span><span class="cx"> static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
</span><span class="cx"> static bool putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);
</span><del>- bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);
</del><span class="cx"> static void destroy(JSC::JSCell*);
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="lines">@@ -80,6 +79,7 @@
</span><span class="cx"> JSTestInterface(JSC::Structure*, JSDOMGlobalObject&, Ref<TestInterface>&&);
</span><span class="cx">
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><ins>+ bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class JSTestInterfaceOwner : public JSC::WeakHandleOwner {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -1939,11 +1939,10 @@
</span><span class="cx"> {
</span><span class="cx"> auto* thisObject = jsCast<JSTestObj*>(object);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><del>- std::optional<uint32_t> optionalIndex = parseIndex(propertyName);
- if (optionalIndex) {
- unsigned index = optionalIndex.value();
- unsigned attributes = ReadOnly;
- slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
</del><ins>+ auto optionalIndex = parseIndex(propertyName);
+ if (optionalIndex && optionalIndex.value() < thisObject->wrapped().length()) {
+ auto index = optionalIndex.value();
+ slot.setValue(thisObject, ReadOnly, toJS<IDLNullable<IDLDOMString>>(*state, thisObject->wrapped().nullableStringSpecialMethod(index)));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
</span><span class="lines">@@ -1955,14 +1954,22 @@
</span><span class="cx"> {
</span><span class="cx"> auto* thisObject = jsCast<JSTestObj*>(object);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><del>- if (LIKELY(index <= MAX_ARRAY_INDEX)) {
- unsigned attributes = DontDelete | ReadOnly;
- slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
</del><ins>+ if (LIKELY(index < thisObject->wrapped().length())) {
+ slot.setValue(thisObject, ReadOnly, toJS<IDLNullable<IDLDOMString>>(*state, thisObject->wrapped().nullableStringSpecialMethod(index)));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JSTestObj::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ auto* thisObject = jsCast<JSTestObj*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
+ propertyNames.add(Identifier::from(state, i));
+ Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
+}
+
</ins><span class="cx"> template<> inline JSTestObj* BindingCaller<JSTestObj>::castForAttribute(ExecState&, EncodedJSValue thisValue)
</span><span class="cx"> {
</span><span class="cx"> return jsDynamicDowncast<JSTestObj*>(JSValue::decode(thisValue));
</span><span class="lines">@@ -5126,15 +5133,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-void JSTestObj::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
- auto* thisObject = jsCast<JSTestObj*>(object);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
- propertyNames.add(Identifier::from(state, i));
- Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
-}
-
</del><span class="cx"> JSValue JSTestObj::getConstructor(VM& vm, const JSGlobalObject* globalObject)
</span><span class="cx"> {
</span><span class="cx"> return getDOMConstructor<JSTestObjConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSNode.h"
</span><del>-#include "wtf/text/AtomicString.h"
</del><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="lines">@@ -135,10 +134,10 @@
</span><span class="cx"> {
</span><span class="cx"> auto* thisObject = jsCast<JSTestOverrideBuiltins*>(object);
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><del>- if (thisObject->classInfo() == info()) {
- JSValue value;
- if (thisObject->nameGetter(state, propertyName, value)) {
- slot.setValue(thisObject, ReadOnly | DontEnum, value);
</del><ins>+ if (thisObject->classInfo() == info() && !propertyName.isSymbol()) {
+ auto item = thisObject->wrapped().namedItem(propertyNameToAtomicString(propertyName));
+ if (!IDLInterface<Node>::isNullValue(item)) {
+ slot.setValue(thisObject, ReadOnly, toJS<IDLInterface<Node>>(*state, *thisObject->globalObject(), item));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -153,9 +152,9 @@
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</span><span class="cx"> Identifier propertyName = Identifier::from(state, index);
</span><span class="cx"> if (thisObject->classInfo() == info()) {
</span><del>- JSValue value;
- if (thisObject->nameGetter(state, propertyName, value)) {
- slot.setValue(thisObject, ReadOnly | DontDelete | DontEnum, value);
</del><ins>+ auto item = thisObject->wrapped().namedItem(propertyNameToAtomicString(propertyName));
+ if (!IDLInterface<Node>::isNullValue(item)) {
+ slot.setValue(thisObject, ReadOnly, toJS<IDLInterface<Node>>(*state, *thisObject->globalObject(), item));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -162,6 +161,15 @@
</span><span class="cx"> return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JSTestOverrideBuiltins::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ auto* thisObject = jsCast<JSTestOverrideBuiltins*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
+ propertyNames.add(Identifier::fromString(state, propertyName));
+ Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
+}
+
</ins><span class="cx"> template<> inline JSTestOverrideBuiltins* BindingCaller<JSTestOverrideBuiltins>::castForOperation(ExecState& state)
</span><span class="cx"> {
</span><span class="cx"> return jsDynamicDowncast<JSTestOverrideBuiltins*>(state.thisValue());
</span><span class="lines">@@ -191,17 +199,6 @@
</span><span class="cx"> return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JSTestOverrideBuiltins::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
- auto* thisObject = jsCast<JSTestOverrideBuiltins*>(object);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- if (mode.includeDontEnumProperties()) {
- for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
- propertyNames.add(Identifier::fromString(state, propertyName));
- }
- Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
-}
-
</del><span class="cx"> JSValue JSTestOverrideBuiltins::getConstructor(VM& vm, const JSGlobalObject* globalObject)
</span><span class="cx"> {
</span><span class="cx"> return getDOMConstructor<JSTestOverrideBuiltinsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h (210674 => 210675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2017-01-12 20:21:58 UTC (rev 210674)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2017-01-12 20:38:31 UTC (rev 210675)
</span><span class="lines">@@ -58,8 +58,6 @@
</span><span class="cx"> JSTestOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject&, Ref<TestOverrideBuiltins>&&);
</span><span class="cx">
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><del>-private:
- bool nameGetter(JSC::ExecState*, JSC::PropertyName, JSC::JSValue&);
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class JSTestOverrideBuiltinsOwner : public JSC::WeakHandleOwner {
</span></span></pre>
</div>
</div>
</body>
</html>