[GLIB] Test FileMonitorTest.DetectChangeAndThenDelete sometimes crashes
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Nov 2017 16:53:41 +0000 (16:53 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Nov 2017 16:53:41 +0000 (16:53 +0000)
commitb4b94bcfc2479be8b82ea0c9b001feb63ad348b1
tree288627779e58c184dc22d12867fa611910419b7c
parentd0725b5afed5fe557743e8867a9dd29229682b9a
[GLIB] Test FileMonitorTest.DetectChangeAndThenDelete sometimes crashes
https://bugs.webkit.org/show_bug.cgi?id=179909

Reviewed by Michael Catanzaro.

The problem sems to be that the GFileMonitor is created in the main thread, but destroyed in the WorkQueue
thread. We can create the monitor in the WorkQueue thread and do the monitoring there.

Fixes unit test FileMonitorTest.DetectChangeAndThenDelete.

* platform/glib/FileMonitorGLib.cpp:
(WebCore::FileMonitor::FileMonitor): Create the GFileMonitor in the WorkQueue.
(WebCore::FileMonitor::didChange): No need to dispatch the handler in the WorkQueue, since this is now called in
the WorkQueue.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/glib/FileMonitorGLib.cpp