Skip to content

Consolidate various debug-only flags into flags.h#30988

Closed
JoshuaGross wants to merge 3 commits into
facebook:masterfrom
JoshuaGross:export-D26392518
Closed

Consolidate various debug-only flags into flags.h#30988
JoshuaGross wants to merge 3 commits into
facebook:masterfrom
JoshuaGross:export-D26392518

Conversation

@JoshuaGross
Copy link
Copy Markdown
Contributor

Summary:
We have a bunch of flags scattered throughout the codebase with poor hygiene and commenting. Consolidate.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26392518

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Feb 12, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D26392518

@pull-bot
Copy link
Copy Markdown

pull-bot commented Feb 12, 2021

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

DetailsCATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.

Generated by 🚫 dangerJS against cb21037

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Feb 12, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 6a9bb45

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,887,601 +3
android hermes armeabi-v7a 8,393,192 -3
android hermes x86 9,377,473 +2
android hermes x86_64 9,320,405 +9
android jsc arm64-v8a 10,337,242 -2
android jsc armeabi-v7a 9,825,932 -1
android jsc x86 10,388,614 -6
android jsc x86_64 10,971,807 +23

Base commit: c760704

…line with a title. Use 1 line only, 67 chars or less>

Summary:
If there's a JS/native crash and the surface is stopped, the ReactRootView could be reused when the surface is restarted (or potentially to show the errors in a logbox; I'm don't think that's possible, but not 100% sure).

Regardless, now it will crash in those cases because of T83802049. There's no reason to do that, so just mark the ReactRootView as explicitly unused once the surface is stopped.

Changelog: [Internal]

Differential Revision: D26469742

fbshipit-source-id: 130b72ad765de44e4729dc37d34b22ad220ec301
Summary:
Change lifecycle of stopSurface in a subtle way: mark the surface as stopped in Java first, then in Cxx (currently it happens in Cxx, then Java).

This will cause us / allow us to ignore the final mounting instructions for the Surface, which are all irrelevant since they just have to do with View removal.
We can rely on GC and `unmountReactApplication` to do all of this for us, and save some CPU cycles on stopSurface.

Changelog: [Internal]

Differential Revision: D26469741

fbshipit-source-id: 882435c4488e65acf8977dcbf7c10b92c0ac5fbd
Summary:
Pull Request resolved: facebook#30988

We have a bunch of flags scattered throughout the codebase with poor hygiene and commenting. Consolidate.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26392518

fbshipit-source-id: 4d8b1e5189571681468bcee83e53f811e134c156
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D26392518

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 18, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in fb1833e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants