Uplift from mozilla/fireplace#409