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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h

Issue 1893203004: [DevTools] Fix leak in InspectorDatabaseAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static InspectorDatabaseAgent* create(Page* page) 51 static InspectorDatabaseAgent* create(Page* page)
52 { 52 {
53 return new InspectorDatabaseAgent(page); 53 return new InspectorDatabaseAgent(page);
54 } 54 }
55 ~InspectorDatabaseAgent() override; 55 ~InspectorDatabaseAgent() override;
56 DECLARE_VIRTUAL_TRACE(); 56 DECLARE_VIRTUAL_TRACE();
57 57
58 void disable(ErrorString*) override; 58 void disable(ErrorString*) override;
59 void restore() override; 59 void restore() override;
60 void didCommitLoadForLocalFrame(LocalFrame*) override; 60 void didCommitLoadForLocalFrame(LocalFrame*) override;
61 void discardAgent() override;
61 62
62 // Called from the front-end. 63 // Called from the front-end.
63 void enable(ErrorString*) override; 64 void enable(ErrorString*) override;
64 void getDatabaseTableNames(ErrorString*, const String& databaseId, OwnPtr<pr otocol::Array<String>>* names) override; 65 void getDatabaseTableNames(ErrorString*, const String& databaseId, OwnPtr<pr otocol::Array<String>>* names) override;
65 void executeSQL(ErrorString*, const String& databaseId, const String& query, PassOwnPtr<ExecuteSQLCallback>) override; 66 void executeSQL(ErrorString*, const String& databaseId, const String& query, PassOwnPtr<ExecuteSQLCallback>) override;
66 67
67 void didOpenDatabase(blink::Database*, const String& domain, const String& n ame, const String& version); 68 void didOpenDatabase(blink::Database*, const String& domain, const String& n ame, const String& version);
68 private: 69 private:
69 explicit InspectorDatabaseAgent(Page*); 70 explicit InspectorDatabaseAgent(Page*);
70 void registerDatabaseOnCreation(blink::Database*); 71 void registerDatabaseOnCreation(blink::Database*);
71 72
72 blink::Database* databaseForId(const String& databaseId); 73 blink::Database* databaseForId(const String& databaseId);
73 InspectorDatabaseResource* findByFileName(const String& fileName); 74 InspectorDatabaseResource* findByFileName(const String& fileName);
74 75
75 Member<Page> m_page; 76 Member<Page> m_page;
76 typedef HeapHashMap<String, Member<InspectorDatabaseResource>> DatabaseResou rcesHeapMap; 77 typedef HeapHashMap<String, Member<InspectorDatabaseResource>> DatabaseResou rcesHeapMap;
77 DatabaseResourcesHeapMap m_resources; 78 DatabaseResourcesHeapMap m_resources;
78 bool m_enabled; 79 bool m_enabled;
79 }; 80 };
80 81
81 } // namespace blink 82 } // namespace blink
82 83
83 #endif // !defined(InspectorDatabaseAgent_h) 84 #endif // !defined(InspectorDatabaseAgent_h)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698