Bug 1048659 - Return the union we construct in a JS callback. r=peterv