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

iOS: Eliminate logging of non-zero origin platformviews #56796

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Nov 25, 2024

In #35501, handling was added to log a debug message to the console in the case where a platform view with a non-zero origin was identified.

Unfortunately:

  • In unopt builds, the first thing we do in that block is to call FML_DCHECK asserting that the origin is zero, so we never actually emit the log statement.
  • In opt builds, FML_DCHECK is a no-op, so users are unlikely to actually ever notice the crash.

The proper fix is to eliminate this restriction, but in the meantime, this eliminates this block entirely and leaves the TODO. We've had only two comments on that bug in the 2.5 years since it was added.

Issue: flutter/flutter#109700

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM, amazing

In flutter#35501, handling was added to log a debug message to
the console in the case where a platform view with a non-zero origin was
identified.

Unfortunately:
* In unopt builds, the first thing we do in that block is to call
  FML_DCHECK asserting that the origin is zero, so we never actually
  emit the log statement.
* In opt builds, FML_DCHECK is a no-op, so users are unlikely to
  actually ever notice the crash.

The proper fix is to eliminate this restriction, but in the meantime,
this eliminates this block entirely and leaves the TODO. We've had only
two comments on that bug in the 2.5 years since it was added.

Issue: flutter/flutter#109700
@cbracken cbracken force-pushed the fix-bad-debug-block branch from f592a51 to ad8d7fa Compare November 25, 2024 22:50
@cbracken cbracken changed the title iOS: Fix handling of non-zero origin platformviews iOS: Eliminate non-handling of non-zero origin platformviews Nov 25, 2024
@cbracken cbracken changed the title iOS: Eliminate non-handling of non-zero origin platformviews iOS: Eliminate logging of non-zero origin platformviews Nov 25, 2024
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 25, 2024
@auto-submit auto-submit bot merged commit 3c751a9 into flutter:main Nov 25, 2024
31 checks passed
@cbracken cbracken deleted the fix-bad-debug-block branch November 25, 2024 23:39
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 26, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 26, 2024
…159461)

flutter/engine@fe45a66...fb64399

