Skip to content

Refactor: JsErrorHandler: Rename handleJsError to handleFatalError#43957

Closed
RSNara wants to merge 6 commits intofacebook:mainfrom
RSNara:export-D55547901
Closed

Refactor: JsErrorHandler: Rename handleJsError to handleFatalError#43957
RSNara wants to merge 6 commits intofacebook:mainfrom
RSNara:export-D55547901

Conversation

@RSNara
Copy link
Copy Markdown
Contributor

@RSNara RSNara commented Apr 7, 2024

Summary:
Right now, JsErrorHandler is only used to handle fatal exceptions.

So, let's just scope handleJsError down to handleFatalError.

Changlog: [General][Breaking] - JSErrorHandler: Rename handleJsError -> handleFatalError

Reviewed By: cortinico

Differential Revision: D55547901

@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 labels Apr 7, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Apr 7, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,217,882 +5
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,594,623 -8
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: f77d028
Branch: main

RSNara added 6 commits April 8, 2024 12:19
Summary:
getRuntimeScheduler() allows things to schedule work on the js thread by bypassing main bundle buffering.

This is unsafe: almost everything should be using the buffered runtime executor, unless it sets up bindings used in the main bundle.

I filed a task for the investigation to see if there's any problems. And added it to the code in this diff.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D55547899
Summary:
RuntimeScheduler's ErrorUtils.h is redundant.

Let's just remove it.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D55547905
Summary:
Now, all the defaulting is in RuntimeScheduler.h.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D55547900
Summary:
Just makes it easier to pass around JsErrorHandler.

We'll need this in D55547897, when we start storing the "has fataled" boolean inside the JsErrorHandler.

Changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D55547898
Summary:
I think we should try to centralize all things js error handling related inside JsErrorHandler. So, I moved this bool into JsErrorHandler.

This makes ReactInstance easier to understand: it removes one member variable from ReactInstance.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D55547897
…acebook#43957)

Summary:

Right now, JsErrorHandler is only used to handle fatal exceptions.

So, let's just scope handleJsError down to handleFatalError.

Changelog: [General][Breaking] - JsErrorHandler: Rename handleJsError to handleFatalError

Reviewed By: cortinico

Differential Revision: D55547901
@RSNara RSNara force-pushed the export-D55547901 branch from ed19570 to 98e8831 Compare April 8, 2024 19:20
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

RSNara added a commit to RSNara/react-native that referenced this pull request Apr 8, 2024
…alError (facebook#43957)

Summary:

Right now, JsErrorHandler is only used to handle fatal exceptions.

So, let's just scope handleJsError down to handleFatalError.

Changelog: [General][Breaking] - JsErrorHandler: Rename handleJsError to handleFatalError

Reviewed By: cortinico

Differential Revision: D55547901
RSNara added a commit to RSNara/react-native that referenced this pull request Apr 8, 2024
…alError (facebook#43957)

Summary:

Right now, JsErrorHandler is only used to handle fatal exceptions.

So, let's just scope handleJsError down to handleFatalError.

Changelog: [General][Breaking] - JsErrorHandler: Rename handleJsError to handleFatalError

Reviewed By: cortinico

Differential Revision: D55547901
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 9, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in c041b9f.

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.

3 participants