I actually don't really think deeply how she would save herself from magma but if Oda decided to do so then she will just do it like Moria collect all the shadow especially if She's awaken already.
My guess is that BMP who were stuck under the waterfall rescued her somehow.