String::NewExternal should not crash the renderer.
authorloislo@chromium.org <loislo@chromium.org>
Fri, 26 Sep 2014 11:14:09 +0000 (11:14 +0000)
committerloislo@chromium.org <loislo@chromium.org>
Fri, 26 Sep 2014 11:14:09 +0000 (11:14 +0000)
commitb9583b5f988cb6b8f369fe9c64b1b6db58c86589
treeab1f13988b63fd3a5fd62ea43155eb6777484daa
parent9372ecc8617ab59aa7e2ec9daccc8513d175b820
String::NewExternal should not crash the renderer.

The blink may pass a very long string to v8
for making a handle to it. v8 has max string length
limit and creates exception. But NewExternal code does not
check that the handle is null and crashes the renderer.

With the fix the js code receives the exception.

BUG=414615
LOG=N
R=yangguo@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/603393004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/api.cc
test/cctest/test-api.cc