Framesets have been deprecated and are not supported in HTML5 any more. When I tried this code, IE9 automatically switched to Quirks mode (to support the same probably) and threw error. In Quirks mode Canvas is not supported probably.
In my case adding < !DOCTYPE html> to the top of page containing frameset fixed the issue. But it is not suggested to use framesets anymore.