Open Bug 1057557 Opened 10 years ago Updated 2 years ago

Improve error message when passing a Uint*Array to mozTCPSocket.send instead of an ArrayBuffer

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
macOS
defect

Tracking

()

People

(Reporter: marco, Unassigned)

References

Details

The error message is quite uninformative, it is something like: "uncaught exception: out of memory error". Obviously this makes finding the error quite hard. We should either improve the error or automatically use the |buffer| property of the Uint*Array.
I'd expect an NS_ERROR_FAILURE exception, not something about "out of memory"... The right solution here is to make this a Web IDL API, by the way; that will get you sane error reporting for free.
Depends on: 885982
See also bug 1057538, where the NS_ERROR_SOCKET_ADDRESS_IN_USE error isn't propagated. I guess something similar is happening here. I remember fixing a similar bug for mozApps.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.