Skip to content

Commit 597a921

Browse files
authored
[CQ] fix visibility scope of leaked classes (flutter#8219)
These classes are exposed but not available outside their visibility scopes. The APIs exposing them seem reasonable but if we revisit them we can always make these classes (more) private again. ![image](https://github.com/user-attachments/assets/8dcd2cdb-47cb-4d48-96fb-4d12b8800d04) --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](flutter#8098)). </details>
1 parent da70cfa commit 597a921

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

flutter-idea/src/io/flutter/run/test/TestLaunchState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
/**
3838
* A launcher that starts a process to run flutter tests, created from a run configuration.
3939
*/
40-
class TestLaunchState extends CommandLineState {
40+
public class TestLaunchState extends CommandLineState {
4141
@NotNull
4242
private final TestConfig config;
4343

flutter-idea/src/io/flutter/view/EmbeddedBrowser.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@
3232
import java.util.function.Consumer;
3333
import java.util.function.Function;
3434

35-
class BrowserTab {
36-
protected EmbeddedTab embeddedTab;
37-
protected Content content;
38-
protected CompletableFuture<DevToolsUrl> devToolsUrlFuture;
39-
public ContentManager contentManager;
40-
}
4135

4236
/**
4337
* There is one instance of embedded browser across the project, but it manages tabs across multiple tool
4438
* windows. Each tab can display contents of an independent URL.
4539
*/
4640
public abstract class EmbeddedBrowser {
41+
static public class BrowserTab {
42+
protected EmbeddedTab embeddedTab;
43+
protected Content content;
44+
protected CompletableFuture<DevToolsUrl> devToolsUrlFuture;
45+
public ContentManager contentManager;
46+
}
47+
4748
public static final String ANALYTICS_CATEGORY = "embedded-browser";
4849

4950
protected final Map<@NotNull String, Map<@NotNull String, @NotNull BrowserTab>> windows = new HashMap<>();

flutter-idea/src/io/flutter/vmService/frame/DartVmServiceValue.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ private void addFields(@NotNull final XCompositeNode node, @Nullable final Eleme
532532
final String n;
533533
if (name instanceof String) {
534534
n = (String)name;
535-
} else {
535+
}
536+
else {
536537
n = "$" + (int)name;
537538
}
538539
childrenList.add(new DartVmServiceValue(myDebugProcess, myIsolateId, n, value, null, null, false));
@@ -599,7 +600,7 @@ public InstanceRef getInstanceRef() {
599600
return myInstanceRef;
600601
}
601602

602-
static class LocalVarSourceLocation {
603+
public static class LocalVarSourceLocation {
603604
@NotNull private final ScriptRef myScriptRef;
604605
private final int myTokenPos;
605606

0 commit comments

Comments
 (0)