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

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

Issue 2493343002: Remove legacy callers for HTMLEmbedElement and HTMLObjectElement (Closed)
Patch Set: fix another test Created 3 years, 10 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 bb9a760dae043de310782cde3815b9621227d1f6..08fe5d3be5dea4306d6c5d4cb223d270ecd5974e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -132,47 +132,4 @@ void V8HTMLObjectElement::namedPropertySetterCustom(
setScriptableObjectProperty<V8HTMLObjectElement>(name, value, info);
}
-namespace {
-
-template <typename ElementType>
-void invokeOnScriptableObject(const v8::FunctionCallbackInfo<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());
- if (instance.IsEmpty())
- return;
-
- std::unique_ptr<v8::Local<v8::Value>[]> arguments =
- wrapArrayUnique(new v8::Local<v8::Value>[ info.Length() ]);
- for (int i = 0; i < info.Length(); ++i)
- arguments[i] = info[i];
-
- v8::Local<v8::Value> retVal;
- if (!instance
- ->CallAsFunction(info.GetIsolate()->GetCurrentContext(),
- info.Holder(), info.Length(), arguments.get())
- .ToLocal(&retVal))
- return;
- v8SetReturnValue(info, retVal);
-}
-
-} // namespace
-
-void V8HTMLEmbedElement::legacyCallCustom(
- const v8::FunctionCallbackInfo<v8::Value>& info) {
- invokeOnScriptableObject<V8HTMLEmbedElement>(info);
- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()),
- UseCounter::HTMLEmbedElementLegacyCall);
-}
-
-void V8HTMLObjectElement::legacyCallCustom(
- const v8::FunctionCallbackInfo<v8::Value>& info) {
- invokeOnScriptableObject<V8HTMLObjectElement>(info);
- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()),
- UseCounter::HTMLObjectElementLegacyCall);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698