Skip to content

Commit

Permalink
fix(core): fix global strip when ld in app
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored and zealotchen0 committed Sep 21, 2023
1 parent 8d7b32a commit eea6ab8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions core/src/scope.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ Scope::Scope(Engine* engine,
std::string name,
std::unique_ptr<RegisterMap> map)
: engine_(engine), context_(nullptr), name_(std::move(name)), map_(std::move(map)) {
REGISTER_MODULE(ContextifyModule, RunInThisContext)
REGISTER_MODULE(ContextifyModule, LoadUntrustedContent)
REGISTER_MODULE(TimerModule, SetTimeout)
REGISTER_MODULE(TimerModule, ClearTimeout)
REGISTER_MODULE(TimerModule, SetInterval)
REGISTER_MODULE(TimerModule, ClearInterval)
REGISTER_MODULE(ConsoleModule, Log)
static std::once_flag flag;
std::call_once(flag, [] {
REGISTER_MODULE(ContextifyModule, RunInThisContext)
REGISTER_MODULE(ContextifyModule, LoadUntrustedContent)
REGISTER_MODULE(TimerModule, SetTimeout)
REGISTER_MODULE(TimerModule, ClearTimeout)
REGISTER_MODULE(TimerModule, SetInterval)
REGISTER_MODULE(TimerModule, ClearInterval)
REGISTER_MODULE(ConsoleModule, Log)
});
}

Scope::~Scope() {
Expand Down

0 comments on commit eea6ab8

Please sign in to comment.