Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add virtual destructor to new virtual Culler class #38494

Merged
merged 1 commit into from
Dec 24, 2022

Conversation

flar
Copy link
Contributor

@flar flar commented Dec 24, 2022

Some downstream compilers will check for virtual destructors on virtual classes.

@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 to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

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.

virtual bool init(DispatchContext& context) = 0;
virtual void update(DispatchContext& context) = 0;
};
class NopCuller : public Culler {
class NopCuller final : public Culler {
Copy link
Member

Choose a reason for hiding this comment

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

Was adding the final necessary to address the check or was it just a drive by change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of the suggested fixes I saw said that final sub-classes would also avoid the error, so I did both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compiler should have been able to see that these classes were effectively final since they are defined in a .cc file and that they don't need virtual destructors because they are constructed and destructed locally within a single method, but I figured I would make everything as explicit as possible.

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 24, 2022
@auto-submit auto-submit bot merged commit 00ce1fd into flutter:main Dec 24, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 24, 2022
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Dec 24, 2022
auto-submit bot pushed a commit to flutter/plugins that referenced this pull request Dec 27, 2022
* 484858b 00ce1fd6d add virtual destructor to new virtual Culler class (flutter/engine#38494) (flutter/flutter#117624)

* d674a46 b2968296a Roll Fuchsia Mac SDK from hGNNd-oOWFLY86Tnl... to kV1stXDqE4asMxgjK... (flutter/engine#38495) (flutter/flutter#117626)

* 239f80e 3ae55014f Roll Fuchsia Mac SDK from kV1stXDqE4asMxgjK... to 90MsGucOMFZ_grNUC... (flutter/engine#38498) (flutter/flutter#117633)

* def09b4 b61200484 Roll Fuchsia Mac SDK from 90MsGucOMFZ_grNUC... to QOdpfMkM_LcPon_zm... (flutter/engine#38499) (flutter/flutter#117646)

* a09faa1 Roll Flutter Engine from b61200484d28 to da181dfbfb27 (4 revisions) (flutter/flutter#117651)

* ae292cc Roll Plugins from 94a54bf to 3eba2bf (4 revisions) (flutter/flutter#117653)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 27, 2022
* dec6b27 94a54bf Roll Flutter from dbc9306 to 9fb1ae8 (106 revisions) (flutter/plugins#6876) (flutter/flutter#117598)

* b3c321f 5bae18365 Reland "[web] Render in custom target (#37738)" (flutter/engine#38477) (flutter/flutter#117600)

* 4b4783d [flutter roll] Revert both #117338 and #117547 (flutter/flutter#117557)

* 102d039 77db88672 Roll Fuchsia Mac SDK from 9w7QDlttR9f7Gu7U6... to 9qjOKSNAN2EiCgQxC... (flutter/engine#38487) (flutter/flutter#117603)

* 393e156 e3edfadbd Roll Dart SDK from 442614a6c1bb to 6340d946feac (1 revision) (flutter/engine#38489) (flutter/flutter#117604)

* bc7d275 1d5c44966 Roll Skia from a8b7ce3b6391 to 38d9c68d35c6 (2 revisions) (flutter/engine#38492) (flutter/flutter#117617)

* e766ad0 6bee6d768 Roll Fuchsia Mac SDK from 9qjOKSNAN2EiCgQxC... to hGNNd-oOWFLY86Tnl... (flutter/engine#38493) (flutter/flutter#117618)

* 484858b 00ce1fd6d add virtual destructor to new virtual Culler class (flutter/engine#38494) (flutter/flutter#117624)

* d674a46 b2968296a Roll Fuchsia Mac SDK from hGNNd-oOWFLY86Tnl... to kV1stXDqE4asMxgjK... (flutter/engine#38495) (flutter/flutter#117626)

* 239f80e 3ae55014f Roll Fuchsia Mac SDK from kV1stXDqE4asMxgjK... to 90MsGucOMFZ_grNUC... (flutter/engine#38498) (flutter/flutter#117633)

* def09b4 b61200484 Roll Fuchsia Mac SDK from 90MsGucOMFZ_grNUC... to QOdpfMkM_LcPon_zm... (flutter/engine#38499) (flutter/flutter#117646)

* a09faa1 Roll Flutter Engine from b61200484d28 to da181dfbfb27 (4 revisions) (flutter/flutter#117651)

* ae292cc Roll Plugins from 94a54bf to 3eba2bf (4 revisions) (flutter/flutter#117653)

* fe3e93e eb8e52c59 Roll Fuchsia Mac SDK from QOdpfMkM_LcPon_zm... to ozbhYRHpQKfnPwJdh... (flutter/engine#38505) (flutter/flutter#117658)

* 41d1911 becee173e Roll Skia from 7442335dce20 to eeec7a127312 (1 revision) (flutter/engine#38506) (flutter/flutter#117662)

* d15db15 84043c672 Roll Skia from eeec7a127312 to 7fe57dac0702 (1 revision) (flutter/engine#38508) (flutter/flutter#117665)

* 4cce45f 06b2eff9d Roll Dart SDK from 6340d946feac to 494e4d4bf58d (1 revision) (flutter/engine#38509) (flutter/flutter#117667)

* d947687 893e48763 Roll Skia from 7fe57dac0702 to 8099f53e7a43 (1 revision) (flutter/engine#38510) (flutter/flutter#117668)

* a7cc010 dbb5a5739 Roll Fuchsia Mac SDK from ozbhYRHpQKfnPwJdh... to HHADjSDGmZSkODScd... (flutter/engine#38511) (flutter/flutter#117669)

* c3f0c13 dcde1faa8 Roll Skia from 8099f53e7a43 to 789552988917 (1 revision) (flutter/engine#38512) (flutter/flutter#117672)

* 91c3f80 790604a09 Roll Skia from 789552988917 to 6abfcf819da1 (2 revisions) (flutter/engine#38513) (flutter/flutter#117674)

* bf2701d 9d69a91bb Roll Dart SDK from 494e4d4bf58d to 742e1dc3e17f (1 revision) (flutter/engine#38514) (flutter/flutter#117681)

* 00e9cf1 e11cb24 Roll Flutter from e766ad0 to ae292cc (6 revisions) (flutter/plugins#6885) (flutter/flutter#117682)

* 5538fa1 c54228b5c Roll Skia from 6abfcf819da1 to 4f64211cd741 (1 revision) (flutter/engine#38515) (flutter/flutter#117684)

* 1c273fb 27ebaec7d Roll Skia from 4f64211cd741 to 3939e68c4b4d (2 revisions) (flutter/engine#38517) (flutter/flutter#117686)

* f11fbba [macOS] Fix the `run_debug_test_macos` on arm64 (flutter/flutter#117250)

* d7abc0b a53f1e983 Roll Skia from 3939e68c4b4d to 2b6d44eb650b (2 revisions) (flutter/engine#38519) (flutter/flutter#117689)

* 894ea20 e049bbf41 Roll Fuchsia Mac SDK from HHADjSDGmZSkODScd... to c1-ICa-ToxzhYLG7F... (flutter/engine#38520) (flutter/flutter#117690)
loic-sharma pushed a commit to loic-sharma/flutter-engine that referenced this pull request Jan 3, 2023
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* 484858b 00ce1fd6d add virtual destructor to new virtual Culler class (flutter/engine#38494) (flutter/flutter#117624)

* d674a46 b2968296a Roll Fuchsia Mac SDK from hGNNd-oOWFLY86Tnl... to kV1stXDqE4asMxgjK... (flutter/engine#38495) (flutter/flutter#117626)

* 239f80e 3ae55014f Roll Fuchsia Mac SDK from kV1stXDqE4asMxgjK... to 90MsGucOMFZ_grNUC... (flutter/engine#38498) (flutter/flutter#117633)

* def09b4 b61200484 Roll Fuchsia Mac SDK from 90MsGucOMFZ_grNUC... to QOdpfMkM_LcPon_zm... (flutter/engine#38499) (flutter/flutter#117646)

* a09faa1 Roll Flutter Engine from b61200484d28 to da181dfbfb27 (4 revisions) (flutter/flutter#117651)

* ae292cc Roll Plugins from 94a54bf to 3eba2bf (4 revisions) (flutter/flutter#117653)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants