Skip to content

Commit

Permalink
fix(core): fix android scope crash
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao committed Jun 13, 2024
1 parent e8047bb commit 7524636
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions driver/js/src/scope.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ Scope::~Scope() {
*/
#else
auto engine = engine_.lock();
FOOTSTONE_CHECK(engine);
auto key = wrapper_.get();
engine->ClearWeakCallbackWrapper(key);
engine->ClearFunctionWrapper(key);
engine->ClearClassTemplate(key);
FOOTSTONE_DCHECK(engine);
if (engine) {
auto key = wrapper_.get();
engine->ClearWeakCallbackWrapper(key);
engine->ClearFunctionWrapper(key);
engine->ClearClassTemplate(key);
}
#endif
}

Expand Down

0 comments on commit 7524636

Please sign in to comment.