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

Make MessageHandler.prototype.send able to handle Errors properly #19255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Dec 23, 2024

Currently the "DocException" message requires manual handling of Errors on both the main- and worker-threads, which leads to some code duplication.
Note that the MessageHandler implementation already deals with Errors when its sendWithPromise respectively sendWithStream methods are used, and it's easy enough to extend this to also apply to the send method.

Finally, changes the wrapReason helper function to use a slightly shorter parameter name and removes unused entries from the CallbackKind/StreamKind enumerations.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

Currently the "DocException" message requires manual handling of `Error`s on both the main- and worker-threads, which leads to some code duplication.
Note that the `MessageHandler` implementation already deals with `Error`s when its `sendWithPromise` respectively `sendWithStream` methods are used, and it's easy enough to extend this to also apply to the `send` method.

Finally, changes the `wrapReason` helper function to use a slightly shorter parameter name and removes unused entries from the `CallbackKind`/`StreamKind` enumerations.
@Snuffleupagus Snuffleupagus force-pushed the MessageHandler-send-Error branch from 8d773a9 to 238000e Compare December 23, 2024 14:13
@mozilla mozilla deleted a comment from moz-tools-bot Dec 23, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Dec 23, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Dec 23, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Dec 23, 2024
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/5fb22b94cffe17b/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cf3683608996c88/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/5fb22b94cffe17b/output.txt

Total script time: 28.05 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/cf3683608996c88/output.txt

Total script time: 52.40 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants