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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 540
541 void RootInlineBox::setLineBreakInfo(LineLayoutItem obj, 541 void RootInlineBox::setLineBreakInfo(LineLayoutItem obj,
542 unsigned breakPos, 542 unsigned breakPos,
543 const BidiStatus& status) { 543 const BidiStatus& status) {
544 // When setting lineBreakObj, the LayoutObject must not be a LayoutInline 544 // When setting lineBreakObj, the LayoutObject must not be a LayoutInline
545 // with no line boxes, otherwise all sorts of invariants are broken later. 545 // with no line boxes, otherwise all sorts of invariants are broken later.
546 // This has security implications because if the LayoutObject does not point 546 // This has security implications because if the LayoutObject does not point
547 // to at least one line box, then that LayoutInline can be deleted later 547 // to at least one line box, then that LayoutInline can be deleted later
548 // without resetting the lineBreakObj, leading to use-after-free. 548 // without resetting the lineBreakObj, leading to use-after-free.
549 ASSERT_WITH_SECURITY_IMPLICATION(!obj || obj.isText() || 549 SECURITY_DCHECK(!obj || obj.isText() ||
550 !(obj.isLayoutInline() && obj.isBox() && 550 !(obj.isLayoutInline() && obj.isBox() &&
551 !LineLayoutBox(obj).inlineBoxWrapper())); 551 !LineLayoutBox(obj).inlineBoxWrapper()));
552 552
553 m_lineBreakObj = obj; 553 m_lineBreakObj = obj;
554 m_lineBreakPos = breakPos; 554 m_lineBreakPos = breakPos;
555 m_lineBreakBidiStatusEor = status.eor; 555 m_lineBreakBidiStatusEor = status.eor;
556 m_lineBreakBidiStatusLastStrong = status.lastStrong; 556 m_lineBreakBidiStatusLastStrong = status.lastStrong;
557 m_lineBreakBidiStatusLast = status.last; 557 m_lineBreakBidiStatusLast = status.last;
558 m_lineBreakContext = status.context; 558 m_lineBreakContext = status.context;
559 } 559 }
560 560
561 EllipsisBox* RootInlineBox::ellipsisBox() const { 561 EllipsisBox* RootInlineBox::ellipsisBox() const {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 818 }
819 endBox = nullptr; 819 endBox = nullptr;
820 return nullptr; 820 return nullptr;
821 } 821 }
822 822
823 const char* RootInlineBox::boxName() const { 823 const char* RootInlineBox::boxName() const {
824 return "RootInlineBox"; 824 return "RootInlineBox";
825 } 825 }
826 826
827 } // namespace blink 827 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698