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

Issue 449753002: Improve error reporting when indexing tab. (Closed)

Created:
6 years, 4 months ago by nednguyen
Modified:
6 years, 4 months ago
CC:
chromium-reviews, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improve error reporting when indexing tab. If we created 3 new tabs, and 1 of them crashed, then there is no guaranteed that browser.tabs[1] return the correct tab object. The tabs list can no longer be trusted in this case. Hence if the number of inspectable contexts doesn't match the number of expected tabs (based on the number of tab_list_backend.New & tab_list_backend.Close calls), tab_list_backend's __getitem__ throws a TabCrashException. BUG=398467 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290974

Patch Set 1 #

Total comments: 3

Patch Set 2 : Update tab_list_backend to keep track of openning tabs number. #

Patch Set 3 : Tab test that crashes any tab must restart the browser. #

Total comments: 6

Patch Set 4 : Address Ken's comments #

Total comments: 2

Patch Set 5 : Address Tony's comments #

Patch Set 6 : Remove setting num expected backends upon first usage logic. #

Total comments: 1

Patch Set 7 : Add comments explain what to do with exceptions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -6 lines) Patch
M tools/telemetry/telemetry/core/backends/browser_backend.py View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome/inspector_backend_list.py View 1 1 chunk +4 lines, -5 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py View 1 2 3 4 5 6 3 chunks +34 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/browser.py View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/exceptions.py View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/tab_unittest.py View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/page/page_runner_unittest.py View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 39 (0 generated)
nednguyen
6 years, 4 months ago (2014-08-07 13:16:26 UTC) #1
tonyg
Thanks for cleaning this up. A couple of questions/suggestions to consider. https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/backends/chrome/inspector_backend_list.py File tools/telemetry/telemetry/core/backends/chrome/inspector_backend_list.py (right): ...
6 years, 4 months ago (2014-08-07 13:54:45 UTC) #2
nednguyen
https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/exceptions.py File tools/telemetry/telemetry/core/exceptions.py (right): https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/exceptions.py#newcode29 tools/telemetry/telemetry/core/exceptions.py:29: class TabIndexOutOfBoundError(TabCrashException): On 2014/08/07 13:54:45, tonyg wrote: > I ...
6 years, 4 months ago (2014-08-07 14:50:49 UTC) #3
tonyg
On 2014/08/07 14:50:49, nednguyen wrote: > https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/exceptions.py > File tools/telemetry/telemetry/core/exceptions.py (right): > > https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/exceptions.py#newcode29 > ...
6 years, 4 months ago (2014-08-07 15:12:31 UTC) #4
nednguyen
On 2014/08/07 15:12:31, tonyg wrote: > On 2014/08/07 14:50:49, nednguyen wrote: > > > https://codereview.chromium.org/449753002/diff/1/tools/telemetry/telemetry/core/exceptions.py ...
6 years, 4 months ago (2014-08-08 05:24:21 UTC) #5
Ken Russell (switch to Gerrit)
LGTM from my standpoint. Couple of comments. https://codereview.chromium.org/449753002/diff/120001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): https://codereview.chromium.org/449753002/diff/120001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py#newcode19 tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py:19: # This ...
6 years, 4 months ago (2014-08-08 18:34:12 UTC) #6
nednguyen
Tony, can you take a look again? Thanks. https://codereview.chromium.org/449753002/diff/120001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): https://codereview.chromium.org/449753002/diff/120001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py#newcode19 tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py:19: # ...
6 years, 4 months ago (2014-08-08 23:48:02 UTC) #7
tonyg
lgtm https://codereview.chromium.org/449753002/diff/160001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): https://codereview.chromium.org/449753002/diff/160001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py#newcode24 tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py:24: self._num_opening_tabs = None Would this be more readable ...
6 years, 4 months ago (2014-08-09 17:37:24 UTC) #8
nednguyen
https://codereview.chromium.org/449753002/diff/160001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): https://codereview.chromium.org/449753002/diff/160001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py#newcode24 tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py:24: self._num_opening_tabs = None On 2014/08/09 17:37:24, tonyg wrote: > ...
6 years, 4 months ago (2014-08-11 15:48:11 UTC) #9
nednguyen
The CQ bit was checked by nednguyen@google.com
6 years, 4 months ago (2014-08-11 15:48:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/449753002/180001
6 years, 4 months ago (2014-08-11 15:48:53 UTC) #11
nednguyen
The CQ bit was unchecked by nednguyen@google.com
6 years, 4 months ago (2014-08-11 16:13:10 UTC) #12
nednguyen
On 2014/08/11 16:13:10, nednguyen wrote: > The CQ bit was unchecked by mailto:nednguyen@google.com Sorry for ...
6 years, 4 months ago (2014-08-11 16:28:55 UTC) #13
tonyg
lgtm https://codereview.chromium.org/449753002/diff/200001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): https://codereview.chromium.org/449753002/diff/200001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py#newcode50 tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py:50: self._num_expected_tabs -= 1 Thinking about this some more. ...
6 years, 4 months ago (2014-08-11 16:37:22 UTC) #14
nednguyen
On 2014/08/11 16:37:22, tonyg wrote: > lgtm > > https://codereview.chromium.org/449753002/diff/200001/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py > File tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py (right): > ...
6 years, 4 months ago (2014-08-11 16:58:53 UTC) #15
nednguyen
The CQ bit was checked by nednguyen@google.com
6 years, 4 months ago (2014-08-11 16:59:18 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/449753002/220001
6 years, 4 months ago (2014-08-11 17:01:38 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-11 20:02:10 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-11 20:33:04 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/5043) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/1885)
6 years, 4 months ago (2014-08-11 20:33:05 UTC) #20
nednguyen
The CQ bit was checked by nednguyen@google.com
6 years, 4 months ago (2014-08-11 21:05:05 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/449753002/220001
6 years, 4 months ago (2014-08-11 21:06:04 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-11 21:53:09 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-11 22:22:23 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/1955)
6 years, 4 months ago (2014-08-11 22:22:24 UTC) #25
nednguyen
On 2014/08/11 22:22:24, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 4 months ago (2014-08-11 23:21:53 UTC) #26
nednguyen
+nduca
6 years, 4 months ago (2014-08-11 23:22:08 UTC) #27
nednguyen
+achuith
6 years, 4 months ago (2014-08-11 23:39:05 UTC) #28
tonyg
Do you remember which test failed? If it was the iframe one, it might be ...
6 years, 4 months ago (2014-08-20 18:30:23 UTC) #29
nednguyen
The CQ bit was checked by nednguyen@google.com
6 years, 4 months ago (2014-08-20 21:00:53 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/449753002/220001
6 years, 4 months ago (2014-08-20 21:02:07 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-20 22:19:03 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 23:31:26 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_swarming/builds/3931)
6 years, 4 months ago (2014-08-20 23:31:28 UTC) #34
nednguyen
The CQ bit was checked by nednguyen@google.com
6 years, 4 months ago (2014-08-21 01:04:57 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/449753002/220001
6 years, 4 months ago (2014-08-21 01:05:48 UTC) #36
commit-bot: I haz the power
Committed patchset #7 (220001) as 290974
6 years, 4 months ago (2014-08-21 02:36:16 UTC) #37
jennyz
A revert of this CL (patchset #7) has been created in https://codereview.chromium.org/474983006/ by jennyz@chromium.org. The ...
6 years, 4 months ago (2014-08-21 18:37:18 UTC) #38
nednguyen
6 years, 4 months ago (2014-08-22 16:28:54 UTC) #39
Message was sent while issue was closed.
A revert of this CL (patchset #7) has been created in
https://codereview.chromium.org/494753003/ by nednguyen@google.com.

The reason for reverting is: This patch broke chromeos bot in
https://code.google.com/p/chromium/issues/detail?id=406010

A reland of this must include fixes in:
https://codereview.chromium.org/484353003/
https://codereview.chromium.org/499453002/.

Powered by Google App Engine
This is Rietveld 408576698