mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 04:59:26 +02:00
pastojs: fixed calling destructor after exception in constructor
git-svn-id: trunk@40116 -
This commit is contained in:
parent
9c2ac7b3dd
commit
ff431f0106
8
utils/pas2js/dist/rtl.js
vendored
8
utils/pas2js/dist/rtl.js
vendored
@ -279,8 +279,8 @@ var rtl = {
|
||||
o.AfterConstruction();
|
||||
} catch($e){
|
||||
// do not call BeforeDestruction
|
||||
if (this.Destroy) this.Destroy();
|
||||
this.$final();
|
||||
if (o.Destroy) o.Destroy();
|
||||
o.$final();
|
||||
throw $e;
|
||||
}
|
||||
return o;
|
||||
@ -314,8 +314,8 @@ var rtl = {
|
||||
if (o.AfterConstruction) o.AfterConstruction();
|
||||
} catch($e){
|
||||
// do not call BeforeDestruction
|
||||
if (this.Destroy) this.Destroy();
|
||||
if (this.$final) this.$final();
|
||||
if (o.Destroy) o.Destroy();
|
||||
if (o.$final) this.$final();
|
||||
throw $e;
|
||||
}
|
||||
return o;
|
||||
|
Loading…
Reference in New Issue
Block a user