[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
Tue Jun 22 12:37:11 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40980
Pavel Feldman <pfeldman at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #59384|review?, commit-queue? |review-
Flag| |
--- Comment #3 from Pavel Feldman <pfeldman at chromium.org> 2010-06-22 12:37:11 PST ---
(From update of attachment 59384)
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.
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")
--
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