
Change DebugWindow to add the buffer to the window only once when setEnabled is called.

SetEnabled calls openWindow, which calls writeInitialDocument which populates the window with the
contents of the buffer.

SetEnabled also calls writeInitialDocument directly. Which re-adds the buffer.

This hasn't been a problem before because
- most users immediately call setEnabled after they create the window (so the buffer is empty)

R=gboyer,arv,pupius,nicksantos
DELTA=4  (0 added, 4 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=4263


git-svn-id: 35241bd708fe29f1f6c7a4322d322e99ff93b95e@1607 0b95b8e8-c90f-11de-9d4f-f947ee5921c8

KgDesignes/closure-library,thinkfuse/google-closure,KgDesignes/closure-library,knutwalker/google-closure-library,thinkfuse/google-closure,KgDesignes/closure-library,thinkfuse/google-closure,knutwalker/google-closure-library