mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
* Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
303 lines
6.7 KiB
Text
303 lines
6.7 KiB
Text
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
# DOM Bindings Configuration.
|
|
#
|
|
# The WebIDL interfaces are defined in dom/webidls. For each such interface,
|
|
# there is a corresponding entry in the configuration table below.
|
|
# The configuration table maps each interface name to a |descriptor|.
|
|
#
|
|
# Valid fields for all descriptors:
|
|
# * outerObjectHook: string to use in place of default value for outerObject and thisObject
|
|
# JS class hooks
|
|
|
|
DOMInterfaces = {
|
|
|
|
'AbstractRange': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'AudioContext': {
|
|
'inRealms': ['Close', 'Suspend'],
|
|
'canGc':['CreateMediaStreamDestination', 'CreateMediaElementSource', 'CreateMediaStreamSource', 'CreateMediaStreamTrackSource'],
|
|
},
|
|
|
|
'BaseAudioContext': {
|
|
'inRealms': ['DecodeAudioData', 'Resume', 'ParseFromString', 'GetBounds', 'GetClientRects'],
|
|
'canGc': ['CreateChannelMerger', 'CreateOscillator', 'CreateStereoPanner', 'CreateGain', 'CreateIIRFilter', 'CreateBiquadFilter', 'CreateBufferSource', 'CreateAnalyser', 'CreatePanner', 'CreateChannelSplitter'],
|
|
},
|
|
|
|
'Blob': {
|
|
'weakReferenceable': True,
|
|
'canGc': ['Slice'],
|
|
},
|
|
|
|
'Bluetooth': {
|
|
'inRealms': ['GetAvailability', 'RequestDevice'],
|
|
},
|
|
|
|
'BluetoothDevice': {
|
|
'inRealms': ['WatchAdvertisements'],
|
|
},
|
|
|
|
'BluetoothRemoteGATTCharacteristic': {
|
|
'inRealms': ['ReadValue', 'StartNotifications', 'StopNotifications', 'WriteValue'],
|
|
},
|
|
|
|
'BluetoothRemoteGATTDescriptor': {
|
|
'inRealms': ['ReadValue', 'WriteValue'],
|
|
},
|
|
|
|
'BluetoothRemoteGATTServer': {
|
|
'inRealms': ['Connect'],
|
|
},
|
|
|
|
'CustomElementRegistry': {
|
|
'inRealms': ['WhenDefined'],
|
|
},
|
|
|
|
'CanvasRenderingContext2D': {
|
|
'canGc': ['GetTransform','GetImageData', 'CreateImageData', 'CreateImageData_'],
|
|
},
|
|
|
|
'DOMImplementation': {
|
|
'canGc': ['CreateDocument', 'CreateHTMLDocument'],
|
|
},
|
|
|
|
'DOMParser': {
|
|
'canGc': ['ParseFromString'],
|
|
},
|
|
|
|
'DOMMatrix': {
|
|
'canGc': ['FromMatrix', 'FromFloat32Array', 'FromFloat64Array'],
|
|
},
|
|
|
|
'DOMQuad': {
|
|
'canGc': ['FromRect', 'FromQuad', 'GetBounds'],
|
|
},
|
|
|
|
'DOMPoint': {
|
|
'canGc': ['FromPoint'],
|
|
},
|
|
|
|
'DOMPointReadOnly': {
|
|
'canGc': ['FromPoint'],
|
|
},
|
|
|
|
'DOMMatrixReadOnly': {
|
|
'canGc': ['Multiply', 'Inverse', 'Scale', 'Translate', 'Rotate', 'RotateFromVector','FlipY', 'ScaleNonUniform', 'Scale3d', 'RotateAxisAngle', 'SkewX', 'SkewY', 'FlipX', 'TransformPoint', 'FromFloat32Array', 'FromFloat64Array','FromMatrix'],
|
|
},
|
|
|
|
'Document': {
|
|
'canGc': ['Close', 'CreateElement', 'CreateElementNS', 'ImportNode', 'SetTitle', 'Write', 'Writeln', 'CreateEvent', 'CreateRange', 'Open', 'Open_'],
|
|
},
|
|
|
|
'DynamicModuleOwner': {
|
|
'inRealms': ['PromiseAttribute'],
|
|
},
|
|
|
|
'Element': {
|
|
'canGc': ['SetInnerHTML', 'SetOuterHTML', 'InsertAdjacentHTML', 'GetClientRects', 'GetBoundingClientRect'],
|
|
},
|
|
|
|
'EventSource': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'File': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'GPU': {
|
|
'inRealms': ['RequestAdapter'],
|
|
},
|
|
|
|
'GPUAdapter': {
|
|
'inRealms': ['RequestAdapterInfo', 'RequestDevice'],
|
|
},
|
|
|
|
'GPUBuffer': {
|
|
'inRealms': ['MapAsync'],
|
|
},
|
|
|
|
'GPUDevice': {
|
|
'inRealms': [
|
|
'CreateComputePipelineAsync',
|
|
'CreateRenderPipelineAsync',
|
|
'CreateShaderModule', # Creates promise for compilation info
|
|
'PopErrorScope'
|
|
],
|
|
'weakReferenceable': True, # for usage in GlobalScope https://github.com/servo/servo/issues/32519
|
|
},
|
|
|
|
'GamepadHapticActuator': {
|
|
'inRealms': ['PlayEffect', 'Reset']
|
|
},
|
|
|
|
'HTMLFormElement': {
|
|
'canGc': ['RequestSubmit'],
|
|
},
|
|
|
|
'HTMLMediaElement': {
|
|
'canGc': ['Load', 'Pause', 'Play', 'SetSrcObject'],
|
|
'inRealms': ['Play'],
|
|
},
|
|
|
|
'HTMLCanvasElement': {
|
|
'canGc': ['CaptureStream'],
|
|
},
|
|
|
|
'HTMLTemplateElement': {
|
|
'canGc': ['Content'],
|
|
},
|
|
|
|
'MediaDevices': {
|
|
'canGc': ['GetUserMedia'],
|
|
'inRealms': ['GetUserMedia', 'GetClientRects', 'GetBoundingClientRect'],
|
|
},
|
|
|
|
'MediaStream': {
|
|
'canGc': ['Clone'],
|
|
},
|
|
|
|
'MediaSession': {
|
|
'canGc': ['GetMetadata'],
|
|
},
|
|
|
|
|
|
'MediaQueryList': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'MessagePort': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'NavigationPreloadManager': {
|
|
'inRealms': ['Disable', 'Enable', 'GetState', 'SetHeaderValue'],
|
|
},
|
|
|
|
'Navigator': {
|
|
'inRealms': ['GetVRDisplays'],
|
|
},
|
|
|
|
'Node': {
|
|
'canGc': ['CloneNode'],
|
|
},
|
|
|
|
'OfflineAudioContext': {
|
|
'inRealms': ['StartRendering'],
|
|
},
|
|
|
|
'OffscreenCanvasRenderingContext2D': {
|
|
'canGc': ['CreateImageData', 'CreateImageData_', 'GetImageData', 'GetTransform'],
|
|
},
|
|
|
|
'PaintRenderingContext2D': {
|
|
'canGc': ['GetTransform'],
|
|
},
|
|
|
|
'Promise': {
|
|
'spiderMonkeyInterface': True,
|
|
},
|
|
|
|
'RTCPeerConnection': {
|
|
'inRealms': ['AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'],
|
|
'canGc': ['Close'],
|
|
},
|
|
|
|
'Range': {
|
|
'canGc': ['CloneContents', 'CloneRange', 'CreateContextualFragment', 'ExtractContents', 'SurroundContents'],
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
'Response': {
|
|
'canGc': ['Error', 'Redirect', 'Clone', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer'],
|
|
},
|
|
|
|
'Request': {
|
|
'canGc': ['Headers', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Clone'],
|
|
},
|
|
|
|
'Selection': {
|
|
'canGc': ['Collapse', 'CollapseToEnd', 'CollapseToStart', 'Extend', 'SelectAllChildren', 'SetBaseAndExtent', 'SetPosition'],
|
|
},
|
|
|
|
|
|
'ServiceWorkerContainer': {
|
|
'inRealms': ['Register'],
|
|
},
|
|
|
|
'StaticRange': {
|
|
'weakReferenceable': True,
|
|
},
|
|
|
|
#FIXME(jdm): This should be 'register': False, but then we don't generate enum types
|
|
'TestBinding': {
|
|
'inRealms': ['PromiseAttribute', 'PromiseNativeHandler'],
|
|
'canGc': ['InterfaceAttribute', 'GetInterfaceAttributeNullable', 'ReceiveInterface', 'ReceiveInterfaceSequence', 'ReceiveNullableInterface'],
|
|
},
|
|
|
|
'TestWorklet': {
|
|
'inRealms': ['AddModule'],
|
|
},
|
|
|
|
'URL': {
|
|
'weakReferenceable': True,
|
|
'canGc': ['Parse'],
|
|
},
|
|
|
|
'VRDisplay': {
|
|
'inRealms': ['ExitPresent', 'RequestPresent'],
|
|
},
|
|
|
|
'Window': {
|
|
'canGc': ['Stop', 'Fetch'],
|
|
'inRealms': ['Fetch', 'GetOpener'],
|
|
},
|
|
|
|
'WindowProxy' : {
|
|
'path': 'crate::dom::windowproxy::WindowProxy',
|
|
'register': False,
|
|
},
|
|
|
|
'WorkerGlobalScope': {
|
|
'inRealms': ['Fetch'],
|
|
'canGc': ['Fetch'],
|
|
},
|
|
|
|
'Worklet': {
|
|
'inRealms': ['AddModule'],
|
|
},
|
|
|
|
'XMLHttpRequest': {
|
|
'canGc': ['Abort', 'GetResponseXML', 'Response'],
|
|
},
|
|
|
|
'XRSession': {
|
|
'inRealms': ['RequestReferenceSpace', 'UpdateRenderState', 'UpdateTargetFrameRate'],
|
|
'canGc': ['End'],
|
|
},
|
|
|
|
'XRSystem': {
|
|
'inRealms': ['RequestSession', 'SupportsSessionMode'],
|
|
},
|
|
|
|
'XRBoundedReferenceSpace': {
|
|
'canGc': ['BoundsGeometry'],
|
|
},
|
|
|
|
'XRRay': {
|
|
'canGc': ['Origin', 'Direction'],
|
|
},
|
|
|
|
'XRRigidTransform': {
|
|
'canGc': ['Position', 'Orientation'],
|
|
},
|
|
|
|
'SubtleCrypto': {
|
|
'inRealms': ['GenerateKey', 'ExportKey']
|
|
}
|
|
|
|
}
|