Last Comment Bug 779364 - New DOM Bindings raises exception with incorrect exception usage warning "WARNING: Huh, someone is throwing non-DOM errors using the DOM module!"
: New DOM Bindings raises exception with incorrect exception usage warning "WAR...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 776685
Blocks: 764234
  Show dependency treegraph
 
Reported: 2012-07-31 17:07 PDT by bsurender
Modified: 2012-08-08 13:44 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description bsurender 2012-07-31 17:07:23 PDT
"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 Masatoshi Kimura [:emk] 2012-07-31 17:29:03 PDT
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 2 Boris Zbarsky [:bz] (Out June 25-July 6) 2012-07-31 18:18:07 PDT
Based on the bug description, bug 776685 will fix this.
Comment 3 :Ms2ger 2012-08-01 12:31:20 PDT
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.
Comment 4 bsurender 2012-08-08 13:44:25 PDT
completed.

Note You need to log in before you can comment on or make changes to this bug.