Changeset 230624 in webkit
- Timestamp:
- Apr 13, 2018 12:26:59 AM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r230622 r230624 1 2018-04-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added 4 https://bugs.webkit.org/show_bug.cgi?id=184531 5 6 Reviewed by Michael Catanzaro. 7 8 It's not a bug in WebKit, but in the tests. The problem is that those tests are using RunLoop::main() but main 9 run loop hasn't been initialized. ReleaseInNonMainThread doesn't really need to initialize the main run loop if 10 we change Util::run() to always use RunLop::current() instead of RunLoop::main(). But 11 ReleaseInNonMainThreadDestroyInMainThread ends up scheduling a task to the main thread, and the generic 12 implementation fo that uses RunLoop::main(), so we need to initialize the main loop in this case. 13 14 * TestWebKitAPI/Tests/WTF/RefPtr.cpp: 15 (TestWebKitAPI::TEST): Call RunLoop::initializeMainRunLoop(). 16 * TestWebKitAPI/glib/UtilitiesGLib.cpp: 17 (TestWebKitAPI::Util::run): Use RunLop::current() to stop the current run loop. 18 (TestWebKitAPI::Util::sleep): Ditto. 19 1 20 2018-04-12 Zalan Bujtas <zalan@apple.com> 2 21 -
trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp
r230259 r230624 34 34 #include <wtf/RefCounted.h> 35 35 #include <wtf/RefPtr.h> 36 #include <wtf/RunLoop.h> 36 37 #include <wtf/ThreadSafeRefCounted.h> 37 38 #include <wtf/Threading.h> … … 578 579 TEST(WTF_RefPtr, ReleaseInNonMainThreadDestroyInMainThread) 579 580 { 581 RunLoop::initializeMainRunLoop(); 580 582 done = false; 581 583 Thread::create("", [object = MainThreadSafeRefCountedObject::create()] { }); -
trunk/Tools/TestWebKitAPI/glib/UtilitiesGLib.cpp
r222962 r230624 38 38 bool* done = static_cast<bool*>(userData); 39 39 if (*done) 40 RunLoop:: main().stop();40 RunLoop::current().stop(); 41 41 42 42 return !*done; … … 59 59 return G_SOURCE_REMOVE; 60 60 }, nullptr); 61 RunLoop:: main().stop();61 RunLoop::current().stop(); 62 62 } 63 63
Note: See TracChangeset
for help on using the changeset viewer.