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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py

Issue 1158923006: [Telemetry] Retry creating new tab when the filtered_context_ids is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
index 741928b1b5eac192f03d6b3312fe7fde14add1a5..3521866b54e1479784d778a6dcb003bab45aec91 100644
--- a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
+++ b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
@@ -3,8 +3,6 @@
# found in the LICENSE file.
import collections
-import logging
-
from telemetry.core import exceptions
@@ -57,11 +55,11 @@ class InspectorBackendList(collections.Sequence):
def __getitem__(self, index):
self._Update()
if index >= len(self._filtered_context_ids):
- logging.error('About to explode: _filtered_context_ids = %s',
- repr({
- "index": index,
- "context_ids": self._filtered_context_ids
- }))
+ raise exceptions.DevtoolsTargetCrashException(
+ self.app,
+ 'Web content with index %s may have crashed. '
+ 'filtered_context_ids = %s' % (
+ index, repr(self._filtered_context_ids)))
context_id = self._filtered_context_ids[index]
return self.GetBackendFromContextId(context_id)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698