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:
parent
d3dafb3073
commit
790ec83c42
|
@ -502,6 +502,7 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
||||||
|
|
||||||
bool CefV8ContextImpl::Enter() {
|
bool CefV8ContextImpl::Enter() {
|
||||||
CEF_REQUIRE_RT_RETURN(false);
|
CEF_REQUIRE_RT_RETURN(false);
|
||||||
|
WebCore::V8PerIsolateData::current()->incrementRecursionLevel();
|
||||||
GetHandle()->Enter();
|
GetHandle()->Enter();
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
++enter_count_;
|
++enter_count_;
|
||||||
|
@ -513,6 +514,7 @@ bool CefV8ContextImpl::Exit() {
|
||||||
CEF_REQUIRE_RT_RETURN(false);
|
CEF_REQUIRE_RT_RETURN(false);
|
||||||
DLOG_ASSERT(enter_count_ > 0);
|
DLOG_ASSERT(enter_count_ > 0);
|
||||||
GetHandle()->Exit();
|
GetHandle()->Exit();
|
||||||
|
WebCore::V8PerIsolateData::current()->decrementRecursionLevel();
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
--enter_count_;
|
--enter_count_;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue