Merge "Change the CHECK failure into function failure." into oc-dev
am: bf6e949727

Change-Id: Ic374fc076cc9584c375618a57371669c23aff539