WebKit Bugzilla
Attachment 359952 Details for
Bug 176810
: for..in on a Proxy loops over non enumerable properties
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
(3) Fix [[OwnPropertyKeys]] algorithm in JSDOMConvertRecord
bug-176810-20190123182312.patch (text/plain), 1.99 KB, created by
Caitlin Potter (:caitp)
on 2019-01-23 15:23:13 PST
(
hide
)
Description:
(3) Fix [[OwnPropertyKeys]] algorithm in JSDOMConvertRecord
Filename:
MIME Type:
Creator:
Caitlin Potter (:caitp)
Created:
2019-01-23 15:23:13 PST
Size:
1.99 KB
patch
obsolete
>Subversion Revision: 240362 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 31aadd832dcae95fcbcbfea27fe4a7c474c2d45b..9edb668ee5b72327ce277dbfa7a8715c033fcc91 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-23 Caitlin Potter <caitp@igalia.com> >+ >+ Fix [[OwnPropertyKeys]] algorithm in JSDOMConvertRecord >+ https://bugs.webkit.org/show_bug.cgi?id=176810 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The [[OwnPropertyKeys]] internal method does not ignore Symbol keys by >+ default, however previously we had been doing this. >+ >+ This adds a little snippet to throw if a Symbol is found, otherwise it >+ would be converted to a String (and since the key is not a JSValue, we >+ can't rely on canonical error handling for this case). There are >+ web-platform-test cases which check for this. >+ >+ * bindings/js/JSDOMConvertRecord.h: >+ > 2019-01-23 Sihui Liu <sihui_liu@apple.com> > > Clean up IndexedDB files between tests >diff --git a/Source/WebCore/bindings/js/JSDOMConvertRecord.h b/Source/WebCore/bindings/js/JSDOMConvertRecord.h >index 75b2eb6aecd2c08db2ac3c4ca63077d119f8f587..a527270e4fb807922260c0b94d339c8d90a22a0d 100644 >--- a/Source/WebCore/bindings/js/JSDOMConvertRecord.h >+++ b/Source/WebCore/bindings/js/JSDOMConvertRecord.h >@@ -103,6 +103,12 @@ template<typename K, typename V> struct Converter<IDLRecord<K, V>> : DefaultConv > // enumeration mode? > > if (didGetDescriptor && descriptor.enumerable()) { >+ if (key.isSymbol()) { >+ // ToString(key) should fail in this case. >+ throwTypeError(&state, scope, "Cannot convert a symbol to a string"_s); >+ return { }; >+ } >+ > // 1. Let typedKey be key converted to an IDL value of type K. > auto typedKey = Detail::IdentifierConverter<K>::convert(state, key); > RETURN_IF_EXCEPTION(scope, { });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 176810
:
351389
|
351402
|
351405
|
351412
|
351468
|
351472
|
359910
|
359911
|
359912
|
359922
|
359930
|
359935
|
359937
|
359941
|
359952
|
359953
|
359955
|
359959
|
359961
|
359975
|
359979
|
359980
|
359988
|
360004
|
360032
|
362731
|
362762
|
362812
|
362896
|
366956
|
367326