I honestly don't know how China would react. I think it highly depends on the extent of this hypothetical (hopefully it stays that way) war in the Middle East. I mean, is it a few bombings here and there? Then surely nothing much will happen; the Chinese definitely won't get into an actual open war with the US just for Teheran. If it escalates into something much bigger with numerous countries involved in actual warfare though, I don't think China will be just watching and doing nothing other than asking everyone to stop fighting; at some point they'd have to think about protecting both their current investments and their geopolitical and economical interests in the region. Hope it doesn't come to that, but I do think that a huge conflict is unavoidable in the near future, one way or the other.