Skip to content

Commit

Permalink
fixup: rename it to markAsUncloneable
Browse files Browse the repository at this point in the history
  • Loading branch information
jazelly committed Oct 10, 2024
1 parent ad9f128 commit e6c3af6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/web/eventsource/eventsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class EventSource extends EventTarget {
// 1. Let ev be a new EventSource object.
super()

webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

const prefix = 'EventSource constructor'
webidl.argumentLengthCheck(arguments, 1, prefix)
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/formdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FormData {
#state = []

constructor (form) {
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

if (form !== undefined) {
throw webidl.errors.conversionFailed({
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class Headers {
#headersList

constructor (init = undefined) {
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

if (init === kConstruct) {
return
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Request {

// https://fetch.spec.whatwg.org/#dom-request
constructor (input, init = undefined) {
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

if (input === kConstruct) {
return
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Response {

// https://fetch.spec.whatwg.org/#dom-response
constructor (body = null, init = undefined) {
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

if (body === kConstruct) {
return
Expand Down
6 changes: 1 addition & 5 deletions lib/web/fetch/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ webidl.util.TypeValueToString = function (o) {
}
}

webidl.util.maybeMarkAsUncloneable = function (target) {
if (markAsUncloneable !== undefined) {
markAsUncloneable(target)
}
}
webidl.util.markAsUncloneable = markAsUncloneable || (() => {})

// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) {
Expand Down
6 changes: 3 additions & 3 deletions lib/web/websocket/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MessageEvent extends Event {
constructor (type, eventInitDict = {}) {
if (type === kConstruct) {
super(arguments[1], arguments[2])
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)
return
}

Expand All @@ -27,7 +27,7 @@ class MessageEvent extends Event {
super(type, eventInitDict)

this.#eventInit = eventInitDict
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)
}

get data () {
Expand Down Expand Up @@ -114,7 +114,7 @@ class CloseEvent extends Event {
super(type, eventInitDict)

this.#eventInit = eventInitDict
webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)
}

get wasClean () {
Expand Down
2 changes: 1 addition & 1 deletion lib/web/websocket/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class WebSocket extends EventTarget {
constructor (url, protocols = []) {
super()

webidl.util.maybeMarkAsUncloneable(this)
webidl.util.markAsUncloneable(this)

const prefix = 'WebSocket constructor'
webidl.argumentLengthCheck(arguments, 1, prefix)
Expand Down

0 comments on commit e6c3af6

Please sign in to comment.