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

Update event loop to keep full stack trace if no observer is used #6410

Merged
merged 7 commits into from
Mar 24, 2023

Conversation

michael-wb
Copy link
Contributor

@michael-wb michael-wb commented Mar 22, 2023

What, How & Why?

One of the side effects of the event loop changes in Platform Networking is that a full stack trace is not observed if an exception occurs on the event loop. Updated the event loop to not use a try ... catch block if an event loop callback observer is not being used or the handle_error() callback is not defined. Also updated the observer class to provide a function that indicates whether or not a handle_error() callback is provided.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@michael-wb michael-wb self-assigned this Mar 22, 2023
@cla-bot cla-bot bot added the cla: yes label Mar 22, 2023
@@ -872,6 +882,8 @@ struct CBindingThreadObserver : public realm::BindingCallbackThreadObserver {
protected:
CBindingThreadObserver() = default;

const realm_free_userdata_func_t m_empty_free_userdata = [](realm_userdata_t) {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this could be static

@michael-wb michael-wb merged commit 1c97895 into master Mar 24, 2023
@michael-wb michael-wb deleted the mwb/event-loop-stack-trace branch March 24, 2023 03:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
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