mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-27 09:28:01 +01:00
Fix potential crash if a context with no bindings is released (issue #736).
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1271@903 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
358faf993a
commit
205b7c7a95
@ -88,9 +88,6 @@ class CefV8TrackManager {
|
|||||||
|
|
||||||
v8::Handle<v8::Object> object = context->Global();
|
v8::Handle<v8::Object> object = context->Global();
|
||||||
v8::Handle<v8::Value> value = object->GetHiddenValue(context_state_key_);
|
v8::Handle<v8::Value> value = object->GetHiddenValue(context_state_key_);
|
||||||
if (value.IsEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!value.IsEmpty())
|
if (!value.IsEmpty())
|
||||||
return static_cast<CefV8ContextState*>(v8::External::Unwrap(value));
|
return static_cast<CefV8ContextState*>(v8::External::Unwrap(value));
|
||||||
|
|
||||||
@ -122,6 +119,9 @@ class CefV8TrackManager {
|
|||||||
|
|
||||||
v8::Handle<v8::Object> object = context->Global();
|
v8::Handle<v8::Object> object = context->Global();
|
||||||
v8::Handle<v8::Value> value = object->GetHiddenValue(context_state_key_);
|
v8::Handle<v8::Value> value = object->GetHiddenValue(context_state_key_);
|
||||||
|
if (value.IsEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
scoped_refptr<CefV8ContextState> state =
|
scoped_refptr<CefV8ContextState> state =
|
||||||
static_cast<CefV8ContextState*>(v8::External::Unwrap(value));
|
static_cast<CefV8ContextState*>(v8::External::Unwrap(value));
|
||||||
state->Detach();
|
state->Detach();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user