Copy visible_pages_ when iterating over it.

On this case, a call inside the loop may cause visible_pages_ to
change.

Bug: 822091
Change-Id: I41b0715faa6fe3e39203cd9142cf5ea38e59aefb
Reviewed-on: https://chromium-review.googlesource.com/964592
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#543494}(cherry picked from commit 94b3728a2836da335a10085d4089c9d8e1c9d225)
Reviewed-on: https://chromium-review.googlesource.com/971121
Cr-Commit-Position: refs/branch-heads/3359@{#343}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
1 file changed