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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.h

Issue 2901453002: Move PreFinalizer to WebPluginContainerImpl. (Closed)
Patch Set: Created 3 years, 7 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/Source/core/exported/WebPluginContainerBase.h ('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/web/WebPluginContainerImpl.h
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.h b/third_party/WebKit/Source/web/WebPluginContainerImpl.h
index 39eb25ba79c3729b1e19a2fd46f4ec527b652619..12bcd57ac4013cdf2800ac038ffd96affcacd72f 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.h
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.h
@@ -61,6 +61,8 @@ struct WebPrintParams;
struct WebPrintPresetOptions;
class WEB_EXPORT WebPluginContainerImpl final : public WebPluginContainerBase {
+ USING_PRE_FINALIZER(WebPluginContainerImpl, PreFinalize);
+
public:
static WebPluginContainerImpl* Create(HTMLPlugInElement* element,
WebPlugin* web_plugin) {
@@ -173,6 +175,9 @@ class WEB_EXPORT WebPluginContainerImpl final : public WebPluginContainerBase {
void DidFailLoading(const ResourceError&) override;
DECLARE_VIRTUAL_TRACE();
+ // USING_PRE_FINALIZER does not allow for virtual dispatch from the finalizer
+ // method. Here we call Dispose() which does the correct virtual dispatch.
+ void PreFinalize() { Dispose(); }
haraken 2017/05/22 04:54:56 Would it be clearer if: - Introduce DisposePlugin
void Dispose() override;
private:
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebPluginContainerBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698