Index: content/renderer/pepper/ppb_var_deprecated_impl.cc |
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc |
index def6a8d50069d7fecf783f86a97067f7d32b795d..c5a93e2f38960f4590c24a726b5bfe96625ebec2 100644 |
--- a/content/renderer/pepper/ppb_var_deprecated_impl.cc |
+++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc |
@@ -303,7 +303,10 @@ bool IsInstanceOfDeprecated(PP_Var var, |
return false; // Not an object at all. |
v8::HandleScope handle_scope(object->instance()->GetIsolate()); |
- v8::Context::Scope context_scope(object->instance()->GetMainWorldContext()); |
+ v8::Handle<v8::Context> context = object->instance()->GetMainWorldContext(); |
+ if (context.IsEmpty()) |
+ return false; |
+ v8::Context::Scope context_scope(context); |
PluginObject* plugin_object = PluginObject::FromV8Object( |
object->instance()->GetIsolate(), object->GetHandle()); |
if (plugin_object && plugin_object->ppp_class() == ppp_class) { |