Title: [253855] trunk
- Revision
- 253855
- Author
- [email protected]
- Date
- 2019-12-20 17:04:28 -0800 (Fri, 20 Dec 2019)
Log Message
[Bindings] Add @@toStringTag to our iterator prototype object
https://bugs.webkit.org/show_bug.cgi?id=205516
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline WPT tests that are now passing.
* web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt:
Source/WebCore:
Add @@ toStringTag to our iterator prototype object, as per:
- https://heycam.github.io/webidl/#es-iterator-prototype-object
No new tests, rebaselined existing tests.
* bindings/js/JSDOMIterator.h:
(WebCore::IteratorTraits>::finishCreation):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (253854 => 253855)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-21 00:05:46 UTC (rev 253854)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-21 01:04:28 UTC (rev 253855)
@@ -1,3 +1,15 @@
+2019-12-20 Chris Dumez <[email protected]>
+
+ [Bindings] Add @@toStringTag to our iterator prototype object
+ https://bugs.webkit.org/show_bug.cgi?id=205516
+
+ Reviewed by Darin Adler.
+
+ Rebaseline WPT tests that are now passing.
+
+ * web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt:
+ * web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt:
+
2019-12-20 Truitt Savell <[email protected]>
Unreviewed, rolling out r253831.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt (253854 => 253855)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt 2019-12-21 00:05:46 UTC (rev 253854)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt 2019-12-21 01:04:28 UTC (rev 253855)
@@ -1,5 +1,5 @@
PASS Default iterator objects for an interface have the same prototype
PASS Object.prototype.toString returns correct value
-FAIL @@toStringTag has correct value from prototype assert_equals: expected (string) "URLSearchParams Iterator" but got (undefined) undefined
+PASS @@toStringTag has correct value from prototype
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt (253854 => 253855)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt 2019-12-21 00:05:46 UTC (rev 253854)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt 2019-12-21 01:04:28 UTC (rev 253855)
@@ -3,6 +3,6 @@
PASS next() exists and is writable, enumerable, and configurable
PASS next() throws TypeError when called on ineligible receiver
PASS Object.prototype.toString returns correct value
-FAIL @@toStringTag has correct value undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(iteratorProto, Symbol.toStringTag).value')
+PASS @@toStringTag has correct value
PASS Is specific to an interface
Modified: trunk/Source/WebCore/ChangeLog (253854 => 253855)
--- trunk/Source/WebCore/ChangeLog 2019-12-21 00:05:46 UTC (rev 253854)
+++ trunk/Source/WebCore/ChangeLog 2019-12-21 01:04:28 UTC (rev 253855)
@@ -1,3 +1,18 @@
+2019-12-20 Chris Dumez <[email protected]>
+
+ [Bindings] Add @@toStringTag to our iterator prototype object
+ https://bugs.webkit.org/show_bug.cgi?id=205516
+
+ Reviewed by Darin Adler.
+
+ Add @@ toStringTag to our iterator prototype object, as per:
+ - https://heycam.github.io/webidl/#es-iterator-prototype-object
+
+ No new tests, rebaselined existing tests.
+
+ * bindings/js/JSDOMIterator.h:
+ (WebCore::IteratorTraits>::finishCreation):
+
2019-12-20 Jer Noble <[email protected]>
MediaKeySession.load() fails
Modified: trunk/Source/WebCore/bindings/js/JSDOMIterator.h (253854 => 253855)
--- trunk/Source/WebCore/bindings/js/JSDOMIterator.h 2019-12-21 00:05:46 UTC (rev 253854)
+++ trunk/Source/WebCore/bindings/js/JSDOMIterator.h 2019-12-21 01:04:28 UTC (rev 253855)
@@ -28,6 +28,7 @@
#include "JSDOMConvert.h"
#include <_javascript_Core/IteratorPrototype.h>
+#include <_javascript_Core/PropertySlot.h>
#include <type_traits>
namespace WebCore {
@@ -264,6 +265,7 @@
Base::finishCreation(vm);
ASSERT(inherits(vm, info()));
+ putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(vm, info()->className), JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly);
JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->next, next, 0, 0, JSC::NoIntrinsic);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes