Robert would have had him killed.
He was struck with grief. He just lost the woman he loved, the woman stolen from him, that was kept hostage and raped repeatedly (so he believes). Her captor was a Targaryen. She died birthing the child of these atrocities. He would then blame the child for her death, and he would seek vengence.
I doubt he would kill the child himself, but he would definitely make the order.
Think about the fact that Ned kept this lie a secret all those years. Tarnishing his name, his lady wife's name, his honor, and the quality of life that Jon would have. All because he and Lyanna believed that Robert would kill Jon.
Let's not forget about him beating his hands bloody when he found out his first son with Cersei died. This illustrates his inability to act in a calm way when he is emotional. He looses it, and hurts himself. I don't believe he would be able to control his rage, not even with Ned. He even says about himself "back then all I wanted was to Crack skulls and f*** girls", illustrating his volitility. Violence was his answer for settling everything.
Lyanna's death hurt him so deeply he dreams about killing Rhaegar every night for the next 15 years, and it still isn't enough. He is still as full of rage as when it happened.
It isn't until his deathbed that he has a moment of remorse and calls off the order to kill Dany.
I don't think he would have killed Jon because of the threat he posed to his kingship, he would have killed him because Jon killed Lyanna. She is what the war was over, not the iron throne.
Even if he came to regret the order to kill Jon, his massive level of pride would have prevented his withdrawing the order.