Changeset 239349 in webkit
- Timestamp:
- Dec 18, 2018 1:41:34 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239347 r239349 1 2018-12-18 Youenn Fablet <youenn@apple.com> 2 3 Make ReadableStreamXX constructs use PrivateIdentifier 4 https://bugs.webkit.org/show_bug.cgi?id=192771 5 6 Reviewed by Chris Dumez. 7 8 PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope. 9 Covered by existing binding tests. 10 11 * Modules/streams/ReadableByteStreamController.idl: 12 * Modules/streams/ReadableStreamBYOBReader.idl: 13 * Modules/streams/ReadableStreamBYOBRequest.idl: 14 * Modules/streams/ReadableStreamDefaultController.idl: 15 * Modules/streams/ReadableStreamDefaultReader.idl: 16 * bindings/scripts/CodeGeneratorJS.pm: 17 (NeedsConstructorProperty): 18 * bindings/scripts/preprocess-idls.pl: 19 (shouldExposeInterface): 20 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed. 21 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed. 22 * bindings/scripts/test/TestCustomConstructor.idl: Removed. 23 1 24 2018-12-18 Zalan Bujtas <zalan@apple.com> 2 25 -
trunk/Source/WebCore/Modules/streams/ReadableByteStreamController.idl
r220279 r239349 33 33 Exposed=(Window,Worker), 34 34 JSBuiltin, 35 NoInterfaceObject35 PrivateIdentifier 36 36 ] interface ReadableByteStreamController { 37 37 [NotEnumerable] void enqueue(optional any chunk); -
trunk/Source/WebCore/Modules/streams/ReadableStreamBYOBReader.idl
r220279 r239349 28 28 Conditional=STREAMS_API, 29 29 CustomConstructor(ReadableStream stream), 30 Exposed=(Window,Worker),31 30 JSBuiltin, 32 NoInterfaceObject31 PrivateIdentifier 33 32 ] interface ReadableStreamBYOBReader { 34 33 [NotEnumerable] Promise<any> read(optional any view); -
trunk/Source/WebCore/Modules/streams/ReadableStreamBYOBRequest.idl
r220279 r239349 30 30 Conditional=STREAMS_API, 31 31 CustomConstructor(ReadableByteStreamController controller, TypedArray view), 32 Exposed=(Window,Worker),33 32 JSBuiltin, 34 NoInterfaceObject33 PrivateIdentifier 35 34 ] interface ReadableStreamBYOBRequest { 36 35 [NotEnumerable] void respond(optional any bytesWritten); -
trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.idl
r220279 r239349 31 31 Conditional=STREAMS_API, 32 32 CustomConstructor(ReadableStream stream, any underlyingSource, unsigned long size, unsigned long highWaterMark), 33 Exposed=(Window,Worker),34 33 JSBuiltin, 35 NoInterfaceObject34 PrivateIdentifier 36 35 ] interface ReadableStreamDefaultController { 37 36 [NotEnumerable] void enqueue(optional any chunk); -
trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl
r220279 r239349 31 31 Conditional=STREAMS_API, 32 32 CustomConstructor(ReadableStream stream), 33 Exposed=(Window,Worker),34 33 JSBuiltin, 35 NoInterfaceObject34 PrivateIdentifier 36 35 ] interface ReadableStreamDefaultReader { 37 36 [NotEnumerable] Promise<any> read(); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r239316 r239349 7344 7344 my $interface = shift; 7345 7345 7346 # FIXME: This condition makes little sense. It should not be possible to have a constructor at all if you have 7347 # no interface object. This seems to be only used by the ReadableStreams code. 7348 return !$interface->extendedAttributes->{NoInterfaceObject} || $interface->extendedAttributes->{CustomConstructor}; 7346 return !$interface->extendedAttributes->{NoInterfaceObject}; 7349 7347 } 7350 7348 -
trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl
r237766 r239349 139 139 # See https://heycam.github.io/webidl/#es-interfaces 140 140 my $extendedAttributes = getInterfaceExtendedAttributesFromIDL($idlFileContents); 141 unless ($extendedAttributes->{"NoInterfaceObject"}) {141 if (shouldExposeInterface($extendedAttributes)) { 142 142 if (!isCallbackInterfaceFromIDL($idlFileContents) || interfaceHasConstantAttribute($idlFileContents)) { 143 143 my $exposedAttribute = $extendedAttributes->{"Exposed"} || "Window"; … … 404 404 return $fileContents =~ /\s+const[\s\w]+=\s+[\w]+;/gs; 405 405 } 406 407 sub shouldExposeInterface 408 { 409 my $extendedAttributes = shift; 410 411 return 0 if $extendedAttributes->{"NoInterfaceObject"}; 412 return 0 if $extendedAttributes->{"PrivateIdentifier"} && !($extendedAttributes->{"PublicIdentifier"}); 413 return 1; 414 }
Note: See TracChangeset
for help on using the changeset viewer.