Your employer can file H1b application
You employer can file H1b application for you when you are in US. If you never been out of status here, and didn't use up your 6-year H1b time either, you should have no problems.
If USCIS approve your case, they will mail you the new H1b approval (along with the new I-94). -- BUT to switch back to H1b status, you need to leave US and apply for the H1b visa in a US consulate and then use the new H1b visa to enter US. Then a deny on your 485 doesn't force you to leave.
But, You don't have to worry much about this, USCIS usually won't deny I-485 directly if I-140 is approved. If there are problems, they'll ask for more documents.