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

Issue 2149913003: Make previousLinePosition() not to use dangling RootInlineBox (Closed)

Created:
4 years, 5 months ago by yosin_UTC9
Modified:
4 years, 5 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

Make previousLinePosition() not to use dangling RootInlineBox This patch makes |previousLinePosition()| not to use dangling |RootInlineBox| pointer to avoid use-after-free. Before this patch, |isEditablePosition()| is called with |DoUpdateStyle| parameter to update layout tree if needed. Usually, layout tree isn't updated by this |isEditablePosition()| call since |previousLinePosition()| updates layout tree at entry. However, if there are pending style sheet, e.g. @import directive, and HTML import, e.g link rel=import, layout tree is updated since document isn't rendering ready, |haveImportLoaded()| && |haveRenderBlockingStyleSheetsLoaded()|. BUG=618237 TEST=LayoutTests/editing/selection/modify_move/move_backward_line_import_crash.html Committed: https://crrev.com/fb81c66590538c2487a34b8623066a22d0b27dff Review-Url: https://codereview.chromium.org/2082893005 Cr-Original-Commit-Position: refs/heads/master@{#401231} Cr-Commit-Position: refs/heads/master@{#401581} (cherry picked from commit e9c943f368d15bbfe414aedf5e001792257f3eeb) Committed: https://chromium.googlesource.com/chromium/src/+/16d4aaf9a5794ff0e10c57bf7b7bbfadee3ba26a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/editing/selection/modify_move/move_backward_line_import_crash.html View 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
yosin_UTC9
4 years, 5 months ago (2016-07-15 01:35:58 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
16d4aaf9a5794ff0e10c57bf7b7bbfadee3ba26a.

Powered by Google App Engine
This is Rietveld 408576698