Skip to content

Commit

Permalink
[dart:svg] Add value->newLength parameter name change to templates
Browse files Browse the repository at this point in the history
https://dart-review.googlesource.com/c/sdk/+/372522 renamed some
parameters but the template files did not include the change, so
they'd get replaced when we regenerate the web libraries.

This change includes some other places where we should use newLength
as well.

Change-Id: I93b5a5da381dd2d1347769287467f2c174fe07aa
CoreLibraryReviewExempt: Fixes a bug in the generation of web libraries.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401043
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
  • Loading branch information
srujzs authored and Commit Queue committed Dec 18, 2024
1 parent 57c4da6 commit 72acd9d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
36 changes: 18 additions & 18 deletions sdk/lib/html/dart2js/html_dart2js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11837,7 +11837,7 @@ class DomRectList extends JavaScriptObject
// -- start List<Rectangle> mixins.
// Rectangle is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -12093,7 +12093,7 @@ class DomStringList extends JavaScriptObject
// -- start List<String> mixins.
// String is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -16755,7 +16755,7 @@ class FileList extends JavaScriptObject
// -- start List<File> mixins.
// File is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -18325,7 +18325,7 @@ class HtmlCollection extends JavaScriptObject
// -- start List<Node> mixins.
// Node is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -22894,7 +22894,7 @@ class MimeTypeArray extends JavaScriptObject
// -- start List<MimeType> mixins.
// MimeType is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -23982,7 +23982,7 @@ class _ChildNodeListLazy extends ListBase<Node> implements NodeListWrapper {
// a local copy of childNodes is more efficient.
int get length => _this.childNodes.length;

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot set length on immutable List.");
}

Expand Down Expand Up @@ -24438,7 +24438,7 @@ class NodeList extends JavaScriptObject
// -- start List<Node> mixins.
// Node is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -26626,7 +26626,7 @@ class PluginArray extends JavaScriptObject
// -- start List<Plugin> mixins.
// Plugin is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -29403,7 +29403,7 @@ class SourceBufferList extends EventTarget
// -- start List<SourceBuffer> mixins.
// SourceBuffer is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -29562,7 +29562,7 @@ class SpeechGrammarList extends JavaScriptObject
// -- start List<SpeechGrammar> mixins.
// SpeechGrammar is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -31284,7 +31284,7 @@ class TextTrackCueList extends JavaScriptObject
// -- start List<TextTrackCue> mixins.
// TextTrackCue is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -31358,7 +31358,7 @@ class TextTrackList extends EventTarget
// -- start List<TextTrack> mixins.
// TextTrack is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -31628,7 +31628,7 @@ class TouchList extends JavaScriptObject
// -- start List<Touch> mixins.
// Touch is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -35713,7 +35713,7 @@ class _CssRuleList extends JavaScriptObject
// -- start List<CssRule> mixins.
// CssRule is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -36030,7 +36030,7 @@ class _GamepadList extends JavaScriptObject
// -- start List<Gamepad?> mixins.
// Gamepad? is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -36308,7 +36308,7 @@ class _NamedNodeMap extends JavaScriptObject
// -- start List<Node> mixins.
// Node is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -36502,7 +36502,7 @@ class _SpeechRecognitionResultList extends JavaScriptObject
// -- start List<SpeechRecognitionResult> mixins.
// SpeechRecognitionResult is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down Expand Up @@ -36562,7 +36562,7 @@ class _StyleSheetList extends JavaScriptObject
// -- start List<StyleSheet> mixins.
// StyleSheet is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class SqlResultSetRowList extends JavaScriptObject
// -- start List<Map> mixins.
// Map is the element type.

set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $if DEFINE_LENGTH_AS_NUM_ITEMS
$endif

$if DEFINE_LENGTH_SETTER
set length(int value) {
set length(int newLength) {
throw new UnsupportedError("Cannot resize immutable List.");
}
$endif
Expand Down
2 changes: 1 addition & 1 deletion tools/dom/templates/html/impl/impl_Node.darttemplate
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class _ChildNodeListLazy extends ListBase<Node> implements NodeListWrapper {
// a local copy of childNodes is more efficient.
int get length => _this.childNodes.length;

set length(int value) {
set length(int newLength) {
throw new UnsupportedError(
"Cannot set length on immutable List.");
}
Expand Down

0 comments on commit 72acd9d

Please sign in to comment.