From 790ec83c4292a5b373f9a5b56c603992984ce48e Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 26 Sep 2012 17:41:44 +0000 Subject: [PATCH] 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 --- libcef/renderer/v8_impl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index bd67a40ff..a2367f35d 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -502,6 +502,7 @@ CefRefPtr 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