ExternalInterface 経由で HTML 要素を削除すると、Safari が落ちる

以下の条件で WindowsSafari 3.2.2 が 100% 落ちる。

  • ExternalInterface 経由で、SWF 自身が置いてある HTML 要素を削除する。
  • フレームスクリプトで ExternalInterface を呼び出す。
  • その SWF の wmode が transparent である。

ActionScript

//in crash.swf
ExternalInterface.call("hoge");

JavaScript

var so = new SWFObject(...);//crash.swf
so.addParam("wmode", "transparent");
so.write("swfContainer");
function hoge() {
document.body.removeChild(document.getElementById("swfContainer"));
}

デモ

http://blog.kaihatsubu.com/files/safari-crash/