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

Unified Diff: Source/core/loader/EmptyClients.cpp

Issue 1291903003: Oilpan: Move ChromeClient classes into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a raw reference in InspectorOverlayImpl.cpp. Created 5 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 | « Source/core/loader/EmptyClients.h ('k') | Source/core/page/Page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/EmptyClients.cpp
diff --git a/Source/core/loader/EmptyClients.cpp b/Source/core/loader/EmptyClients.cpp
index 597dd4306bb947e63c5ef782cdaffddc9c02875e..8c9f15e3e66d825fb235b1f907eb057bf08477a7 100644
--- a/Source/core/loader/EmptyClients.cpp
+++ b/Source/core/loader/EmptyClients.cpp
@@ -45,20 +45,20 @@ namespace blink {
void fillWithEmptyClients(Page::PageClients& pageClients)
{
- static ChromeClient* dummyChromeClient = adoptPtr(new EmptyChromeClient).leakPtr();
- pageClients.chromeClient = dummyChromeClient;
+ DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ChromeClient>, dummyChromeClient, (EmptyChromeClient::create()));
+ pageClients.chromeClient = dummyChromeClient.get();
- static ContextMenuClient* dummyContextMenuClient = adoptPtr(new EmptyContextMenuClient).leakPtr();
- pageClients.contextMenuClient = dummyContextMenuClient;
+ DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ());
+ pageClients.contextMenuClient = &dummyContextMenuClient;
- static DragClient* dummyDragClient = adoptPtr(new EmptyDragClient).leakPtr();
- pageClients.dragClient = dummyDragClient;
+ DEFINE_STATIC_LOCAL(EmptyDragClient, dummyDragClient, ());
+ pageClients.dragClient = &dummyDragClient;
- static EditorClient* dummyEditorClient = adoptPtr(new EmptyEditorClient).leakPtr();
- pageClients.editorClient = dummyEditorClient;
+ DEFINE_STATIC_LOCAL(EmptyEditorClient, dummyEditorClient, ());
+ pageClients.editorClient = &dummyEditorClient;
- static SpellCheckerClient* dummySpellCheckerClient = adoptPtr(new EmptySpellCheckerClient).leakPtr();
- pageClients.spellCheckerClient = dummySpellCheckerClient;
+ DEFINE_STATIC_LOCAL(EmptySpellCheckerClient, dummySpellCheckerClient, ());
+ pageClients.spellCheckerClient = &dummySpellCheckerClient;
}
class EmptyPopupMenu : public PopupMenu {
« no previous file with comments | « Source/core/loader/EmptyClients.h ('k') | Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698