UK slang for being scared of something. The same as shitting it. Developed from "shitting bricks" which presumably refers to a possible effect of fear on the digestive system.