Bug 1065933 - Use custom error code when frames close unexpectedly. r=jgriffin