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

Issue 2774543003: Fix PerformanceNavigationTiming accessor behavior after document detach. (Closed)

Created:
3 years, 9 months ago by sunjian
Modified:
3 years, 8 months ago
Reviewers:
Nate Chapin, panicker
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix PerformanceNavigationTiming accessor behavior after document detach. Currently, PerformanceNavigationTiming holds on to a LocalFrame directly. A DocumentLoader will be extracted at runtime from this LocalFrame. During the lifetime of a LocalFrame, multiple documents can get loaded and get attached to the same frame, which causes old PNT instance to reference DocumentLoader that could be created for new cross-origin document. Therefore, instead of holding on to a LocalFrame, PNT should hold on to a Document instead. The change in this patch also fixes the crash reported by clusterfuzz, which is dereferencing a null pointer when PerformanceNavigationTiming::type gets called after a Document gets replaced which causes its associated DocumentLoader to be null. BUG=704352, 703540 Review-Url: https://codereview.chromium.org/2774543003 Cr-Commit-Position: refs/heads/master@{#460198} Committed: https://chromium.googlesource.com/chromium/src/+/47b93d128610246960c032a00b67ec2083b2a05b

Patch Set 1 : first patch #

Patch Set 2 : add layout test #

Total comments: 6

Patch Set 3 : addressed comments #

Total comments: 2

Patch Set 4 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -11 lines) Patch
A third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html View 1 2 1 chunk +58 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html View 1 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h View 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.cpp View 1 5 chunks +13 lines, -8 lines 0 comments Download

Messages

Total messages: 34 (23 generated)
sunjian
Please take a look!
3 years, 9 months ago (2017-03-27 21:25:54 UTC) #17
Nate Chapin
Behavior changes is fine, just a few test nitpicks. https://codereview.chromium.org/2774543003/diff/70001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html File third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html (right): https://codereview.chromium.org/2774543003/diff/70001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html#newcode18 third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html:18: ...
3 years, 9 months ago (2017-03-27 21:44:35 UTC) #18
sunjian
Comments addressed. https://codereview.chromium.org/2774543003/diff/70001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html File third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html (right): https://codereview.chromium.org/2774543003/diff/70001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html#newcode18 third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_document_replaced.html:18: pnt1 = navigation_frame.performance.getEntriesByType("navigation")[0]; On 2017/03/27 21:44:35, Nate ...
3 years, 9 months ago (2017-03-27 23:07:05 UTC) #19
Nate Chapin
lgtm https://codereview.chromium.org/2774543003/diff/90001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html File third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html (right): https://codereview.chromium.org/2774543003/diff/90001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html#newcode15 third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html:15: assert_equals(pnt.type, "navigate"); By the way, is this behavior ...
3 years, 9 months ago (2017-03-27 23:52:20 UTC) #20
sunjian
On 2017/03/27 23:52:20, Nate Chapin wrote: > lgtm > > https://codereview.chromium.org/2774543003/diff/90001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html > File > third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html ...
3 years, 9 months ago (2017-03-28 00:01:47 UTC) #21
panicker
LGTM https://codereview.chromium.org/2774543003/diff/90001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html File third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html (right): https://codereview.chromium.org/2774543003/diff/90001/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html#newcode15 third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html:15: assert_equals(pnt.type, "navigate"); On 2017/03/27 23:52:20, Nate Chapin wrote: ...
3 years, 8 months ago (2017-03-28 00:21:27 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2774543003/90001
3 years, 8 months ago (2017-03-28 18:00:09 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/195929)
3 years, 8 months ago (2017-03-28 18:12:20 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2774543003/110001
3 years, 8 months ago (2017-03-28 18:24:58 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:110001) as https://chromium.googlesource.com/chromium/src/+/47b93d128610246960c032a00b67ec2083b2a05b
3 years, 8 months ago (2017-03-28 20:14:15 UTC) #33
jeffcarp
3 years, 8 months ago (2017-04-03 18:04:45 UTC) #34
Message was sent while issue was closed.
On 2017/03/28 at 20:14:15, commit-bot wrote:
> Committed patchset #4 (id:110001) as
https://chromium.googlesource.com/chromium/src/+/47b93d128610246960c032a00b67...

A GitHub PR was created for this CL:
https://github.com/w3c/web-platform-tests/pull/5254

However, due to WPT Travis CI problems it hasn't been exported yet.

Powered by Google App Engine
This is Rietveld 408576698