Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: content/browser/resources/service_worker/serviceworker_internals.js

Issue 653283004: ServiceWorker: Reset message in serviceworker-internals with update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resources/service_worker/serviceworker_internals.js
diff --git a/content/browser/resources/service_worker/serviceworker_internals.js b/content/browser/resources/service_worker/serviceworker_internals.js
index 23e898304a05a97cb312f40ca4390c7bfec3a987..b3cf8b2ebd8e2cd4c143d14ba65caf01cb835415 100644
--- a/content/browser/resources/service_worker/serviceworker_internals.js
+++ b/content/browser/resources/service_worker/serviceworker_internals.js
@@ -76,7 +76,7 @@ cr.define('serviceworker', function() {
var allLogMessages = {};
// Set log for a worker version.
- function fillLogForVersion(partition_id, version) {
+ function fillLogForVersion(container, partition_id, version) {
if (!version) {
return;
}
@@ -89,6 +89,14 @@ cr.define('serviceworker', function() {
} else {
version.log = '';
}
+ var logAreas = container.querySelectorAll('textarea.serviceworker-log');
+ for (var i = 0; i < logAreas.length; ++i) {
+ var logArea = logAreas[i];
+ if (logArea.partition_id == partition_id &&
+ logArea.version_id == version.version_id) {
horo 2014/10/16 03:39:35 +2 indent
shimazu 2014/10/16 07:42:54 Done.
+ logArea.value = version.log;
+ }
+ }
}
// Get the unregistered workers.
@@ -157,7 +165,7 @@ cr.define('serviceworker', function() {
template = jstGetTemplate('serviceworker-list-template');
container.appendChild(template);
}
- var fillLogFunc = fillLogForVersion.bind(this, partition_id);
+ var fillLogFunc = fillLogForVersion.bind(this, container, partition_id);
stored_registrations.forEach(function(registration) {
[registration.active, registration.waiting].forEach(fillLogFunc);
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698