Bug 840012 - Handle OOM in CreateThisForFunction (r=hannes)

--HG--
extra : rebase_source : 0a4cf9d0eb6373ff61f21dd386c103854236e0d1