Bug 222165

Summary: Allow to use BigInt as key identifier
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, hta, jer.noble, kondapallykalyan, philipj, sam, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

youenn fablet
Reported 2021-02-19 03:21:34 PST
Allow to use BigInt as key identifier
Attachments
Patch (16.13 KB, patch)
2021-02-19 03:29 PST, youenn fablet
no flags
Patch (16.69 KB, patch)
2021-02-19 09:04 PST, youenn fablet
no flags
youenn fablet
Comment 1 2021-02-19 03:29:40 PST
Darin Adler
Comment 2 2021-02-19 08:48:41 PST
Comment on attachment 420953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420953&action=review > Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.idl:53 > + [Custom] Promise<undefined> setEncryptionKey(CryptoKey key, optional any keyID); Why do we need to use [Custom] and not union types for this?
youenn fablet
Comment 3 2021-02-19 08:56:55 PST
youenn fablet
Comment 4 2021-02-19 09:00:17 PST
(In reply to Darin Adler from comment #2) > Comment on attachment 420953 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420953&action=review > > > Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.idl:53 > > + [Custom] Promise<undefined> setEncryptionKey(CryptoKey key, optional any keyID); > > Why do we need to use [Custom] and not union types for this? We could do that, I am guessing that we might want to use only one of these types in the end, but this might be worth discussing in standard body first.
youenn fablet
Comment 5 2021-02-19 09:00:39 PST
rdar has some context as well.
youenn fablet
Comment 6 2021-02-19 09:04:06 PST
Darin Adler
Comment 7 2021-02-19 09:42:57 PST
Comment on attachment 420976 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420976&action=review > Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.idl:53 > + [Custom] Promise<undefined> setEncryptionKey(CryptoKey key, optional any keyID); I’d like to eventually make this a non-custom binding. > Source/WebCore/bindings/js/JSRTCRtpSFrameTransformCustom.cpp:36 > +using namespace JSC; In new code I suggest we not use "using namespace" like this.
youenn fablet
Comment 8 2021-02-19 12:34:01 PST
(In reply to Darin Adler from comment #7) > Comment on attachment 420976 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420976&action=review > > > Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.idl:53 > > + [Custom] Promise<undefined> setEncryptionKey(CryptoKey key, optional any keyID); > > I’d like to eventually make this a non-custom binding. Agreed. > > Source/WebCore/bindings/js/JSRTCRtpSFrameTransformCustom.cpp:36 > > +using namespace JSC; > > In new code I suggest we not use "using namespace" like this. Why?
EWS
Comment 9 2021-02-19 12:39:44 PST
Committed r273158: <https://commits.webkit.org/r273158> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420976 [details].
Eric Carlson
Comment 10 2021-02-19 13:01:22 PST
Comment on attachment 420976 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420976&action=review > Source/WebCore/bindings/js/JSRTCRtpSFrameTransformCustom.cpp:59 > + throwException(&lexicalGlobalObject, throwScope, createDOMException(&lexicalGlobalObject, RangeError, "Not a 64 bits integer"_s)); s/64 bits/64 bit/
Darin Adler
Comment 11 2021-02-19 18:24:09 PST
Comment on attachment 420976 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420976&action=review >>> Source/WebCore/bindings/js/JSRTCRtpSFrameTransformCustom.cpp:36 >>> +using namespace JSC; >> >> In new code I suggest we not use "using namespace" like this. > > Why? There’s a consensus that it’s clearer to use the namespace in front of the individual identifiers. Both the auto keyword and context-dependent lookup reduce how often the prefix has to be used so it doesn’t make code a lot harder to read and write. There are also many problems with how "using namespace" affects code unintentionally. I *think* that at least doing it inside a "namespace WebCore { }" doesn’t affect the multiple files in a unified build, but otherwise that is a problem.
Note You need to log in before you can comment on or make changes to this bug.