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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp

Issue 2625643002: Don't try to correctly notify V8 from the plugin interceptor (Closed)
Patch Set: updates Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/plugins/simple-expando.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
index 6404f1361fae6d2a11dd421c2c8953055e0d0dfc..bb9a760dae043de310782cde3815b9621227d1f6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -82,22 +82,25 @@ void setScriptableObjectProperty(
HTMLPlugInElement* impl = ElementType::toImpl(info.Holder());
RefPtr<SharedPersistent<v8::Object>> wrapper = impl->pluginWrapper();
- v8::Local<v8::Object> instance;
- if (wrapper)
- instance = wrapper->newLocal(info.GetIsolate());
- if (!instance.IsEmpty()) {
- // FIXME: The gTalk pepper plugin is the only plugin to make use of
- // SetProperty and that is being deprecated. This can be removed as soon as
- // it goes away.
- // Call SetProperty on a pepper plugin's scriptable object. Note that we
- // never set the return value here which would indicate that the plugin has
- // intercepted the SetProperty call, which means that the property on the
- // DOM element will also be set. For plugin's that don't intercept the call
- // (all except gTalk) this makes no difference at all. For gTalk the fact
- // that the property on the DOM element also gets set is inconsequential.
- v8CallBoolean(instance->CreateDataProperty(
- info.GetIsolate()->GetCurrentContext(), v8Name, value));
- }
+ if (!wrapper)
+ return;
+
+ v8::Local<v8::Object> instance = wrapper->newLocal(info.GetIsolate());
+
+ if (instance.IsEmpty())
+ return;
+
+ // FIXME: The gTalk pepper plugin is the only plugin to make use of
+ // SetProperty and that is being deprecated. This can be removed as soon as
+ // it goes away.
+ // Call SetProperty on a pepper plugin's scriptable object. Note that we
+ // never set the return value here which would indicate that the plugin has
+ // intercepted the SetProperty call, which means that the property on the
+ // DOM element will also be set. For plugin's that don't intercept the call
+ // (all except gTalk) this makes no difference at all. For gTalk the fact
+ // that the property on the DOM element also gets set is inconsequential.
+ v8CallBoolean(instance->CreateDataProperty(
+ info.GetIsolate()->GetCurrentContext(), v8Name, value));
v8SetReturnValue(info, value);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/plugins/simple-expando.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698