diff --git a/src/v8runtime/V8Inspector.cpp b/src/v8runtime/V8Inspector.cpp index 2976039..1eb82b7 100644 --- a/src/v8runtime/V8Inspector.cpp +++ b/src/v8runtime/V8Inspector.cpp @@ -227,7 +227,6 @@ void InspectorClient::SendRemoteMessage( const v8_inspector::StringView &message) { if (remoteConn_) { v8::Isolate *isolate = GetIsolate(); - v8::Locker locker(isolate); v8::Isolate::Scope scopedIsolate(isolate); v8::HandleScope scopedHandle(isolate); v8::Context::Scope scopedContext(GetContext().Get(isolate)); @@ -249,25 +248,13 @@ void InspectorClient::AwakePauseLockWithMessage(const std::string &message) { void InspectorClient::DispatchProxy(const std::string &message) { std::string normalizedString = stripMetroCachePrevention(message); - - auto messageObj = folly::parseJson(message); - auto method = messageObj["method"].asString(); - - // For `v8::CpuProfiler` or some other modules with thread local storage, we - // should dispatch messages in the js thread. - if (method == "Profiler.start" || method == "Profiler.stop") { - jsQueue_->runOnQueue([this, normalizedString]() { - v8::Isolate *isolate = GetIsolate(); - v8::Locker locker(isolate); - v8::Isolate::Scope scopedIsolate(isolate); - v8::HandleScope scopedHandle(isolate); - v8::Context::Scope scopedContext(GetContext().Get(isolate)); - session_->dispatchProtocolMessage(ToStringView(normalizedString)); - }); - return; - } - - session_->dispatchProtocolMessage(ToStringView(normalizedString)); + jsQueue_->runOnQueue([this, normalizedString]() { + v8::Isolate *isolate = GetIsolate(); + v8::Isolate::Scope scopedIsolate(isolate); + v8::HandleScope scopedHandle(isolate); + v8::Context::Scope scopedContext(GetContext().Get(isolate)); + session_->dispatchProtocolMessage(ToStringView(normalizedString)); + }); } void InspectorClient::DispatchProtocolMessage(const std::string &message) { @@ -276,7 +263,6 @@ void InspectorClient::DispatchProtocolMessage(const std::string &message) { return; } v8::Isolate *isolate = GetIsolate(); - v8::Locker locker(isolate); v8::Isolate::Scope scopedIsolate(isolate); v8::HandleScope scopedHandle(isolate); v8::Context::Scope scopedContext(GetContext().Get(isolate)); @@ -290,7 +276,6 @@ void InspectorClient::DispatchProtocolMessages( return; } v8::Isolate *isolate = GetIsolate(); - v8::Locker locker(isolate); v8::Isolate::Scope scopedIsolate(isolate); v8::HandleScope scopedHandle(isolate); v8::Context::Scope scopedContext(GetContext().Get(isolate)); diff --git a/src/v8runtime/V8PointerValue.cpp b/src/v8runtime/V8PointerValue.cpp index aea8e06..6d5fedf 100644 --- a/src/v8runtime/V8PointerValue.cpp +++ b/src/v8runtime/V8PointerValue.cpp @@ -69,7 +69,6 @@ V8PointerValue *V8PointerValue::createFromUtf8( void V8PointerValue::invalidate() { { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); value_.Reset(); } diff --git a/src/v8runtime/V8Runtime.cpp b/src/v8runtime/V8Runtime.cpp index 53e635e..eec0783 100644 --- a/src/v8runtime/V8Runtime.cpp +++ b/src/v8runtime/V8Runtime.cpp @@ -68,7 +68,6 @@ V8Runtime::V8Runtime( v8::Isolate::TimeZoneDetection::kCustom, config_->timezoneId.c_str()); } #endif - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); context_.Reset(isolate_, CreateGlobalContext(isolate_)); @@ -92,7 +91,6 @@ V8Runtime::V8Runtime( isolate_ = v8Runtime->isolate_; jsQueue_ = v8Runtime->jsQueue_; - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); context_.Reset(isolate_, CreateGlobalContext(isolate_)); @@ -125,7 +123,6 @@ V8Runtime::V8Runtime( V8Runtime::~V8Runtime() { { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); if (inspectorClient_) { @@ -142,7 +139,6 @@ V8Runtime::~V8Runtime() { } void V8Runtime::OnMainLoopIdle() { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -386,7 +382,6 @@ v8::Platform *V8Runtime::GetPlatform() { jsi::Value V8Runtime::evaluateJavaScript( const std::shared_ptr &buffer, const std::string &sourceURL) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -415,7 +410,6 @@ jsi::Value V8Runtime::evaluatePreparedJavaScript( } bool V8Runtime::drainMicrotasks(int maxMicrotasksHint) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -431,7 +425,6 @@ bool V8Runtime::drainMicrotasks(int maxMicrotasksHint) { } jsi::Object V8Runtime::global() { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -456,7 +449,6 @@ jsi::Runtime::PointerValue *V8Runtime::cloneSymbol( if (!pv) { return nullptr; } - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -474,7 +466,6 @@ jsi::Runtime::PointerValue *V8Runtime::cloneBigInt( return nullptr; } - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -492,7 +483,6 @@ jsi::Runtime::PointerValue *V8Runtime::cloneString( return nullptr; } - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -509,7 +499,6 @@ jsi::Runtime::PointerValue *V8Runtime::cloneObject( return nullptr; } - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -528,7 +517,6 @@ jsi::Runtime::PointerValue *V8Runtime::clonePropNameID( jsi::PropNameID V8Runtime::createPropNameIDFromAscii( const char *str, size_t length) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -544,7 +532,6 @@ jsi::PropNameID V8Runtime::createPropNameIDFromAscii( jsi::PropNameID V8Runtime::createPropNameIDFromUtf8( const uint8_t *utf8, size_t length) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -558,7 +545,6 @@ jsi::PropNameID V8Runtime::createPropNameIDFromUtf8( } jsi::PropNameID V8Runtime::createPropNameIDFromString(const jsi::String &str) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -575,7 +561,6 @@ jsi::PropNameID V8Runtime::createPropNameIDFromString(const jsi::String &str) { #if REACT_NATIVE_TARGET_VERSION >= 69 jsi::PropNameID V8Runtime::createPropNameIDFromSymbol( const facebook::jsi::Symbol &sym) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -590,7 +575,6 @@ jsi::PropNameID V8Runtime::createPropNameIDFromSymbol( #endif std::string V8Runtime::utf8(const jsi::PropNameID &sym) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -602,7 +586,6 @@ std::string V8Runtime::utf8(const jsi::PropNameID &sym) { } bool V8Runtime::compare(const jsi::PropNameID &a, const jsi::PropNameID &b) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -624,7 +607,6 @@ std::string V8Runtime::symbolToString(const jsi::Symbol &symbol) { } jsi::BigInt V8Runtime::createBigIntFromInt64(int64_t value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -634,7 +616,6 @@ jsi::BigInt V8Runtime::createBigIntFromInt64(int64_t value) { } jsi::BigInt V8Runtime::createBigIntFromUint64(uint64_t value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -644,7 +625,6 @@ jsi::BigInt V8Runtime::createBigIntFromUint64(uint64_t value) { } bool V8Runtime::bigintIsInt64(const jsi::BigInt &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -660,7 +640,6 @@ bool V8Runtime::bigintIsInt64(const jsi::BigInt &value) { } bool V8Runtime::bigintIsUint64(const jsi::BigInt &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -676,7 +655,6 @@ bool V8Runtime::bigintIsUint64(const jsi::BigInt &value) { } uint64_t V8Runtime::truncate(const jsi::BigInt &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -690,7 +668,6 @@ uint64_t V8Runtime::truncate(const jsi::BigInt &value) { } jsi::String V8Runtime::bigintToString(const jsi::BigInt &value, int radix) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -733,7 +710,6 @@ jsi::String V8Runtime::bigintToString(const jsi::BigInt &value, int radix) { } jsi::String V8Runtime::createStringFromAscii(const char *str, size_t length) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -748,7 +724,6 @@ jsi::String V8Runtime::createStringFromAscii(const char *str, size_t length) { } jsi::String V8Runtime::createStringFromUtf8(const uint8_t *str, size_t length) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -762,7 +737,6 @@ jsi::String V8Runtime::createStringFromUtf8(const uint8_t *str, size_t length) { } std::string V8Runtime::utf8(const jsi::String &str) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -776,7 +750,6 @@ std::string V8Runtime::utf8(const jsi::String &str) { } jsi::Object V8Runtime::createObject() { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -787,7 +760,6 @@ jsi::Object V8Runtime::createObject() { jsi::Object V8Runtime::createObject( std::shared_ptr hostObject) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -829,7 +801,6 @@ std::shared_ptr V8Runtime::getHostObject( // We are guarenteed at this point to have isHostObject(obj) == true // so the internal data should be HostObjectMetadata - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -849,7 +820,6 @@ jsi::HostFunctionType &V8Runtime::getHostFunction( assert(isHostFunction(function)); // We know that isHostFunction(function) is true here, so its safe to proceed - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -875,7 +845,6 @@ jsi::HostFunctionType &V8Runtime::getHostFunction( } bool V8Runtime::hasNativeState(const jsi::Object &object) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -894,7 +863,6 @@ std::shared_ptr V8Runtime::getNativeState( // We are guarenteed at this point to have hasNativeState(obj) == true // so the internal data should be a NativeState - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -913,7 +881,6 @@ void V8Runtime::setNativeState( throw jsi::JSINativeException("native state unsupported on HostObject"); } - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -979,7 +946,6 @@ void V8Runtime::setNativeState( jsi::Value V8Runtime::getProperty( const jsi::Object &object, const jsi::PropNameID &name) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1004,7 +970,6 @@ jsi::Value V8Runtime::getProperty( jsi::Value V8Runtime::getProperty( const jsi::Object &object, const jsi::String &name) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1028,7 +993,6 @@ jsi::Value V8Runtime::getProperty( bool V8Runtime::hasProperty( const jsi::Object &object, const jsi::PropNameID &name) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1053,7 +1017,6 @@ bool V8Runtime::hasProperty( bool V8Runtime::hasProperty( const jsi::Object &object, const jsi::String &name) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1083,7 +1046,6 @@ void V8Runtime::setPropertyValue( #endif const jsi::PropNameID &name, const jsi::Value &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1109,7 +1071,6 @@ void V8Runtime::setPropertyValue( #endif const jsi::String &name, const jsi::Value &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1128,7 +1089,6 @@ void V8Runtime::setPropertyValue( } bool V8Runtime::isArray(const jsi::Object &object) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1139,7 +1099,6 @@ bool V8Runtime::isArray(const jsi::Object &object) const { } bool V8Runtime::isArrayBuffer(const jsi::Object &object) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1150,7 +1109,6 @@ bool V8Runtime::isArrayBuffer(const jsi::Object &object) const { } bool V8Runtime::isFunction(const jsi::Object &object) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1161,7 +1119,6 @@ bool V8Runtime::isFunction(const jsi::Object &object) const { } bool V8Runtime::isHostObject(const jsi::Object &object) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1172,7 +1129,6 @@ bool V8Runtime::isHostObject(const jsi::Object &object) const { } bool V8Runtime::isHostFunction(const jsi::Function &function) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1188,7 +1144,6 @@ bool V8Runtime::isHostFunction(const jsi::Function &function) const { } jsi::Array V8Runtime::getPropertyNames(const jsi::Object &object) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1212,7 +1167,6 @@ jsi::Array V8Runtime::getPropertyNames(const jsi::Object &object) { } jsi::WeakObject V8Runtime::createWeakObject(const jsi::Object &weakObject) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1233,7 +1187,6 @@ jsi::Value V8Runtime::lockWeakObject(const jsi::WeakObject &weakObject) { #else jsi::Value V8Runtime::lockWeakObject(jsi::WeakObject &weakObject) { #endif - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1246,7 +1199,6 @@ jsi::Value V8Runtime::lockWeakObject(jsi::WeakObject &weakObject) { } jsi::Array V8Runtime::createArray(size_t length) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1263,7 +1215,6 @@ jsi::ArrayBuffer V8Runtime::createArrayBuffer( } size_t V8Runtime::size(const jsi::Array &array) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1273,7 +1224,6 @@ size_t V8Runtime::size(const jsi::Array &array) { } size_t V8Runtime::size(const jsi::ArrayBuffer &arrayBuffer) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1286,7 +1236,6 @@ size_t V8Runtime::size(const jsi::ArrayBuffer &arrayBuffer) { } uint8_t *V8Runtime::data(const jsi::ArrayBuffer &arrayBuffer) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1299,7 +1248,6 @@ uint8_t *V8Runtime::data(const jsi::ArrayBuffer &arrayBuffer) { } jsi::Value V8Runtime::getValueAtIndex(const jsi::Array &array, size_t i) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1321,7 +1269,6 @@ void V8Runtime::setValueAtIndexImpl( #endif size_t i, const jsi::Value &value) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1340,7 +1287,6 @@ jsi::Function V8Runtime::createFunctionFromHostFunction( const jsi::PropNameID &name, unsigned int paramCount, jsi::HostFunctionType func) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1386,7 +1332,6 @@ jsi::Value V8Runtime::call( const jsi::Value &jsThis, const jsi::Value *args, size_t count) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1430,7 +1375,6 @@ jsi::Value V8Runtime::callAsConstructor( const jsi::Function &function, const jsi::Value *args, size_t count) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1463,7 +1407,6 @@ jsi::Value V8Runtime::callAsConstructor( } bool V8Runtime::strictEquals(const jsi::Symbol &a, const jsi::Symbol &b) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1481,7 +1424,6 @@ bool V8Runtime::strictEquals(const jsi::Symbol &a, const jsi::Symbol &b) const { #if REACT_NATIVE_TARGET_VERSION >= 70 bool V8Runtime::strictEquals(const jsi::BigInt &a, const jsi::BigInt &b) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1501,7 +1443,6 @@ bool V8Runtime::strictEquals(const jsi::BigInt &a, const jsi::BigInt &b) const { #endif bool V8Runtime::strictEquals(const jsi::String &a, const jsi::String &b) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1518,7 +1459,6 @@ bool V8Runtime::strictEquals(const jsi::String &a, const jsi::String &b) const { } bool V8Runtime::strictEquals(const jsi::Object &a, const jsi::Object &b) const { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_)); @@ -1535,7 +1475,6 @@ bool V8Runtime::strictEquals(const jsi::Object &a, const jsi::Object &b) const { } bool V8Runtime::instanceOf(const jsi::Object &o, const jsi::Function &f) { - v8::Locker locker(isolate_); v8::Isolate::Scope scopedIsolate(isolate_); v8::HandleScope scopedHandle(isolate_); v8::Context::Scope scopedContext(context_.Get(isolate_));