Bug 1017022 - call close() on a valid object, r=jgriffin