Title: [224803] trunk/Source/WebCore
- Revision
- 224803
- Author
- [email protected]
- Date
- 2017-11-13 22:03:07 -0800 (Mon, 13 Nov 2017)
Log Message
iOS: Enable release asserts in updateStyleIfNeeded() and updateLayout() for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=179651
Reviewed by Antti Koivisto.
r224604 disabled the release assertions on iOS entirely even though the underlying bug only affected iOS WebKit1 port
due to various time constraints. Enable them back on iOS WebKit2 port.
* dom/Document.cpp:
(WebCore::isSafeToUpdateStyleOrLayout):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (224802 => 224803)
--- trunk/Source/WebCore/ChangeLog 2017-11-14 05:33:30 UTC (rev 224802)
+++ trunk/Source/WebCore/ChangeLog 2017-11-14 06:03:07 UTC (rev 224803)
@@ -1,3 +1,18 @@
+2017-11-13 Ryosuke Niwa <[email protected]>
+
+ iOS: Enable release asserts in updateStyleIfNeeded() and updateLayout() for WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=179651
+
+ Reviewed by Antti Koivisto.
+
+ r224604 disabled the release assertions on iOS entirely even though the underlying bug only affected iOS WebKit1 port
+ due to various time constraints. Enable them back on iOS WebKit2 port.
+
+ * dom/Document.cpp:
+ (WebCore::isSafeToUpdateStyleOrLayout):
+ (WebCore::Document::updateStyleIfNeeded):
+ (WebCore::Document::updateLayout):
+
2017-11-13 Brady Eidson <[email protected]>
Massive "Server-process-to-context-process" connection overhaul.
Modified: trunk/Source/WebCore/dom/Document.cpp (224802 => 224803)
--- trunk/Source/WebCore/dom/Document.cpp 2017-11-14 05:33:30 UTC (rev 224802)
+++ trunk/Source/WebCore/dom/Document.cpp 2017-11-14 06:03:07 UTC (rev 224803)
@@ -1924,6 +1924,19 @@
return false;
}
+inline bool static isSafeToUpdateStyleOrLayout(FrameView* frameView)
+{
+#if USE(WEB_THREAD)
+ // FIXME: Remove this code: <rdar://problem/35522719>
+ bool usingWebThread = WebThreadIsEnabled();
+#else
+ bool usingWebThread = false;
+#endif
+ bool isSafeToExecuteScript = NoEventDispatchAssertion::InMainThread::isEventAllowed();
+ bool isInFrameFlattening = frameView && frameView->isInChildFrameWithFrameFlattening();
+ return isSafeToExecuteScript || isInFrameFlattening || usingWebThread;
+}
+
bool Document::updateStyleIfNeeded()
{
RefPtr<FrameView> frameView = view();
@@ -1941,10 +1954,8 @@
return false;
}
- // The early exit for needsStyleRecalc() is needed when updateWidgetPositions() is called in runOrScheduleAsynchronousTasks().
-#if !USE(WEB_THREAD)
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed() || (frameView && frameView->isInChildFrameWithFrameFlattening()));
-#endif
+ // The early exit above for !needsStyleRecalc() is needed when updateWidgetPositions() is called in runOrScheduleAsynchronousTasks().
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(isSafeToUpdateStyleOrLayout(frameView.get()));
resolveStyle();
return true;
@@ -1961,9 +1972,7 @@
ASSERT_NOT_REACHED();
return;
}
-#if !USE(WEB_THREAD)
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventAllowed() || (frameView && frameView->isInChildFrameWithFrameFlattening()));
-#endif
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(isSafeToUpdateStyleOrLayout(frameView.get()));
RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes