Closed
Bug 779364
Opened 12 years ago
Closed 12 years ago
New DOM Bindings raises exception with incorrect exception usage warning "WARNING: Huh, someone is throwing non-DOM errors using the DOM module!"
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bsurender, Unassigned)
References
Details
"WARNING: Huh, someone is throwing non-DOM errors using the DOM module!" displayed when valid exception is raised in the NEW DOM bindings generated binding code file for the TextDecoder. The exception is correctly raised when unit test passes an invalid null JS object for an ArrayBufferView to TextDecode::Decode(...).
The TextDecoder is a part of the String Encoding/Decoding API, bug 764234.
Code snippet from dom/bindings/TextDecoderBinding.cpp:
const Optional<ArrayBufferView> arg1;
if (1 < argc) {
if (argv[1].isObject()) {
if (!JS_IsArrayBufferViewObject(&argv[1].toObject(), cx)) {
return Throw<false>(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
}
Comment 1•12 years ago
|
||
https://mxr.mozilla.org/mozilla-central/source/dom/base/nsDOMException.cpp?rev=6e30103582c4#101
This warning should be moved into NS_NewDOMException. NS_GetNameAndMessageForDOMNSResult will be called bypassing the DOM module.
Comment 3•12 years ago
|
||
This is hit if someone throws a non-DOMException nsresult from Workers, right? Might we worth avoiding the warning in that case regardless of bug 776685.
completed.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•