From 1177da898b608b5a01fbd56440f0da8cd073afac Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 5 Nov 2012 22:32:57 +0000 Subject: [PATCH] Fix potential crash if a context with no bindings is released (issue #736). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@900 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/libcef/v8_impl.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cef1/libcef/v8_impl.cc b/cef1/libcef/v8_impl.cc index a46a84de8..b39a958a4 100644 --- a/cef1/libcef/v8_impl.cc +++ b/cef1/libcef/v8_impl.cc @@ -121,6 +121,9 @@ class CefV8TrackManager { v8::Handle object = context->Global(); v8::Handle value = object->GetHiddenValue(context_state_key_); + if (value.IsEmpty()) + return; + scoped_refptr state = static_cast(v8::External::Unwrap(value)); state->Detach();