Merge change 4527 into donut

* changes:
  Fix Canvas.finalize() for the case where the constructor throws an exception before the native canvas instance was created.