Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358480

Summary: Logging statements crash IE and Firefox
Product: [RT] RAP Reporter: Austin Riddle <austin.riddle>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Austin Riddle CLA 2011-09-21 15:26:25 EDT
While upgrading the JIT visualizations in the incubator, I discovered that they crash in IE and Firefox.
This is because of the this.info() calls made throughout the custom widget code. The browser complains of a bad reference to console.
The statements work in Chrome.

Tim, what are custom widgets supposed to do about logging now?
Comment 1 Ralf Sternberg CLA 2011-09-22 04:26:36 EDT
Fixed in Object.js#debug(). We mistakenly checked for a global variable with if( console ) instead of if( window.console ).
Changes are in HEAD.
Comment 2 Ralf Sternberg CLA 2011-09-22 04:32:12 EDT
(In reply to comment #0)
> Tim, what are custom widgets supposed to do about logging now?

We removed the client logging entirely and only left a very small implementation of the info(), warning(), etc. methods in place. The RAP client doesn't use any of them anymore. We consider logging on the client useless. For debugging purposes, you can use the console API, that is now supported by almost any browser's dev tools. For production, a widget should IMHO either work or fail fast.