V8 API: Add a missing NULL check into Isolate::GetCurrentContext().
authoryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 21 Jun 2013 12:34:47 +0000 (12:34 +0000)
committeryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 21 Jun 2013 12:34:47 +0000 (12:34 +0000)
commit7f1750580cff76a025a7800d55eca58284ae6531
tree8783ab4149216f6d3fbceb99fff0e43eb529308e
parent04e1278529d8bfa5e098261c0a2fdfc270204c5b
V8 API: Add a missing NULL check into Isolate::GetCurrentContext().

There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

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

Patch from Andrey Adaykin <aandrey@chromium.org>.

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