REGRESSION(r217515): Correct iterator invalidation bug (AGAIN)
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 May 2017 16:57:20 +0000 (16:57 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 May 2017 16:57:20 +0000 (16:57 +0000)
commita28603aaaea2974f89fa0260d9ac297c10c7f1a8
tree40bf26865c623c7022981f72ea7c8c6d811cdb5f
parent2dbab5785bab46b74bedd5d093e7518220394c21
REGRESSION(r217515): Correct iterator invalidation bug (AGAIN)
https://bugs.webkit.org/show_bug.cgi?id=172722
<rdar://problem/32462876>

Reviewed by Zalan Bujtas.

Over-enthusiastic clean-up during r217515 re-introduced a bug caused by holding a reference
to an iterator that gets invalidated while handling the frame navigation. This patch returns
to the copy/set behavior used prior to r217515.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFrameNavigation): Make a copy of the returned value, since
the iterator will be invalidated during the function call. Then set the copy back in the data
store with the updated counts.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoadObserver.cpp