Skip to content

Commit 08a141e

Browse files
author
Daniel Herzog
committed
Fixed pausing; Added is_paused message to update message so the API client can decide what to do.
1 parent 13c1fce commit 08a141e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/network/network_service.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ cls.RequestContextPrototype = function()
580580
window_context.entry_ids.push(id);
581581
}
582582
logger_entry.update(eventname, event);
583-
this.post_on_context_or_logger("resource-update", {id: logger_entry.id});
583+
this.post_on_context_or_logger("resource-update", {id: logger_entry.id, is_paused: this.is_paused});
584584
};
585585

586586
this.post_on_context_or_logger = function(name, body)
@@ -1149,7 +1149,8 @@ cls.NetworkLoggerEntryPrototype = function()
11491149
{
11501150
this.get_body_unsuccessful = this._current_response.logger_entry_get_body_unsuccessful = true;
11511151
}
1152-
this.post_on_context_or_logger("resource-update", {id: this.id});
1152+
// todo: The entry doesn't know the context here. Maybe handle this entirely on the context?
1153+
// ctx.post_on_context_or_logger("resource-update", {id: this.id, is_paused: this.is_paused});
11531154
};
11541155

11551156
this.__defineGetter__("duration", function()

src/network/network_view.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
478478
var is_paused = ctx.is_paused;
479479
var pause = settings.network_logger.get(message.key);
480480
if (is_paused && !pause)
481-
this.network_logger.unpause();
481+
ctx.unpause();
482482
else if (!is_paused && pause)
483-
this.network_logger.pause();
483+
ctx.pause();
484484
}
485485
}
486486
else if (message.key === "network-profiler-mode")
@@ -609,6 +609,9 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
609609

610610
this._on_resource_update_bound = function(message)
611611
{
612+
if (message.is_paused)
613+
return;
614+
612615
if (message.id)
613616
{
614617
this._last_updated_entry = message.id;

0 commit comments

Comments
 (0)