[Webkit-unassigned] [Bug 14547] typeof document.body.childNodes=="function" ("object" expected)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 6 21:26:15 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=14547


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at webkit.org




--- Comment #23 from Eric Seidel <eric at webkit.org>  2009-08-06 21:26:12 PDT ---
It seems this should be a "relatively simple" fix.

We can use TypeInfo like we do for Strings which masquerade as undefined.

JSValue jsTypeStringForValue(CallFrame* callFrame, JSValue v)
is the function where this check is made:

    if (v.isObject()) {
        // Return "undefined" for objects that should be treated
        // as null when doing comparisons.
        if (asObject(v)->structure()->typeInfo().masqueradesAsUndefined())
            return jsNontrivialString(callFrame, "undefined");
        CallData callData;
        if (asObject(v)->getCallData(callData) != CallTypeNone)
            return jsNontrivialString(callFrame, "function");
    }
    return jsNontrivialString(callFrame, "object");

we just add a callableObject() accessor to typeInfo or some such.  And we add a
special property to the IDL files.  The idls already have a CustomCall for
these cases.  We can change it to be UndetectableCustomCall or something.

Sam, Oliver?  Sound like a good plan to you?

-- 
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