fix iOS crash when call Destory
This commit is contained in:
5
doric-web/dist/index.js
vendored
5
doric-web/dist/index.js
vendored
@@ -2218,6 +2218,7 @@ function NativeCall(target, propertyKey, descriptor) {
|
||||
}
|
||||
class Panel {
|
||||
constructor() {
|
||||
this.destroyed = false;
|
||||
this.__root__ = new Root;
|
||||
this.headviews = new Map;
|
||||
this.onRenderFinishedCallback = [];
|
||||
@@ -2274,6 +2275,7 @@ class Panel {
|
||||
this.onCreate();
|
||||
}
|
||||
__onDestroy__() {
|
||||
this.destroyed = true;
|
||||
this.onDestroy();
|
||||
}
|
||||
__onShow__() {
|
||||
@@ -2336,6 +2338,9 @@ class Panel {
|
||||
}
|
||||
}
|
||||
hookAfterNativeCall() {
|
||||
if (this.destroyed) {
|
||||
return;
|
||||
}
|
||||
const promises = [];
|
||||
if (Environment.platform !== 'web') {
|
||||
//Here insert a native call to ensure the promise is resolved done.
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user