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

Issue 303133004: Speculative fix for null m_documentLoader deref in FrameLoader::loadInSameDocument (Closed)

Created:
6 years, 6 months ago by Nate Chapin
Modified:
6 years, 6 months ago
Reviewers:
dcheng
CC:
blink-reviews, gavinp+loader_chromium.org
Visibility:
Public.

Description

Speculative fix for null m_documentLoader deref in FrameLoader::loadInSameDocument This should fix an uncommon crash during history traversal. I believe the steps to get into this state are: 1. Load a page with a slow-loading iframe. The iframe load must begin before the main frame's load event fires. 2. While the iframe is still in the provisional load state, attempt a same-document history navigation in the child frame. 3. The child frame's provisional load is cancelled by the history navigation in FrameLoader::loadInSameDocument, which in turn causes the parent frame's load event to fire synchronously. 4. The parent frame's onload event handler detaches the iframe. 5. No checks are performed after cancelling the provisional load in FrameLoader::loadInSameDocument, leading to a null deref and crash. We should be able to prevent a crash in this case by checking whether the frame is still attached after cancelling the provisional load in FrameLoader::loadInSameDocument. BUG=374391 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175174

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M Source/core/loader/FrameLoader.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Nate Chapin
No test, since I have no idea how to repro :(
6 years, 6 months ago (2014-05-29 22:37:15 UTC) #1
dcheng
https://codereview.chromium.org/303133004/diff/1/Source/core/loader/FrameLoader.cpp File Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/303133004/diff/1/Source/core/loader/FrameLoader.cpp#newcode1398 Source/core/loader/FrameLoader.cpp:1398: // See detachClient(). I don't quite understand this comment. ...
6 years, 6 months ago (2014-05-29 22:43:43 UTC) #2
Nate Chapin
On 2014/05/29 22:43:43, dcheng wrote: > https://codereview.chromium.org/303133004/diff/1/Source/core/loader/FrameLoader.cpp > File Source/core/loader/FrameLoader.cpp (right): > > https://codereview.chromium.org/303133004/diff/1/Source/core/loader/FrameLoader.cpp#newcode1398 > ...
6 years, 6 months ago (2014-05-29 22:57:00 UTC) #3
Nate Chapin
On 2014/05/29 22:57:00, Nate Chapin wrote: > On 2014/05/29 22:43:43, dcheng wrote: > > > ...
6 years, 6 months ago (2014-05-29 23:37:58 UTC) #4
dcheng
On 2014/05/29 23:37:58, Nate Chapin wrote: > On 2014/05/29 22:57:00, Nate Chapin wrote: > > ...
6 years, 6 months ago (2014-05-30 20:54:30 UTC) #5
Nate Chapin
On 2014/05/30 20:54:30, dcheng wrote: > On 2014/05/29 23:37:58, Nate Chapin wrote: > > On ...
6 years, 6 months ago (2014-05-30 20:59:59 UTC) #6
dcheng
I'd love a test, but if we can't figure out a good way, that's OK. ...
6 years, 6 months ago (2014-05-30 21:19:49 UTC) #7
Nate Chapin
On 2014/05/30 21:19:49, dcheng wrote: > I'd love a test, but if we can't figure ...
6 years, 6 months ago (2014-05-30 21:46:09 UTC) #8
dcheng
LGTM. It's pretty non-intuitive that DocumentLoader::stopLoading may end up trigger a load event to fire ...
6 years, 6 months ago (2014-05-30 21:52:26 UTC) #9
dcheng
On 2014/05/30 21:52:26, dcheng wrote: > LGTM. > > It's pretty non-intuitive that DocumentLoader::stopLoading may ...
6 years, 6 months ago (2014-05-30 21:52:48 UTC) #10
Nate Chapin
On 2014/05/30 21:52:48, dcheng wrote: > On 2014/05/30 21:52:26, dcheng wrote: > > LGTM. > ...
6 years, 6 months ago (2014-05-30 21:55:51 UTC) #11
Nate Chapin
The CQ bit was checked by japhet@chromium.org
6 years, 6 months ago (2014-05-30 21:56:52 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/japhet@chromium.org/303133004/40001
6 years, 6 months ago (2014-05-30 21:59:35 UTC) #13
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 23:53:15 UTC) #14
Message was sent while issue was closed.
Change committed as 175174

Powered by Google App Engine
This is Rietveld 408576698