Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362452 - The JS code has syntax errors in external browser after closing the VE
Summary: The JS code has syntax errors in external browser after closing the VE
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Tony Chen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-31 04:10 EDT by fahua jin CLA
Modified: 2017-02-23 14:16 EST (History)
4 users (show)

See Also:


Attachments
The sample project. (109.35 KB, multipart/x-zip)
2011-10-31 04:10 EDT, fahua jin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-10-31 04:10:10 EDT
Build Identifier: 0.7.0.v201110302101

1) Open the MortgageCalculatorHandler.egl with VE.
2) Click the 'Preview' tab, and click the 'Show in external browser' button.
3) After displaying the handler in the external browser, switch back to the EDT.
4) Close the VE, and switch back to the browser. You'll find the browser keeps sending out the request, and displays following error message.

Do we need to continuously send the request to the server even after the address is not avail?

[CRRUI2092E] 内部错误:处理 IDE 事件 context terminated 时发生问题

      eval("context terminated")
      :0 ("context terminated")
      DojoBase.js?contextKey=42:63 runHandler()
      egl_development.js:185 ([object Event])
      egl_development.js:195 


missing ; before statement

Reproducible: Always
Comment 1 fahua jin CLA 2011-10-31 04:10:42 EDT
Created attachment 206193 [details]
The sample project.
Comment 2 fahua jin CLA 2011-10-31 04:11:17 EDT
Tony said he would take a look at the defect.
Comment 3 Tony Chen CLA 2011-10-31 04:29:55 EDT
Dojobase.js overrides egl.handleIDEEvent() method in egl_development.js, so some fixes in egl.handleIDEEvent() did not work when there's dojo widgets in the page. 

After reviewing the overrided method in Dojobase.js, the only change is to increase the IDEEvent delay from 10ms to 1000ms. 
   
egl_development.js:  window.setTimeout("if (window.egl) egl.handleIDEEvent()", 10);
dojobase.js:         window.setTimeout("if (window.egl) egl.handleIDEEvent()", 1000);


I discussed with Yunfeng & Jiyong and nobody thinks this is necessary. I'll just delete the override function. We will have some regression testing soon, if there's a problem, it should be revealed in the regression.
Comment 4 Brian Svihovec CLA 2011-11-01 10:47:52 EDT
Looking over CVS history (KAN-SAV), I found that this code was originally added for RTC Defect 21846.  I cannot say if this change was directly related to the fix, or if it was committed at the same time under this defect.  The fix went into version 0.7.1 of the dojo widgets project.  

We should review the content of 21846 to verify why this change may have been added.
Comment 5 fahua jin CLA 2011-11-04 01:25:57 EDT
I reopen the defect for the comment 4, and please resolve the defect after investigation. Thanks.
Comment 6 Tony Chen CLA 2011-11-04 05:36:29 EDT
After reviewing workitem 21846 and the cvs history of dojobase.js & egl_development.js. It turned out that both of them have 1000ms interval in year 2009, and in Jun 2010, egl_development.js changed the interval to 10ms for performance enhancement workitem 48064. 

So there's actually nothing special Dojobase.js is doing, it copied the same code from egl_development.js. But the later changes in egl_development.js does not get into Dojobase.js. 

I think its safe to remove that piece of code in Dojobase.js. 

Will close this bug. If anybody has a concern, please reopen.
Comment 7 fahua jin CLA 2011-11-07 02:31:01 EST
Close the defect.