-
teravest@chromium.org authored
GetPNaClResourceInfo() currently performs a 1 megabyte allocation. Though any memory allocation can fail, this one is more likely due to its size. This change mitigates this problem in two ways. If memory allocation fails, we report an error and return early instead of using memory. Additionally, this change checks the size of the file before performing a memory allocation. This should lead to smaller allocations and more successful plugin loads. BUG=370965 Review URL: https://codereview.chromium.org/274673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269791 0039d316-1c4b-4281-b951-d872f2087c98
0c4e4903