Sync GWT emulation with changes in f3b2d34