[Webkit-unassigned] [Bug 115407] REGRESION(r149338): WebKitTestRunner crashing on Qt WK2, EFL WK2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 30 01:48:50 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=115407


Byungwoo Lee <bw80.lee at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bw80.lee at samsung.com




--- Comment #1 from Byungwoo Lee <bw80.lee at samsung.com>  2013-04-30 01:47:12 PST ---
RunLoop::current() returns 0 and below seems to make this problem.

 RunLoop* RunLoop::current()
 {
-    DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop>, runLoopData, ());
-    return &*runLoopData;
+    DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RefPtr<RunLoop> >, runLoopData, ());
+    return runLoopData->get();
 }

RefPtr<RunLoop> will be empty because DEFINE_STATIC_LOCAL will not create RunLoop instance.

I made a change as following, and it works ok.
But I'm not sure this is the right solution.

 RunLoop* RunLoop::current()
 {
-    DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RefPtr<RunLoop> >, runLoopData, ());
-    return runLoopData->get();
+    DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RefPtr<RunLoop> >, runLoopRefPtrData, ());
+    DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop>, runLoopData, ());
+    if (!runLoopRefPtrData.isSet())
+        *runLoopRefPtrData = adoptRef((RunLoop*)runLoopData);
+    return runLoopRefPtrData->get();
 }

is there any one who knows the clear point about this?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list