WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 222165
Allow to use BigInt as key identifier
https://bugs.webkit.org/show_bug.cgi?id=222165
Summary
Allow to use BigInt as key identifier
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
Details
Formatted Diff
Diff
Patch
(16.69 KB, patch)
2021-02-19 09:04 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-02-19 03:29:40 PST
Created
attachment 420953
[details]
Patch
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
<
rdar://74487156
>
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
Created
attachment 420976
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug