Bug 18888 - REGRESSION (r32731): console.log always prints "undefined"
Summary: REGRESSION (r32731): console.log always prints "undefined"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Adam Roben (:aroben)
URL: data:text/html,<button onclick="javas...
Keywords: HasReduction, Regression
Depends on:
Blocks:
 
Reported: 2008-05-04 13:44 PDT by Matt Lilek
Modified: 2008-05-14 14:16 PDT (History)
2 users (show)

See Also:


Attachments
patch v1 with ChangeLog (2.37 KB, patch)
2008-05-14 14:05 PDT, Adam Roben (:aroben)
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lilek 2008-05-04 13:44:52 PDT
Load the URL on this bug and open the Inspector's console and click the button in the testcase.  The inspector incorrectly shows it as "undefined" while the alert() shows it properly as "[object HTMLBodyElement]".

I'm not sure whether this is a bug in the inspector or JSCore or elsewhere, but it is a regression from Safari 3.1.1.
Comment 1 Matt Lilek 2008-05-14 11:24:26 PDT
This is actually a bug in the inspector
Comment 2 Timothy Hatcher 2008-05-14 13:10:44 PDT
This affects logging any object. Try console.log({}) and it gives undefined.
Comment 3 Adam Roben (:aroben) 2008-05-14 14:05:55 PDT
Created attachment 21136 [details]
patch v1 with ChangeLog
Comment 4 Adam Roben (:aroben) 2008-05-14 14:16:15 PDT
Committed in r33454