Accessing the returnValue of a modal dialog should be performed directly on the global object.
Created attachment 136110 [details] Patch
Committed r113528: <http://trac.webkit.org/changeset/113528>