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

Unified Diff: ppapi/proxy/ppb_font_proxy.h

Issue 7629006: Make sure ppapi::WebKitForwarding::Font is deleted on the WebKit thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « no previous file | ppapi/proxy/ppb_font_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_font_proxy.h
diff --git a/ppapi/proxy/ppb_font_proxy.h b/ppapi/proxy/ppb_font_proxy.h
index 32893eade84985fba101e5bbc81e10a37223a7ea..05c0e7e20d3e277d6e13f9fd243759dd12a32117 100644
--- a/ppapi/proxy/ppb_font_proxy.h
+++ b/ppapi/proxy/ppb_font_proxy.h
@@ -75,13 +75,20 @@ class Font : public PluginResource,
uint32_t char_offset) OVERRIDE;
private:
- // Posts the given closure to the WebKit thread and waits on the
- // webkit_event_ for the task to continue.
- void RunOnWebKitThread(const base::Closure& task);
+ // Posts the given closure to the WebKit thread.
+ // If |blocking| is true, the method waits on |webkit_event_| for the task to
+ // continue.
+ void RunOnWebKitThread(bool blocking, const base::Closure& task);
+
+ static void DeleteFontForwarding(
+ ppapi::WebKitForwarding::Font* font_forwarding);
base::WaitableEvent webkit_event_;
- scoped_ptr<ppapi::WebKitForwarding::Font> font_forwarding_;
+ // This class owns |font_forwarding_|.
+ // |font_forwarding_| should always be used on the WebKit thread (including
+ // destruction).
+ ppapi::WebKitForwarding::Font* font_forwarding_;
DISALLOW_COPY_AND_ASSIGN(Font);
};
« no previous file with comments | « no previous file | ppapi/proxy/ppb_font_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698