Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2810)

Unified Diff: content/renderer/pepper/plugin_object.cc

Issue 1821103002: Migrate a bunch of LayoutTests from NPAPI to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_open-and-close-window-with-plugin
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/plugin_object.cc
diff --git a/content/renderer/pepper/plugin_object.cc b/content/renderer/pepper/plugin_object.cc
index 3fb63795de43b5dc1f275b4913cf0ede464b154c..cb5ff6af9bbd924ae918b87e196c2b130afb5cc6 100644
--- a/content/renderer/pepper/plugin_object.cc
+++ b/content/renderer/pepper/plugin_object.cc
@@ -146,8 +146,12 @@ bool PluginObject::SetNamedProperty(v8::Isolate* isolate,
std::vector<std::string> PluginObject::EnumerateNamedProperties(
v8::Isolate* isolate) {
std::vector<std::string> result;
- if (!instance_)
+ if (!instance_) {
+ std::string error = "Plugin object deleted";
+ isolate->ThrowException(
+ v8::Exception::ReferenceError(gin::StringToV8(isolate, error)));
return result;
+ }
V8VarConverter var_converter(instance_->pp_instance(),
V8VarConverter::kAllowObjectVars);

Powered by Google App Engine
This is Rietveld 408576698