Skip to content

Commit

Permalink
fix(core): fix android scope crash (#3906)
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored Jun 14, 2024
1 parent e8047bb commit 06806d9
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 06806d9

Please sign in to comment.