mirror of
https://gitee.com/openharmony/arkcompiler_toolchain
synced 2024-11-27 01:31:10 +00:00
!810 Fix static variable multithreading issue
Merge pull request !810 from bigtea/master
This commit is contained in:
commit
984872353c
@ -83,8 +83,7 @@ void JSPtHooks::LoadModule(std::string_view pandaFileName, std::string_view entr
|
||||
|
||||
[[maybe_unused]] LocalScope scope(debugger_->vm_);
|
||||
|
||||
static uint32_t scriptId = 0;
|
||||
if (debugger_->NotifyScriptParsed(scriptId++, pandaFileName.data(), entryPoint)) {
|
||||
if (debugger_->NotifyScriptParsed(g_scriptId++, pandaFileName.data(), entryPoint)) {
|
||||
firstTime_ = true;
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,8 @@
|
||||
namespace panda::ecmascript::tooling {
|
||||
class DebuggerImpl;
|
||||
|
||||
static std::atomic<uint32_t> g_scriptId {0};
|
||||
|
||||
class JSPtHooks : public PtHooks {
|
||||
public:
|
||||
explicit JSPtHooks(DebuggerImpl *debugger) : debugger_(debugger) {}
|
||||
|
Loading…
Reference in New Issue
Block a user