mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 04:25:28 -04:00
modify global js window map to thread local
Signed-off-by: chyyy0213 <chenhaiying3@huawei.com> Change-Id: I8cd66959164d636985a5b23f227607279f72a1e3
This commit is contained in:
@@ -26,7 +26,7 @@ namespace {
|
||||
constexpr Rect g_emptyRect = {0, 0, 0, 0};
|
||||
}
|
||||
|
||||
static std::map<std::string, std::shared_ptr<NativeReference>> g_jsWindowMap;
|
||||
static thread_local std::map<std::string, std::shared_ptr<NativeReference>> g_jsWindowMap;
|
||||
std::recursive_mutex g_mutex;
|
||||
JsWindow::JsWindow(const sptr<Window>& window)
|
||||
: windowToken_(window), registerManager_(std::make_unique<JsWindowRegisterManager>())
|
||||
|
||||
Reference in New Issue
Block a user