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

Issue 1375613004: TextAutosizer should handle cross-process navigation and RemoteFrame. (Closed)

Created:
5 years, 2 months ago by nasko
Modified:
5 years, 2 months ago
Reviewers:
skobes
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TextAutosizer should handle cross-process navigation and RemoteFrame. In https://codereview.chromium.org/1374783005/ the fix tested for whether the frame has a FrameView or not. The problem turns out to be a bit different - the check for RemoteFrame and the mainFrame do not point to the same object, which leaves the code still open to problems. This CL is ensuring that both the check for RemoteFrame and the usage of the main LocalFrame point to the same object. BUG=357747 Committed: https://crrev.com/885b6b65af2d7504cdda6091516d24704d2400b3 Cr-Commit-Position: refs/heads/master@{#352249}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -4 lines) Patch
M third_party/WebKit/Source/core/layout/TextAutosizer.cpp View 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
nasko
Hi Steve, Can you review this CL for me? My previous one wasn't the best ...
5 years, 2 months ago (2015-10-02 20:48:59 UTC) #2
skobes
lgtm Code change looks fine but I don't understand the description. Are you saying Page::m_mainFrame ...
5 years, 2 months ago (2015-10-03 01:32:17 UTC) #3
nasko
On 2015/10/03 01:32:17, skobes wrote: > lgtm > > Code change looks fine but I ...
5 years, 2 months ago (2015-10-03 06:52:33 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1375613004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1375613004/1
5 years, 2 months ago (2015-10-03 06:52:51 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-03 06:57:38 UTC) #7
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/885b6b65af2d7504cdda6091516d24704d2400b3 Cr-Commit-Position: refs/heads/master@{#352249}
5 years, 2 months ago (2015-10-03 06:58:29 UTC) #8
skobes
5 years, 2 months ago (2015-10-05 01:25:47 UTC) #9
Message was sent while issue was closed.
On 2015/10/03 06:52:33, nasko (slow to review) wrote:
> On 2015/10/03 01:32:17, skobes wrote:
> > lgtm
> > 
> > Code change looks fine but I don't understand the description.  Are you
saying
> > Page::m_mainFrame may not be at the top of the FrameTree?
> 
> Page::m_mainFrame does point to the top of the FrameTree, but it has a
> RemoteFrame and is the only frame in the case of a page without iframes. When
> transitioning from a RemoteFrame to LocalFrame, we create the LocalFrame, but
> don't make it part of Page until it commits. It is at that time that
> Page::m_mainFrame will start pointing to the LocalFrame.
> 
> So my original fix was checking the document->page()->mainFrame(), which is
> RemoteFrame and when we need to get a LocalFrame out of it, it crashes.
Instead,
> we should use the same frame we've checked for being remote or not few lines
> above.
> 
> All of this will be much simpler if the TextAutosizer wasn't trying to compute
> anything until we actually have a real document in place. The crashing stack
is
> as follows:
> 
> 013f2048  blink::toLocalFrame(blink::Frame*)+44
> 01b9b451  blink::TextAutosizer::updatePageInfo()+226
> 016e0f9d  blink::Document::attach(blink::Node::AttachContext const&)+184
> 019f8af5  blink::LocalDOMWindow::installNewDocument(WTF::String const&,
> blink::DocumentInit const&, bool)+172
> 01a76e33  blink::DocumentLoader::createWriterFor(blink::Document const*,
> blink::DocumentInit const&, WTF::AtomicString const&, WTF::AtomicString
const&,
> bool, blink::ParserSynchronizationPolicy)+190
> 01a77093  blink::DocumentLoader::ensureWriter(WTF::AtomicString const&,
> blink::KURL const&)+202
> 01a7766b  blink::DocumentLoader::commitData(char const*, unsigned int)+82
> 01a77adb  blink::DocumentLoader::finishedLoading(double)+158
> 01a7889b  blink::DocumentLoader::maybeLoadEmpty()+762
> 01a7899f  blink::DocumentLoader::startLoadingMainResource()+222
> 01a810ff  blink::FrameLoader::init()+152
> 0142902d 
>
blink::WebLocalFrameImpl::initializeToReplaceRemoteFrame(blink::WebRemoteFrame*,
> blink::WebString const&, blink::WebSandboxFlags)+208
> 
> Since this is the initial empty document, we haven't inserted the frame into
the
> frame tree quite yet, but we will in a short period of time, as we wait for
the
> real document commit.
> 
> I hope this helps explain it better.

Yes that helps, thanks!

Powered by Google App Engine
This is Rietveld 408576698