Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 297066 - Refactor newWidget in WidgetManager.js
Summary: Refactor newWidget in WidgetManager.js
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-07 09:14 EST by Tim Buschtoens CLA
Modified: 2010-02-17 11:04 EST (History)
1 user (show)

See Also:


Attachments
fix (12.43 KB, patch)
2010-02-17 07:33 EST, Tim Buschtoens CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2009-12-07 09:14:17 EST
Apperently if the eval-call in this function tries to access "wm", it works only because it is avaible in the global namespace, not because of the line "var wm = this;". This is at least true for webkit-browser.
Comment 1 Tim Buschtoens CLA 2010-02-17 07:33:20 EST
Created attachment 159296 [details]
fix

This removes the "newWidget" function from the client, instead writing the needed code on the server side. This solves this bug, is less confusing (regarding the "Shell"-workarounds) and also removes another "eval"-call. ("eval" in JS is potentially slow and difficult to debug/profile.)
Comment 2 Rüdiger Herrmann CLA 2010-02-17 11:03:57 EST
Applied patch to CVS HEAD