FrustrationOntario has a statute dealing with contracts that are frustrated by events [ie. "... become impossible of performance or been otherwise frustrated and to the parties which for that reason have been discharged": FCA 2(1)].
Frustrated Contracts Act
. Fram Elgin Mills 90 Inc. v. Romandale Farms Limited
In Fram Elgin Mills 90 Inc. v. Romandale Farms Limited (Ont CA, 2021) the Court of Appeal sets out the doctrine of frustration:
B. Governing Legal Principles. ACT Greenwood Ltd. v. Desjardins-McLeod
 A contract is frustrated when – without the fault of either party – a supervening event alters the nature of a party’s obligations under the contract “to such an extent that to compel performance despite the new and changed circumstances would be to order [the party] to do something radically different from what the parties agreed to under [their] contract”: Naylor Group Inc. v. Ellis-Don Construction Ltd., 2001 SCC 58,  2 S.C.R. 943, at para. 55; Perkins v. Sheikhtavi, 2019 ONCA 925, 16 R.P.R. (6th) 42, at para. 15.
 However, a contract is not frustrated if the supervening event results from a voluntary act of one of the parties or if the parties contemplated the supervening event at the time of contracting and provided for, or deliberately chose not to provide for, the event in the contract: Perkins, at para. 16; Capital Quality Homes, at p. 626.
 The party claiming frustration bears the burden of proving the constituent elements necessary to establish frustration: Perkins, at para. 17.
In ACT Greenwood Ltd. v. Desjardins-McLeod (Ont CA, 2019) the Court of Appeal commented on the law of frustration as follows:
 Second, the law of frustration requires that there be a radical change in the nature of the parties’ contractual obligations, arising from a situation which the parties had not contemplated in the formation of the contract: see Naylor Group Inc. v. Ellis-Don Construction Ltd., 2001 SCC 58,  2 S.C.R. 943, at paras. 53-56. In G.H.L. Fridman, The Law of Contract in Canada, 6th ed. (Toronto: Carswell, 2011), at p. 619, the author writes:. Perkins v. Sheikhtavi
From the decided cases to which reference has been made it is deducible that the basis of frustration is impossibility. By this is meant physical impossibility and impossibility resulting from a legal development that has rendered the contract no longer a lawful one. However, frustration goes further, and comprehends situations where the contract may be both physically and legally capable of being performed but would be totally different from what the parties intended were it performed after the change that has occurred. [Citations omitted, emphasis added.]
In Perkins v. Sheikhtavi (Ont CA, 2019) the Court of Appeal commented as follows on frustration of contract, here in a real estate context:
 Frustration applies to contracts including real estate transactions, when a supervening event alters the nature of the appellant’s obligation to contract with the respondent to such an extent that to compel performance despite the new and changed circumstances would be to order the appellant to do something radically different from what the parties agree to under their contract: Naylor, at para. 55.
 A contract is not frustrated if the supervening event was contemplated by the parties at the time of contracting and was provided for or deliberately chosen not to be provided for in the contract: Capital Quality Homes Ltd. v. Colwyn Construction Ltd. (1975), 1975 CanLII 726 (ON CA), 9 O.R. (2d) 617 (C.A.), at p. 626.
 A party claiming that a contract has been frustrated has the onus of proving the constituent elements necessary to establish frustration: Bang v. Sebastian, 2018 ONSC 6226 (CanLII), at para. 30; Gerstel v. Kelman, 2015 ONSC 978 (CanLII), 40 B.L.R. (5th) 314.