mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Replace JSBindingHandler with a new V8ContextHandler interface that contains callbacks for V8 context creation and release (issue #359).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@392 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -470,6 +470,22 @@ bool CefV8ContextImpl::Exit()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefV8ContextImpl::IsSame(CefRefPtr<CefV8Context> that)
|
||||
{
|
||||
CEF_REQUIRE_UI_THREAD(false);
|
||||
|
||||
v8::HandleScope handle_scope;
|
||||
|
||||
v8::Local<v8::Context> thatHandle;
|
||||
v8::Local<v8::Context> thisHandle = GetContext();
|
||||
|
||||
CefV8ContextImpl *impl = static_cast<CefV8ContextImpl*>(that.get());
|
||||
if (impl)
|
||||
thatHandle = impl->GetContext();
|
||||
|
||||
return (thisHandle == thatHandle);
|
||||
}
|
||||
|
||||
v8::Local<v8::Context> CefV8ContextImpl::GetContext()
|
||||
{
|
||||
return v8::Local<v8::Context>::New(v8_context_->GetHandle());
|
||||
|
Reference in New Issue
Block a user