2024-11-26 [email protected] iOS: Migrate PlatformViewsController to
Objective-C (flutter/engine#56790)
2024-11-26 [email protected] Started caching
HandleGLES's hash and made them immutable (flutter/engine#56800)
2024-11-26 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[iOS] Full keyboard access scrolling (#56606)" (flutter/engine#56802)
2024-11-26 [email protected] Roll Skia from 12c8bd6ac1d9 to
c1c8ff84997c (14 revisions) (flutter/engine#56801)
2024-11-25 [email protected] [Impeller] better handle allocation
herustics of Android slide in page transition. (flutter/engine#56762)
2024-11-25 [email protected] iOS: Eliminate logging of non-zero origin
platformviews (flutter/engine#56796)
2024-11-25 [email protected] [impeller] gles:
started storing the number of handle deletions to avoid reallocation
(flutter/engine#56799)
2024-11-25 [email protected] Roll Fuchsia Linux SDK from
9o0fWa2xVhmxV6Mtn... to 50xtjbMWWrqay_7m_... (flutter/engine#56795)
2024-11-25 [email protected] Roll Dart SDK from
df716eaa6ed2 to 4b49546a1dfa (1 revision) (flutter/engine#56793)
2024-11-25 [email protected] [iOS] Full
keyboard access scrolling (flutter/engine#56606)
2024-11-25 [email protected] [android] remove fml_check from
surface_texture_external_texture (flutter/engine#56760)
2024-11-25 [email protected] removed unused
variable for skia initialization (flutter/engine#56791)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 9o0fWa2xVhmx to 50xtjbMWWrqa

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 [email protected],[email protected] on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 26, 2024
…visions) (#159461)" (#159498)

<!-- start_original_pr_link -->
Reverts: #159461
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: yjbanov
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: engine regression
#159497
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: engine-flutter-autoroll
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {fluttergithubbot}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:

flutter/engine@fe45a66...fb64399

2024-11-26 [email protected] iOS: Migrate PlatformViewsController to
Objective-C (flutter/engine#56790)
2024-11-26 [email protected] Started caching
HandleGLES's hash and made them immutable (flutter/engine#56800)
2024-11-26 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[iOS] Full keyboard access scrolling (#56606)" (flutter/engine#56802)
2024-11-26 [email protected] Roll Skia from 12c8bd6ac1d9 to
c1c8ff84997c (14 revisions) (flutter/engine#56801)
2024-11-25 [email protected] [Impeller] better handle allocation
herustics of Android slide in page transition. (flutter/engine#56762)
2024-11-25 [email protected] iOS: Eliminate logging of non-zero origin
platformviews (flutter/engine#56796)
2024-11-25 [email protected] [impeller] gles:
started storing the number of handle deletions to avoid reallocation
(flutter/engine#56799)
2024-11-25 [email protected] Roll Fuchsia Linux SDK from
9o0fWa2xVhmxV6Mtn... to 50xtjbMWWrqay_7m_... (flutter/engine#56795)
2024-11-25 [email protected] Roll Dart SDK from
df716eaa6ed2 to 4b49546a1dfa (1 revision) (flutter/engine#56793)
2024-11-25 [email protected] [iOS] Full
keyboard access scrolling (flutter/engine#56606)
2024-11-25 [email protected] [android] remove fml_check from
surface_texture_external_texture (flutter/engine#56760)
2024-11-25 [email protected] removed unused
variable for skia initialization (flutter/engine#56791)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 9o0fWa2xVhmx to 50xtjbMWWrqa

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 [email protected],[email protected] on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 26, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 26, 2024
…159504)

flutter/engine@fe45a66...bd165dc

2024-11-26 [email protected] Revert "iOS: Migrate PlatformViewsController
to Objective-C (#56790)" (flutter/engine#56817)
2024-11-26 [email protected] iOS: Rename FlutterPlatformViews_Internal.mm
(flutter/engine#56816)
2024-11-26 [email protected] iOS: Eliminate global in platformviews
controller (flutter/engine#56805)
2024-11-26 [email protected] Roll Skia from a276978ba7c8 to
f149f852c70a (1 revision) (flutter/engine#56812)
2024-11-26 [email protected] Roll Skia from d7a267d88fd6 to
a276978ba7c8 (1 revision) (flutter/engine#56811)
2024-11-26 [email protected] Roll Skia from 8d9d892657a7 to
d7a267d88fd6 (1 revision) (flutter/engine#56810)
2024-11-26 [email protected] Roll Dart SDK from
bdb76c714009 to ca02d403f1a8 (1 revision) (flutter/engine#56809)
2024-11-26 [email protected] Roll Skia from b697dd1b03b2 to
8d9d892657a7 (1 revision) (flutter/engine#56808)
2024-11-26 [email protected] Roll Skia from c1c8ff84997c to
b697dd1b03b2 (1 revision) (flutter/engine#56807)
2024-11-26 [email protected] iOS: Delete
FlutterPlatformViewsController.layerPoolSize (flutter/engine#56806)
2024-11-26 [email protected] Roll Dart SDK from
4b49546a1dfa to bdb76c714009 (1 revision) (flutter/engine#56803)
2024-11-26 [email protected] iOS: Migrate PlatformViewsController to
Objective-C (flutter/engine#56790)
2024-11-26 [email protected] Started caching
HandleGLES's hash and made them immutable (flutter/engine#56800)
2024-11-26 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[iOS] Full keyboard access scrolling (#56606)" (flutter/engine#56802)
2024-11-26 [email protected] Roll Skia from 12c8bd6ac1d9 to
c1c8ff84997c (14 revisions) (flutter/engine#56801)
2024-11-25 [email protected] [Impeller] better handle allocation
herustics of Android slide in page transition. (flutter/engine#56762)
2024-11-25 [email protected] iOS: Eliminate logging of non-zero origin
platformviews (flutter/engine#56796)
2024-11-25 [email protected] [impeller] gles:
started storing the number of handle deletions to avoid reallocation
(flutter/engine#56799)
2024-11-25 [email protected] Roll Fuchsia Linux SDK from
9o0fWa2xVhmxV6Mtn... to 50xtjbMWWrqay_7m_... (flutter/engine#56795)
2024-11-25 [email protected] Roll Dart SDK from
df716eaa6ed2 to 4b49546a1dfa (1 revision) (flutter/engine#56793)
2024-11-25 [email protected] [iOS] Full
keyboard access scrolling (flutter/engine#56606)
2024-11-25 [email protected] [android] remove fml_check from
surface_texture_external_texture (flutter/engine#56760)
2024-11-25 [email protected] removed unused
variable for skia initialization (flutter/engine#56791)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 9o0fWa2xVhmx to 50xtjbMWWrqa

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 [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…ne#56796)

In flutter/engine#35501, handling was added to log a debug message to the console in the case where a platform view with a non-zero origin was identified.

Unfortunately:
* In unopt builds, the first thing we do in that block is to call FML_DCHECK asserting that the origin is zero, so we never actually emit the log statement.
* In opt builds, FML_DCHECK is a no-op, so users are unlikely to actually ever notice the crash.

The proper fix is to eliminate this restriction, but in the meantime, this eliminates this block entirely and leaves the TODO. We've had only two comments on that bug in the 2.5 years since it was added.

Issue: flutter#109700

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants