[TreatNullAs=EmptyString] doesn't work with USVString |
|||||
Issue descriptionhttps://w3c.github.io/webrtc-pc/#peer-to-peer-data-api The "[TreatNullAs=EmptyString] USVString label" argument can't be implemented currently, because the relevant generated code will look like this: V8StringResource<TreatNullAsEmptyString> label; label = toUSVString(info.GetIsolate(), info[0], exceptionState); The problem is that toUSVString returns a WTF::String, and so no special handling of null happens. Support was added in issue 379009 .
,
Apr 10 2017
The WebIDL spec (https://heycam.github.io/webidl/#TreatNullAs) currently forbids this: The [TreatNullAs] extended attribute must not be associated with a type that is not DOMString. I agree that it seems reasonable for this to apply to USVString (and probably ByteString) as well. I have a mostly complete patch to change this on the bindings side if you think the spec ought to be updated to allow this. WDYT?
,
Apr 11 2017
I've filed two issues, either Web IDL or WebRTC needs to change: https://github.com/heycam/webidl/issues/340 https://github.com/w3c/webrtc-pc/issues/1118
,
Apr 11 2017
,
May 2 2017
Spec-side issues fixed, [TreatNullAs=EmptyString] is no longer used in WebRTC. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by foolip@chromium.org
, Nov 22 2016