[Webkit-unassigned] [Bug 18056] Cannot convert DOM exception prototype object to a string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 4 00:56:25 PDT 2009


--- Comment #4 from Cameron McCormack <cam at mcc.id.au>  2009-09-04 00:56:25 PDT ---
(In reply to comment #3)
> I don't understand where you're putting that code.  Can you give an example of
> the generated output so that we know this looks right?

Sorry, I probably didn't include enough context in the diff.  Here's an example
from JSDOMCoreException.cpp:

JSValue JSC_HOST_CALL jsDOMCoreExceptionPrototypeFunctionToString(ExecState*
exec, JSObject*, JSValue thisValue, const ArgList& args)
    if (thisValue.inherits(&JSDOMCoreExceptionPrototype::s_info))
        return jsNontrivialString(exec, "[object " +
String(thisValue.toThisObject(exec)->className()) + "]");
    if (!thisValue.inherits(&JSDOMCoreException::s_info))
        return throwError(exec, TypeError);
    JSDOMCoreException* castedThisObj =
    DOMCoreException* imp =

    JSC::JSValue result = jsString(exec, imp->toString());
    return result;

I wondered whether I should look up the Object.prototype.toString to call
instead of constructing the "[object FooPrototype]" string here, but it seemed
a bit involved to do it that way.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list