Modified: trunk/Source/WTF/ChangeLog (200992 => 200993)
--- trunk/Source/WTF/ChangeLog 2016-05-17 03:36:45 UTC (rev 200992)
+++ trunk/Source/WTF/ChangeLog 2016-05-17 04:02:40 UTC (rev 200993)
@@ -1,3 +1,25 @@
+2016-05-16 Michael Saboff <[email protected]>
+
+ ARMV7K: Crash at _javascript_Core: WTF::ScopedLambdaFunctor<bool
+ https://bugs.webkit.org/show_bug.cgi?id=157781
+
+ Reviewed by Filip Pizlo.
+
+ Replaced use of ScopedLambda in locking code with std::function much as it was
+ before change set 199760 to work around what appears to be a clang compiler issue.
+
+ * wtf/ParkingLot.cpp:
+ (WTF::ParkingLot::parkConditionallyImpl):
+ (WTF::ParkingLot::unparkOne):
+ (WTF::ParkingLot::unparkAll):
+ (WTF::ParkingLot::forEach):
+ (WTF::ParkingLot::unparkOneImpl): Deleted.
+ (WTF::ParkingLot::forEachImpl): Deleted.
+ * wtf/ParkingLot.h:
+ (WTF::ParkingLot::parkConditionally):
+ (WTF::ParkingLot::unparkOne): Deleted.
+ (WTF::ParkingLot::forEach): Deleted.
+
2016-05-15 Chris Dumez <[email protected]>
Use more references in JS wrappers related code
Modified: trunk/Source/WTF/wtf/ParkingLot.cpp (200992 => 200993)
--- trunk/Source/WTF/wtf/ParkingLot.cpp 2016-05-17 03:36:45 UTC (rev 200992)
+++ trunk/Source/WTF/wtf/ParkingLot.cpp 2016-05-17 04:02:40 UTC (rev 200993)
@@ -532,8 +532,8 @@
NEVER_INLINE bool ParkingLot::parkConditionallyImpl(
const void* address,
- const ScopedLambda<bool()>& validation,
- const ScopedLambda<void()>& beforeSleep,
+ std::function<bool()> validation,
+ std::function<void()> beforeSleep,
Clock::time_point timeout)
{
if (verbose)
@@ -649,9 +649,9 @@
return result;
}
-NEVER_INLINE void ParkingLot::unparkOneImpl(
+NEVER_INLINE void ParkingLot::unparkOne(
const void* address,
- const ScopedLambda<void(ParkingLot::UnparkResult)>& callback)
+ std::function<void(ParkingLot::UnparkResult)> callback)
{
if (verbose)
dataLog(toString(currentThread(), ": unparking one the hard way.\n"));
@@ -719,7 +719,7 @@
dataLog(toString(currentThread(), ": done unparking.\n"));
}
-NEVER_INLINE void ParkingLot::forEachImpl(const ScopedLambda<void(ThreadIdentifier, const void*)>& callback)
+NEVER_INLINE void ParkingLot::forEach(std::function<void(ThreadIdentifier, const void*)> callback)
{
Vector<Bucket*> bucketsToUnlock = lockHashtable();
Modified: trunk/Source/WTF/wtf/ParkingLot.h (200992 => 200993)
--- trunk/Source/WTF/wtf/ParkingLot.h 2016-05-17 03:36:45 UTC (rev 200992)
+++ trunk/Source/WTF/wtf/ParkingLot.h 2016-05-17 04:02:40 UTC (rev 200993)
@@ -29,7 +29,6 @@
#include <chrono>
#include <functional>
#include <wtf/Atomics.h>
-#include <wtf/ScopedLambda.h>
#include <wtf/Threading.h>
namespace WTF {
@@ -61,8 +60,8 @@
{
return parkConditionallyImpl(
address,
- scopedLambda<bool()>(std::forward<ValidationFunctor>(validation)),
- scopedLambda<void()>(std::forward<BeforeSleepFunctor>(beforeSleep)),
+ std::function<bool()>(std::forward<ValidationFunctor>(validation)),
+ std::function<void()>(std::forward<BeforeSleepFunctor>(beforeSleep)),
timeout);
}
@@ -101,11 +100,9 @@
// that race - see Rusty Russel's well-known usersem library - but it's not pretty. This form
// allows that race to be completely avoided, since there is no way that a thread can be parked
// while the callback is running.
- template<typename CallbackFunctor>
- static void unparkOne(const void* address, CallbackFunctor&& callback)
- {
- unparkOneImpl(address, scopedLambda<void(UnparkResult)>(std::forward<CallbackFunctor>(callback)));
- }
+ WTF_EXPORT_PRIVATE static void unparkOne(
+ const void* address,
+ std::function<void(ParkingLot::UnparkResult)> callback);
// Unparks every thread from the queue associated with the given address, which cannot be null.
WTF_EXPORT_PRIVATE static void unparkAll(const void* address);
@@ -123,23 +120,19 @@
// As well as many other possible interleavings that all have T1 before T2 and T3 before T4 but are
// otherwise unconstrained. This method is useful primarily for debugging. It's also used by unit
// tests.
- template<typename CallbackFunctor>
- static void forEach(CallbackFunctor&& callback)
- {
- forEachImpl(scopedLambda<void(ThreadIdentifier, const void*)>(std::forward<CallbackFunctor>(callback)));
- }
+ WTF_EXPORT_PRIVATE static void forEach(std::function<void(ThreadIdentifier, const void*)>);
private:
WTF_EXPORT_PRIVATE static bool parkConditionallyImpl(
const void* address,
- const ScopedLambda<bool()>& validation,
- const ScopedLambda<void()>& beforeSleep,
+ std::function<bool()> validation,
+ std::function<void()> beforeSleep,
Clock::time_point timeout);
WTF_EXPORT_PRIVATE static void unparkOneImpl(
- const void* address, const ScopedLambda<void(UnparkResult)>& callback);
+ const void* address, std::function<void(UnparkResult)> callback);
- WTF_EXPORT_PRIVATE static void forEachImpl(const ScopedLambda<void(ThreadIdentifier, const void*)>&);
+ WTF_EXPORT_PRIVATE static void forEachImpl(const std::function<void(ThreadIdentifier, const void*)>&);
};
} // namespace WTF