Last Comment Bug 706506 - The debugger refreshes the editor contents on every pause
: The debugger refreshes the editor contents on every pause
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: Firefox 13
Assigned To: Panos Astithas [:past]
:
Mentors:
Depends on: 700639
Blocks: minotaur 687093
  Show dependency treegraph
 
Reported: 2011-11-30 08:38 PST by Panos Astithas [:past]
Modified: 2012-02-13 06:53 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Working patch (1.39 KB, patch)
2012-01-30 07:35 PST, Panos Astithas [:past]
dcamp: review+
Details | Diff | Review

Description Panos Astithas [:past] 2011-11-30 08:38:52 PST
After bug 700639, each time the debugger gets to a paused state the editor contents are refreshed, even though no change has occurred. The reason is that the XUL menulist we are now using needs to generate a change event every time a new script is loaded, which triggers the editor refresh. In the HTML select element case we could add options without triggering it, but I don't think that's possible now.

But even if it were, the problem stems from the fact that when entering a paused state the debugger client sends a "scripts" protocol request to the server to retrieve any scripts the server is aware of. This is currently redundant, since the client also handles "newScript" notifications from the server each time a new script appears. The better fix would arguably be to remove the "scripts" request, as well as the "scriptsadded" and "scriptscleared" handlers from the debugger client.
Comment 1 Panos Astithas [:past] 2012-01-17 05:43:20 PST
The one time when a "scripts" request would be required is when opening the debugger UI. The debugger server may have already received a list of scripts in the page before the debugger UI was ready to handle such notifications, so it would be necessary to query once.
Comment 2 Panos Astithas [:past] 2012-01-30 07:35:16 PST
Created attachment 592710 [details] [diff] [review]
Working patch

Simple fix. I didn't include a test, because it looks complicated to write a proper one and it doesn't seem to make much sense for a one-liner, to be honest.
Comment 3 Rob Campbell [:rc] (:robcee) 2012-02-10 07:25:24 PST
https://hg.mozilla.org/integration/fx-team/rev/ac4190a91b2f
Comment 4 Tim Taubert [:ttaubert] 2012-02-13 06:53:35 PST
https://hg.mozilla.org/mozilla-central/rev/ac4190a91b2f

Note You need to log in before you can comment on or make changes to this bug.