Bug 18888

Summary: REGRESSION (r32731): console.log always prints "undefined"
Product: WebKit Reporter: Matt Lilek <dev+webkit>
Component: Web Inspector (Deprecated)Assignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, timothy
Priority: P1 Keywords: HasReduction, Regression
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
URL: data:text/html,<button onclick="javascript:console.log(document.body); alert(document.body);">Log document.body</button>
Attachments:
Description Flags
patch v1 with ChangeLog timothy: review+

Matt Lilek
Reported 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.
Attachments
patch v1 with ChangeLog (2.37 KB, patch)
2008-05-14 14:05 PDT, Adam Roben (:aroben)
timothy: review+
Matt Lilek
Comment 1 2008-05-14 11:24:26 PDT
This is actually a bug in the inspector
Timothy Hatcher
Comment 2 2008-05-14 13:10:44 PDT
This affects logging any object. Try console.log({}) and it gives undefined.
Adam Roben (:aroben)
Comment 3 2008-05-14 14:05:55 PDT
Created attachment 21136 [details] patch v1 with ChangeLog
Adam Roben (:aroben)
Comment 4 2008-05-14 14:16:15 PDT
Committed in r33454
Note You need to log in before you can comment on or make changes to this bug.