[Webkit-unassigned] [Bug 40980] Web Inspector: null is not properly handled when evaluated in console (V8 only)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 23 03:02:45 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40980
--- Comment #6 from Andrey Kosyakov <caseq at chromium.org> 2010-06-23 03:02:45 PST ---
(In reply to comment #3)
> (From update of attachment 59384 [details])
> WebCore/inspector/front-end/InjectedScript.js:604
> + objectText = type;
> So you always return "function" for functions that have poor toString. Old code was smarter (before it got regressed). It was doing Object.prototype.toString(obj) on objects like this (which was evolved into "[object Function]" or similar). Then, className was extracting the "Function" part. I think we should fix the regression in the InjectedScript._toString first (see Safari 4 code for that). Note that there were some reservations wrt Object lifetime that were making Object.prototype.toString call problematic.
>
> Maybe we should simplify the code as you suggested, but I don't think returning "function" for all objects like this is a good idea.
As agreed offline -- there's not much sense in displaying "Function" rather than "function" for some functions; We choose to use function's toString() whatever it is.
> WebCore/inspector/front-end/InjectedScript.js:
> + if (typeof obj !== "object")
> I think this will break chromium interactive tests. Take a look at r58956. I know that typeof null is in fact "object", so the fix in r58956 itself was arguable. Probably this needs a more strict check such as (obj === null || typeof obj !== "object")
I don't think so -- the problem was because we were calling _className always, without regard to what _type() returns. Now we only call it for objects, and only if these are not nulls (null is treated as special type "null" by _type()).
--
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