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

Issue 915173012: telemetry: Add a method to access tabs by key in TabList. (Closed)

Created:
5 years, 10 months ago by erikchen
Modified:
5 years, 10 months ago
Reviewers:
nednguyen
CC:
chromium-reviews, telemetry-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

telemetry: Add a method to access tabs by key in TabList. Previously, the only public method to access tabs from TabList was by index into an array. The problem with this method is that the array is dynamic, so there's always the possibility of a race condition causing the index dereference to explode. The plan is to migrate the interface entirely over to accessing tabs by key. For now, add a public method that allows access to tabs by key. Also, make tabs return the same key as their id property. BUG=398467, 442546 Committed: https://crrev.com/85a6b66385c44f257355a9829cb12805dd81e909 Cr-Commit-Position: refs/heads/master@{#316530}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comments from nednguyen. #

Total comments: 5

Patch Set 3 : Add comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend.py View 1 1 chunk +1 line, -3 lines 0 comments Download
M tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/tab_list.py View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
erikchen
nednguyen: Please review. This seemed like the right approach given your previous comments on the ...
5 years, 10 months ago (2015-02-13 04:12:56 UTC) #2
nednguyen
web_content.WebContent API has an id field, you can modify the implementation so that id return ...
5 years, 10 months ago (2015-02-13 16:46:06 UTC) #3
erikchen
nednguyen: PTAL https://codereview.chromium.org/915173012/diff/1/tools/telemetry/telemetry/core/tab_list.py File tools/telemetry/telemetry/core/tab_list.py (right): https://codereview.chromium.org/915173012/diff/1/tools/telemetry/telemetry/core/tab_list.py#newcode20 tools/telemetry/telemetry/core/tab_list.py:20: def GetTabFromContextId(self, context_id): On 2015/02/13 16:46:06, nednguyen ...
5 years, 10 months ago (2015-02-13 23:17:15 UTC) #6
nednguyen
lgtm with nits https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py File tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py (right): https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py#newcode70 tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py:70: def GetTabById(self, identifier): ditto https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py File ...
5 years, 10 months ago (2015-02-13 23:27:21 UTC) #7
nednguyen
https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py File tools/telemetry/telemetry/core/tab_list.py (right): https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py#newcode20 tools/telemetry/telemetry/core/tab_list.py:20: def GetTabById(self, identifier): On 2015/02/13 23:27:21, nednguyen wrote: > ...
5 years, 10 months ago (2015-02-13 23:30:28 UTC) #8
erikchen
nednguyen: PTAL https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py File tools/telemetry/telemetry/core/tab_list.py (right): https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py#newcode20 tools/telemetry/telemetry/core/tab_list.py:20: def GetTabById(self, identifier): On 2015/02/13 23:27:21, nednguyen ...
5 years, 10 months ago (2015-02-13 23:37:32 UTC) #10
nednguyen
On 2015/02/13 23:37:32, erikchen wrote: > nednguyen: PTAL > > https://codereview.chromium.org/915173012/diff/60001/tools/telemetry/telemetry/core/tab_list.py > File tools/telemetry/telemetry/core/tab_list.py (right): ...
5 years, 10 months ago (2015-02-13 23:41:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/915173012/80001
5 years, 10 months ago (2015-02-13 23:56:15 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/25201)
5 years, 10 months ago (2015-02-14 00:58:30 UTC) #17
nednguyen
Err, I forgot. Can you add unittest for the new method? You can either do ...
5 years, 10 months ago (2015-02-14 01:35:43 UTC) #18
erikchen
On 2015/02/14 01:35:43, nednguyen wrote: > Err, I forgot. Can you add unittest for the ...
5 years, 10 months ago (2015-02-17 04:44:28 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/915173012/80001
5 years, 10 months ago (2015-02-17 04:44:44 UTC) #21
nednguyen
On 2015/02/17 04:44:28, erikchen wrote: > On 2015/02/14 01:35:43, nednguyen wrote: > > Err, I ...
5 years, 10 months ago (2015-02-17 04:47:00 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:80001)
5 years, 10 months ago (2015-02-17 05:09:20 UTC) #23
commit-bot: I haz the power
5 years, 10 months ago (2015-02-17 05:10:09 UTC) #24
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/85a6b66385c44f257355a9829cb12805dd81e909
Cr-Commit-Position: refs/heads/master@{#316530}

Powered by Google App Engine
This is Rietveld 408576698