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

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

Issue 2855753002: Simplify HTMLPlugInElement::PluginWrapper to not use SharedPersistent. (Closed)
Patch Set: no need for mutable Created 3 years, 8 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: 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 292585f580b27aeb3c47347be26e30e6bc7e0c44..0e45e09a2067098302dd5bac8f51428086552b78 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -47,11 +47,7 @@ void GetScriptableObjectProperty(
const AtomicString& name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
HTMLPlugInElement* impl = ElementType::toImpl(info.Holder());
- RefPtr<SharedPersistent<v8::Object>> wrapper = impl->PluginWrapper();
- if (!wrapper)
- return;
-
- v8::Local<v8::Object> instance = wrapper->NewLocal(info.GetIsolate());
+ v8::Local<v8::Object> instance = impl->PluginWrapper();
if (instance.IsEmpty())
return;
@@ -76,12 +72,7 @@ void SetScriptableObjectProperty(
DCHECK(!value.IsEmpty());
HTMLPlugInElement* impl = ElementType::toImpl(info.Holder());
- RefPtr<SharedPersistent<v8::Object>> wrapper = impl->PluginWrapper();
- if (!wrapper)
- return;
-
- v8::Local<v8::Object> instance = wrapper->NewLocal(info.GetIsolate());
-
+ v8::Local<v8::Object> instance = impl->PluginWrapper();
if (instance.IsEmpty())
return;

Powered by Google App Engine
This is Rietveld 408576698