Allow use of CefV8Context Enter/Exit to avoid V8RecursionScope assertions when using V8 directly (issue #708).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@805 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-09-26 17:41:44 +00:00
parent d3dafb3073
commit 790ec83c42
1 changed files with 2 additions and 0 deletions

View File

@ -502,6 +502,7 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
bool CefV8ContextImpl::Enter() {
CEF_REQUIRE_RT_RETURN(false);
WebCore::V8PerIsolateData::current()->incrementRecursionLevel();
GetHandle()->Enter();
#ifndef NDEBUG
++enter_count_;
@ -513,6 +514,7 @@ bool CefV8ContextImpl::Exit() {
CEF_REQUIRE_RT_RETURN(false);
DLOG_ASSERT(enter_count_ > 0);
GetHandle()->Exit();
WebCore::V8PerIsolateData::current()->decrementRecursionLevel();
#ifndef NDEBUG
--enter_count_;
#endif