Title: [126805] trunk/Source/WebCore
- Revision
- 126805
- Author
- roger_f...@apple.com
- Date
- 2012-08-27 15:19:06 -0700 (Mon, 27 Aug 2012)
Log Message
Hook procedure should check to see if hook has already been removed before attempting removal.
https://bugs.webkit.org/show_bug.cgi?id=95118
Reviewed by Simon Fraser.
When the hookFired method in LayerChangesFlusher.cpp gets called in response to a message posted to the message queue
it calls CallNextHook to pass the message to the next hook procedure in the hook chain.
Sometimes, the message can get passed to another hook procedure that can dispatch another message.
This message gets passed back through the hook chain and we eventually re-enter the hookFired method.
When that hookFired call completes, it may remove the hook.
When CallNextHook returns, the original call to hookFired may try to remove the hook as well.
However, there is no need as the hook as already been removed.
This results in an assertion failure, assert(m_hook), when we call removeHook.
* platform/graphics/ca/win/LayerChangesFlusher.cpp:
(WebCore::LayerChangesFlusher::hookFired):
Simply check to see if the hook has already been removed before actually trying to remove it.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (126804 => 126805)
--- trunk/Source/WebCore/ChangeLog 2012-08-27 22:09:06 UTC (rev 126804)
+++ trunk/Source/WebCore/ChangeLog 2012-08-27 22:19:06 UTC (rev 126805)
@@ -1,3 +1,25 @@
+2012-08-27 Roger Fong <roger_f...@apple.com>
+
+ Hook procedure should check to see if hook has already been removed before attempting removal.
+ https://bugs.webkit.org/show_bug.cgi?id=95118
+
+ Reviewed by Simon Fraser.
+
+ When the hookFired method in LayerChangesFlusher.cpp gets called in response to a message posted to the message queue
+ it calls CallNextHook to pass the message to the next hook procedure in the hook chain.
+
+ Sometimes, the message can get passed to another hook procedure that can dispatch another message.
+ This message gets passed back through the hook chain and we eventually re-enter the hookFired method.
+
+ When that hookFired call completes, it may remove the hook.
+ When CallNextHook returns, the original call to hookFired may try to remove the hook as well.
+ However, there is no need as the hook as already been removed.
+ This results in an assertion failure, assert(m_hook), when we call removeHook.
+
+ * platform/graphics/ca/win/LayerChangesFlusher.cpp:
+ (WebCore::LayerChangesFlusher::hookFired):
+ Simply check to see if the hook has already been removed before actually trying to remove it.
+
2012-08-24 James Robinson <jam...@chromium.org>
[chromium] Clean up dependencies of WebScrollbar and WebScrollbarLayer
Modified: trunk/Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp (126804 => 126805)
--- trunk/Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp 2012-08-27 22:09:06 UTC (rev 126804)
+++ trunk/Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp 2012-08-27 22:19:06 UTC (rev 126805)
@@ -95,7 +95,7 @@
LRESULT result = ::CallNextHookEx(m_hook, code, wParam, lParam);
- if (m_hostsWithChangesToFlush.isEmpty()) {
+ if (m_hook && m_hostsWithChangesToFlush.isEmpty()) {
// We won't have any work to do next time around, so just remove our hook.
removeHook();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes