Title: [184923] trunk/Source/WebKit2
Revision
184923
Author
[email protected]
Date
2015-05-27 14:51:22 -0700 (Wed, 27 May 2015)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (184922 => 184923)


--- trunk/Source/WebKit2/ChangeLog	2015-05-27 21:41:02 UTC (rev 184922)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-27 21:51:22 UTC (rev 184923)
@@ -1,3 +1,23 @@
+2015-05-27  Chris Dumez  <[email protected]>
+
+        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.
+
 2015-05-27  Anders Carlsson  <[email protected]>
 
         Address a follow-up review comment from Darin.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (184922 => 184923)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-27 21:41:02 UTC (rev 184922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-27 21:51:22 UTC (rev 184923)
@@ -4430,18 +4430,11 @@
 {
     Frame& frame = m_page->focusController().focusedOrMainFrame();
     FrameView* view = frame.view();
-#if PLATFORM(COCOA) && !defined(NDEBUG)
-    int layoutCount = view ? view->layoutCount() : 0;
-#endif
 
     // If there is a layout pending, we should avoid populating EditorState that require layout to be done or it will
     // trigger a synchronous layout every time the selection changes. sendPostLayoutEditorStateIfNeeded() will be called
     // to send the full editor state after layout is done if we send a partial editor state here.
     auto editorState = this->editorState(view && view->needsLayout() ? IncludePostLayoutDataHint::No : IncludePostLayoutDataHint::Yes);
-#if PLATFORM(COCOA) && !defined(NDEBUG)
-    if (view)
-        ASSERT_WITH_MESSAGE(layoutCount == view->layoutCount(), "Calling editorState() should not cause a synchronous layout.");
-#endif
     m_isEditorStateMissingPostLayoutData = editorState.isMissingPostLayoutData;
 
 #if PLATFORM(MAC) && USE(ASYNC_NSTEXTINPUTCLIENT)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to