Changeset 101406 in webkit


Ignore:
Timestamp:
Nov 29, 2011 12:37:24 PM (12 years ago)
Author:
rniwa@webkit.org
Message:

Crash in IsolateTracker::addFakeRunIfNecessary(), preceded by assertion failure (m_nestedIsolateCount >= 1)
in IsolateTracker::exitIsolate()
https://bugs.webkit.org/show_bug.cgi?id=69275

Reviewed by Eric Seidel.

Source/WebCore:

The crash was caused by our false assumption that at most one isolated container exists between the start
and the root when appending a new run. Fixed the crash by computing the actual number of isolated containers
between the start and the root.

Test: fast/text/nested-bidi-isolate-crash.html

  • rendering/InlineIterator.h:

(WebCore::numberOfIsolateAncestors):
(WebCore::IsolateTracker::IsolateTracker):
(WebCore::InlineBidiResolver::appendRun):

LayoutTests:

Add a regression test.

  • fast/text/nested-bidi-isolate-crash-expected.txt: Added.
  • fast/text/nested-bidi-isolate-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r101400 r101406  
     12011-11-28  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in IsolateTracker::addFakeRunIfNecessary(), preceded by assertion failure (m_nestedIsolateCount >= 1)
     4        in IsolateTracker::exitIsolate()
     5        https://bugs.webkit.org/show_bug.cgi?id=69275
     6
     7        Reviewed by Eric Seidel.
     8
     9        Add a regression test.
     10
     11        * fast/text/nested-bidi-isolate-crash-expected.txt: Added.
     12        * fast/text/nested-bidi-isolate-crash.html: Added.
     13
    1142011-11-29  Xiaomei Ji  <xji@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r101401 r101406  
     12011-11-28  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in IsolateTracker::addFakeRunIfNecessary(), preceded by assertion failure (m_nestedIsolateCount >= 1)
     4        in IsolateTracker::exitIsolate()
     5        https://bugs.webkit.org/show_bug.cgi?id=69275
     6
     7        Reviewed by Eric Seidel.
     8
     9        The crash was caused by our false assumption that at most one isolated container exists between the start
     10        and the root when appending a new run. Fixed the crash by computing the actual number of isolated containers
     11        between the start and the root.
     12
     13        Test: fast/text/nested-bidi-isolate-crash.html
     14
     15        * rendering/InlineIterator.h:
     16        (WebCore::numberOfIsolateAncestors):
     17        (WebCore::IsolateTracker::IsolateTracker):
     18        (WebCore::InlineBidiResolver::appendRun):
     19
    1202011-11-29  Oliver Hunt  <oliver@apple.com>
    221
  • trunk/Source/WebCore/rendering/InlineIterator.h

    r101272 r101406  
    407407}
    408408
     409static inline unsigned numberOfIsolateAncestors(RenderObject* object, RenderObject* root)
     410{
     411    ASSERT(object);
     412    unsigned count = 0;
     413    while (object && object != root) {
     414        if (isIsolatedInline(object))
     415            count++;
     416        object = object->parent();
     417    }
     418    return count;
     419}
     420
    409421// FIXME: This belongs on InlineBidiResolver, except it's a template specialization
    410422// of BidiResolver which knows nothing about RenderObjects.
     
    421433class IsolateTracker {
    422434public:
    423     explicit IsolateTracker(bool inIsolate)
    424         : m_nestedIsolateCount(inIsolate ? 1 : 0)
     435    explicit IsolateTracker(unsigned nestedIsolateCount)
     436        : m_nestedIsolateCount(nestedIsolateCount)
    425437        , m_haveAddedFakeRunForRootIsolate(false)
    426438    {
     
    471483        // Initialize our state depending on if we're starting in the middle of such an inline.
    472484        // FIXME: Could this initialize from this->inIsolate() instead of walking up the render tree?
    473         IsolateTracker isolateTracker(containingIsolate(m_sor.m_obj, m_sor.root()));
     485        IsolateTracker isolateTracker(numberOfIsolateAncestors(m_sor.m_obj, m_sor.root()));
    474486        int start = m_sor.m_pos;
    475487        RenderObject* obj = m_sor.m_obj;
Note: See TracChangeset for help on using the changeset viewer.