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

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Oct 3, 2019

its being written and read from different threads.

Relevant issue: flutter/flutter#41798

its being written and read from different threads.
private:
fml::WeakPtr<FlutterViewController> owner_controller_;
std::unique_ptr<IOSSurface> ios_surface_;
std::mutex ios_surface_mutex_;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can annotate ios_surface_ with FML_GUARDED_BY so that static thread safety check can be enabled. Also, can you add a comment there saying which threads access that resource and when. Since there wont be any contention, its hard to reason about why that lock is necessary.

Copy link
Member Author

@gaaclarke gaaclarke Oct 3, 2019

Choose a reason for hiding this comment

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

Done.

I'm not so sure usage of ios_surface_ is coordinated externally, calling SetOwnerViewController rapidly could cause CreateRenderingSurface to be talking to a undefined ios_surface_ without this mutex, for example.

Copy link
Contributor

@chinmaygarde chinmaygarde Oct 3, 2019

Choose a reason for hiding this comment

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

Thats good to document too. But your call.

@gaaclarke gaaclarke merged commit 362e3fe into flutter:master Oct 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 4, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Oct 4, 2019
git@github.com:flutter/engine.git/compare/62e58c5d9fc2...2e163b2

git log 62e58c5..2e163b2 --no-merges --oneline
2019-10-04 dnfield@google.com Revert "Build AOT and test targets, generate FARs when building Fuchsia (#12761)" (flutter/engine#12781)
2019-10-03 30870216+gaaclarke@users.noreply.github.com Enabled people to chose if SystemNavigator.pop is animated on iOS. (flutter/engine#12752)
2019-10-03 30870216+gaaclarke@users.noreply.github.com Added some thread asserts to the code and made ios_surface_ safe since (flutter/engine#12775)
2019-10-03 dnfield@google.com Build AOT and test targets, generate FARs when building Fuchsia (flutter/engine#12761)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC liyuqian@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
git@github.com:flutter/engine.git/compare/62e58c5d9fc2...2e163b2

git log 62e58c5..2e163b2 --no-merges --oneline
2019-10-04 dnfield@google.com Revert "Build AOT and test targets, generate FARs when building Fuchsia (flutter#12761)" (flutter/engine#12781)
2019-10-03 30870216+gaaclarke@users.noreply.github.com Enabled people to chose if SystemNavigator.pop is animated on iOS. (flutter/engine#12752)
2019-10-03 30870216+gaaclarke@users.noreply.github.com Added some thread asserts to the code and made ios_surface_ safe since (flutter/engine#12775)
2019-10-03 dnfield@google.com Build AOT and test targets, generate FARs when building Fuchsia (flutter/engine#12761)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC liyuqian@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants