It is a saying that children use to make a promise. They will draw an X over their heart with their finger and say "Cross my heart, hope to die." They may also add "stick a needle in my eye." to make the promise stronger. This shows that they are extremely serious about it.