Changeset 184923 in webkit


Ignore:
Timestamp:
May 27, 2015, 2:51:22 PM (10 years ago)
Author:
Chris Dumez
Message:

Assertion hit in WebPage::didChangeSelection()
https://bugs.webkit.org/show_bug.cgi?id=145413
<rdar://problem/21001129>

Reviewed by Ryosuke Niwa.

We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
assertion in WebPage::didChangeSelection(). We manage to prevent
synchronous layouts in most cases when calling editorState(). However,
it seems it can still happen in some cases. Crashing in this case seems
overkill and can be annoying to other developers, especially
considering the implications are only on performance.

This patch drops the assertion.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didChangeSelection): Deleted.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r184913 r184923  
     12015-05-27  Chris Dumez  <cdumez@apple.com>
     2
     3        Assertion hit in WebPage::didChangeSelection()
     4        https://bugs.webkit.org/show_bug.cgi?id=145413
     5        <rdar://problem/21001129>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
     10        assertion in WebPage::didChangeSelection(). We manage to prevent
     11        synchronous layouts in most cases when calling editorState(). However,
     12        it seems it can still happen in some cases. Crashing in this case seems
     13        overkill and can be annoying to other developers, especially
     14        considering the implications are only on performance.
     15
     16        This patch drops the assertion.
     17
     18        * WebProcess/WebPage/WebPage.cpp:
     19        (WebKit::WebPage::didChangeSelection): Deleted.
     20
    1212015-05-27  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r184813 r184923  
    44314431    Frame& frame = m_page->focusController().focusedOrMainFrame();
    44324432    FrameView* view = frame.view();
    4433 #if PLATFORM(COCOA) && !defined(NDEBUG)
    4434     int layoutCount = view ? view->layoutCount() : 0;
    4435 #endif
    44364433
    44374434    // If there is a layout pending, we should avoid populating EditorState that require layout to be done or it will
     
    44394436    // to send the full editor state after layout is done if we send a partial editor state here.
    44404437    auto editorState = this->editorState(view && view->needsLayout() ? IncludePostLayoutDataHint::No : IncludePostLayoutDataHint::Yes);
    4441 #if PLATFORM(COCOA) && !defined(NDEBUG)
    4442     if (view)
    4443         ASSERT_WITH_MESSAGE(layoutCount == view->layoutCount(), "Calling editorState() should not cause a synchronous layout.");
    4444 #endif
    44454438    m_isEditorStateMissingPostLayoutData = editorState.isMissingPostLayoutData;
    44464439
Note: See TracChangeset for help on using the changeset viewer.