Be aware that at some point addIceCandidate will be asynchronous (returning a Promise) and that it will be queued along with the createOffer/Answer and setLocal/RemoteDescription methods.
In WebRTC specification (editors’ draft)
The creation and use of SDP in WebRTC requires stable states in order to successfully execute the Offer/Answer (JSEP) protocol. To move cleanly from one stable state to another, operations affecting SDP need to execute in a queued manner, meaning that they will be executed in the order in which they were called. Originally only the following methods were queued: createOffer, setLocalDescription, createAnswer, and setRemoteDescription. Even though these methods are asynchronous, they will be executed in the order in which they are called.
The method addIceCandidate, used in WebRTC ICE processing, has now been added to the list of queued methods.