Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Refactor isolate test #16933

Merged
merged 6 commits into from
Mar 4, 2020
Merged

Refactor isolate test #16933

merged 6 commits into from
Mar 4, 2020

Conversation

dnfield
Copy link
Contributor

@dnfield dnfield commented Mar 4, 2020

Split from #16824

This is intended to make it easier for other test harnesses to launch a Dart VM. See linked PR for example of using it.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it would be nice to clean up these functions that take 10 parameters at some point, not necessary for this PR, just an observation.

@dnfield dnfield added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Mar 4, 2020
@dnfield
Copy link
Contributor Author

dnfield commented Mar 4, 2020

Looks like the mac test is going to timeout. /cc @yjbanov - the felt test on mac for this run has already taken > 51 minutes and appears to not be making progress.

I'm going to ignore the test for this change since the change cannot possibly be impacting web code, it's a C++ only test based change.

@yjbanov @nturgut - maybe we could have the web tests skip running if the only changes are to .cc|.h|.mm|.m|*.java files?

@dnfield dnfield merged commit b77f509 into flutter:master Mar 4, 2020
@dnfield dnfield deleted the refactor_isolate_test branch March 4, 2020 19:10
FML_DISALLOW_COPY_AND_ASSIGN(AutoIsolateShutdown);
};

static void RunDartCodeInIsolate(DartVMRef& vm_ref,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As soon as this header gets included in more than one translation unit, there are going to be duplicate symbol errors. The implementation needs to be in its own TU.

result = std::move(root_isolate);
}

static std::unique_ptr<AutoIsolateShutdown> RunDartCodeInIsolate(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto about needing to be in its own TU.

public:
AutoIsolateShutdown() = default;

AutoIsolateShutdown(std::shared_ptr<DartIsolate> isolate,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is a general purpose utility, please OOL these like in the rest of the engine codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed these in #16941

@chinmaygarde
Copy link
Member

Sorry about the delay in the review. Can we please fix the OOL-ing of the static methods in a follow up patch?

@dnfield
Copy link
Contributor Author

dnfield commented Mar 4, 2020

I'll follow up on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants