Fix the bug that crashed apps are missing from Apps Developer Tool

Crashed apps are not listed in Apps Developer Tool because of a
mismatch of argument order when calling setTerminatedReloadLink_.
Also fix setTerminatedReloadLink_ to add event listener instead of
calling chrome.developerPrivate.reload.

BUG=251912

Review URL: https://chromiumcodereview.appspot.com/17095008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208017 0039d316-1c4b-4281-b951-d872f2087c98
parent 1c6c0ccc
......@@ -239,7 +239,7 @@ cr.define('apps_dev_tool', function() {
if (!item.terminated)
this.setEnabledCheckbox_(item, node);
else
this.setTerminatedReloadLink_(node, item);
this.setTerminatedReloadLink_(item, node);
// Set remove button handler.
this.setRemoveButton_(item, node);
......@@ -312,10 +312,12 @@ cr.define('apps_dev_tool', function() {
*/
setTerminatedReloadLink_: function(item, el) {
var terminatedReload = el.querySelector('.terminated-reload-link');
terminatedReload.hidden = false;
chrome.developerPrivate.reload(item.id, function() {
ItemsList.loadItemsInfo();
terminatedReload.addEventListener('click', function(e) {
chrome.developerPrivate.reload(item.id, function() {
ItemsList.loadItemsInfo();
});
});
terminatedReload.hidden = false;
},
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment