Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index ab957be9f9efa0a9d3af3454f5ab01d1f19dfd4c..ae8a0b58ba87939a2adf6eb2298826082843cb27 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -891,7 +891,7 @@ void ExternalReference::SetUp() { |
double_constants.the_hole_nan = BitCast<double>(kHoleNanInt64); |
double_constants.negative_infinity = -V8_INFINITY; |
- math_exp_data_mutex = new Mutex; |
+ math_exp_data_mutex = OS::CreateMutex(); |
} |
@@ -899,7 +899,7 @@ void ExternalReference::InitializeMathExpData() { |
// Early return? |
if (math_exp_data_initialized) return; |
- ScopedLock with(math_exp_data_mutex); |
+ math_exp_data_mutex->Lock(); |
if (!math_exp_data_initialized) { |
// If this is changed, generated code must be adapted too. |
const int kTableSizeBits = 11; |
@@ -935,6 +935,7 @@ void ExternalReference::InitializeMathExpData() { |
math_exp_data_initialized = true; |
} |
+ math_exp_data_mutex->Unlock(); |
} |