Skip to content

Commit 7600900

Browse files
srujzsCommit Queue
authored and
Commit Queue
committed
Revert "[dart:js_interop] Add Since('3.6') annotations to new APIs"
This reverts commit 14cf3b4. Reason for revert: web_ui uses some of these APIs, but the pubspec SDK version is not >= 3.6. Therefore, Flutter analyze fails, which would then result in a broken roll. Updating the pubspec versions leads to try bot failures (flutter/engine#54590) so for now, revert. Original change's description: > [dart:js_interop] Add Since('3.6') annotations to new APIs > > Closes #56484 > > Change-Id: I9d3da568aafeccbb855892ea5c2ba647371170bc > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380900 > Reviewed-by: Kevin Moore <[email protected]> > Reviewed-by: Leaf Petersen <[email protected]> > Reviewed-by: Sigmund Cherem <[email protected]> > Commit-Queue: Srujan Gaddam <[email protected]> > Reviewed-by: Martin Kustermann <[email protected]> Change-Id: Idfb021c5744d83a8004259f9c8774945a2612efd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380967 Reviewed-by: Leaf Petersen <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
1 parent 14cf3b4 commit 7600900

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

sdk/lib/js_interop/js_interop.dart

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -160,22 +160,18 @@ extension type JSArray<T extends JSAny?>._(JSArrayRepType _jsArray)
160160
external JSArray.withLength(int length);
161161

162162
/// The length in elements of this `Array`.
163-
@Since('3.6')
164163
external int get length;
165164

166165
/// Sets the length in elements of this `Array`.
167166
///
168167
/// Setting it smaller than the current length truncates this `Array`, and
169168
/// setting it larger adds empty slots, which requires [T] to be nullable.
170-
@Since('3.6')
171169
external set length(int newLength);
172170

173171
/// The value at [position] in this `Array`.
174-
@Since('3.6')
175172
external T operator [](int position);
176173

177174
/// Sets the [value] at [position] in this `Array`.
178-
@Since('3.6')
179175
external void operator []=(int position, T value);
180176
}
181177

@@ -215,7 +211,6 @@ extension type JSArrayBuffer._(JSArrayBufferRepType _jsArrayBuffer)
215211
implements JSObject {
216212
/// Creates a JavaScript `ArrayBuffer` of size [length] using an optional
217213
/// [options] JavaScript object that sets the `maxByteLength`.
218-
@Since('3.6')
219214
external JSArrayBuffer(int length, [JSObject options]);
220215
}
221216

@@ -224,7 +219,6 @@ extension type JSArrayBuffer._(JSArrayBufferRepType _jsArrayBuffer)
224219
extension type JSDataView._(JSDataViewRepType _jsDataView) implements JSObject {
225220
/// Creates a JavaScript `DataView` with [buffer] as its backing storage,
226221
/// offset by [byteOffset] bytes, of size [byteLength].
227-
@Since('3.6')
228222
external JSDataView(JSArrayBuffer buffer, [int byteOffset, int byteLength]);
229223
}
230224

@@ -240,12 +234,10 @@ extension type JSInt8Array._(JSInt8ArrayRepType _jsInt8Array)
240234
/// offset by [byteOffset] bytes, of size [length].
241235
///
242236
/// If no [buffer] is provided, creates an empty `Int8Array`.
243-
@Since('3.6')
244237
external JSInt8Array([JSArrayBuffer buffer, int byteOffset, int length]);
245238

246239
/// Creates a JavaScript `Int8Array` of size [length] whose elements are
247240
/// initialized to 0.
248-
@Since('3.6')
249241
external JSInt8Array.withLength(int length);
250242
}
251243

@@ -257,12 +249,10 @@ extension type JSUint8Array._(JSUint8ArrayRepType _jsUint8Array)
257249
/// offset by [byteOffset] bytes, of size [length].
258250
///
259251
/// If no [buffer] is provided, creates an empty `Uint8Array`.
260-
@Since('3.6')
261252
external JSUint8Array([JSArrayBuffer buffer, int byteOffset, int length]);
262253

263254
/// Creates a JavaScript `Uint8Array` of size [length] whose elements are
264255
/// initialized to 0.
265-
@Since('3.6')
266256
external JSUint8Array.withLength(int length);
267257
}
268258

