Bug 869248 - Add missing OOM check when resolving functions; r=Waldo

--HG--
extra : rebase_source : e1ba73794b8d1337c11fdce071ff03953b753ed0