diff options
author | Raymes Khoury <raymes@chromium.org> | 2014-10-23 09:17:35 +1100 |
---|---|---|
committer | Raymes Khoury <raymes@chromium.org> | 2014-10-22 22:18:24 +0000 |
commit | f0b905285f507cbafa1ebcd9384921be822d6e48 (patch) | |
tree | f891da9ce01140add9c51fbb8c20550c1391d2bc /content/renderer | |
parent | f7a0305e02b34300e4441b3d7da342cda040c919 (diff) | |
download | chromium_src-f0b905285f507cbafa1ebcd9384921be822d6e48.zip chromium_src-f0b905285f507cbafa1ebcd9384921be822d6e48.tar.gz chromium_src-f0b905285f507cbafa1ebcd9384921be822d6e48.tar.bz2 |
Avoid entering an empty V8 context in PPB_Var_Deprecated IsInstanceOfDeprecated
BUG=424997
TBR=raymes@chromium.org
Review URL: https://codereview.chromium.org/664023002
Cr-Commit-Position: refs/heads/master@{#300379}
(cherry picked from commit 9db73d2637e0c8c258a42509e7a2b913775f5f14)
Review URL: https://codereview.chromium.org/668333002
Cr-Commit-Position: refs/branch-heads/2171@{#238}
Cr-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060}
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/pepper/ppb_var_deprecated_impl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc index 9f86e6b..28c9cde 100644 --- a/content/renderer/pepper/ppb_var_deprecated_impl.cc +++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc @@ -290,7 +290,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) { |