@@ -274,13 +264,11 @@ extension type JSUint8ClampedArray._(
274264
/// storage, offset by [byteOffset] bytes, of size [length].
275265
///
276266
/// If no [buffer] is provided, creates an empty `Uint8ClampedArray`.
277-
@Since('3.6')
278267
external JSUint8ClampedArray(
279268
[JSArrayBuffer buffer, int byteOffset, int length]);
280269

281270
/// Creates a JavaScript `Uint8ClampedArray` of size [length] whose elements
282271
/// are initialized to 0.
283-
@Since('3.6')
284272
external JSUint8ClampedArray.withLength(int length);
285273
}
286274

@@ -292,12 +280,10 @@ extension type JSInt16Array._(JSInt16ArrayRepType _jsInt16Array)
292280
/// offset by [byteOffset] bytes, of size [length].
293281
///
294282
/// If no [buffer] is provided, creates an empty `Int16Array`.
295-
@Since('3.6')
296283
external JSInt16Array([JSArrayBuffer buffer, int byteOffset, int length]);
297284

298285
/// Creates a JavaScript `Int16Array` of size [length] whose elements are
299286
/// initialized to 0.
300-
@Since('3.6')
301287
external JSInt16Array.withLength(int length);
302288
}
303289

@@ -309,12 +295,10 @@ extension type JSUint16Array._(JSUint16ArrayRepType _jsUint16Array)
309295
/// offset by [byteOffset] bytes, of size [length].
310296
///
311297
/// If no [buffer] is provided, creates an empty `Uint16Array`.
312-
@Since('3.6')
313298
external JSUint16Array([JSArrayBuffer buffer, int byteOffset, int length]);
314299

315300
/// Creates a JavaScript `Uint16Array` of size [length] whose elements are
316301
/// initialized to 0.
317-
@Since('3.6')
318302
external JSUint16Array.withLength(int length);
319303
}
320304

@@ -326,12 +310,10 @@ extension type JSInt32Array._(JSInt32ArrayRepType _jsInt32Array)
326310
/// offset by [byteOffset] bytes, of size [length].
327311
///
328312
/// If no [buffer] is provided, creates an empty `Int32Array`.
329-
@Since('3.6')
330313
external JSInt32Array([JSArrayBuffer buffer, int byteOffset, int length]);
331314

332315
/// Creates a JavaScript `Int32Array` of size [length] whose elements are
333316
/// initialized to 0.
334-
@Since('3.6')
335317
external JSInt32Array.withLength(int length);
336318
}
337319

@@ -343,12 +325,10 @@ extension type JSUint32Array._(JSUint32ArrayRepType _jsUint32Array)
343325
/// offset by [byteOffset] bytes, of size [length].
344326
///
345327
/// If no [buffer] is provided, creates an empty `Uint32Array`.
346-
@Since('3.6')
347328
external JSUint32Array([JSArrayBuffer buffer, int byteOffset, int length]);
348329

349330
/// Creates a JavaScript `Uint32Array` of size [length] whose elements are
350331
/// initialized to 0.
351-
@Since('3.6')
352332
external JSUint32Array.withLength(int length);
353333
}
354334

@@ -360,12 +340,10 @@ extension type JSFloat32Array._(JSFloat32ArrayRepType _jsFloat32Array)
360340
/// offset by [byteOffset] bytes, of size [length].
361341
///
362342
/// If no [buffer] is provided, creates an empty `Float32Array`.
363-
@Since('3.6')
364343
external JSFloat32Array([JSArrayBuffer buffer, int byteOffset, int length]);
365344

366345
/// Creates a JavaScript `Float32Array` of size [length] whose elements are
367346
/// initialized to 0.
368-
@Since('3.6')
369347
external JSFloat32Array.withLength(int length);
370348
}
371349

@@ -377,12 +355,10 @@ extension type JSFloat64Array._(JSFloat64ArrayRepType _jsFloat64Array)
377355
/// offset by [byteOffset] bytes, of size [length].
378356
///
379357
/// If no [buffer] is provided, creates an empty `Float64Array`.
380-
@Since('3.6')
381358
external JSFloat64Array([JSArrayBuffer buffer, int byteOffset, int length]);
382359

383360
/// Creates a JavaScript `Float64Array` of size [length] whose elements are
384361
/// initialized to 0.
385-
@Since('3.6')
386362
external JSFloat64Array.withLength(int length);
387363
}
388364

@@ -649,7 +625,6 @@ extension FunctionToJSExportedDartFunction on Function {
649625
/// [Function]. Any [Function] that is converted with this member should take
650626
/// in an extra parameter at the beginning of the parameter list to handle
651627
/// this.
652-
@Since('3.6')
653628
external JSExportedDartFunction get toJSCaptureThis;
654629
}
655630

0 commit comments

Comments
 (0)