Stop accumulating event handlers for the serviceworker-internals buttons.
commit1bad893173b5a95b03e1b498694b4eea85480caa
authorjkarlin@chromium.org <jkarlin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 19 Mar 2014 22:00:49 +0000 (19 22:00 +0000)
committerjkarlin@chromium.org <jkarlin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 19 Mar 2014 22:00:49 +0000 (19 22:00 +0000)
treecbf173df27419210eb76d1bd24343ea3153d8447
parent052b53d7871af81837dcdfada6835e1bf3850d15
Stop accumulating event handlers for the serviceworker-internals buttons.

Each time you hit "start" or "stop" etc. in chrome://serviceworker-internals
the registration process is rerun, adding an addEventListener to each button
for each existing callback, causing a quadratic increase in event listeners.

This CL only allows the event to be registered once per button.

BUG=

Review URL: https://codereview.chromium.org/204573003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258118 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/resources/service_worker/serviceworker_internals.js