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

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

Issue 1916283003: [K6] Replace bind() + GCed pointers with retainedRef() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_5c
Patch Set: Rebase Created 4 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 unified diff | Download patch
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 259
260 void InspectorDatabaseAgent::enable(ErrorString*) 260 void InspectorDatabaseAgent::enable(ErrorString*)
261 { 261 {
262 if (m_enabled) 262 if (m_enabled)
263 return; 263 return;
264 m_enabled = true; 264 m_enabled = true;
265 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); 265 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled);
266 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) 266 if (DatabaseClient* client = DatabaseClient::fromPage(m_page))
267 client->setInspectorAgent(this); 267 client->setInspectorAgent(this);
268 DatabaseTracker::tracker().forEachOpenDatabaseInPage(m_page, bind<blink::Dat abase*>(&InspectorDatabaseAgent::registerDatabaseOnCreation, this)); 268 DatabaseTracker::tracker().forEachOpenDatabaseInPage(m_page, bind<blink::Dat abase*>(&InspectorDatabaseAgent::registerDatabaseOnCreation, retainedRef(this))) ;
269 } 269 }
270 270
271 void InspectorDatabaseAgent::disable(ErrorString*) 271 void InspectorDatabaseAgent::disable(ErrorString*)
272 { 272 {
273 if (!m_enabled) 273 if (!m_enabled)
274 return; 274 return;
275 m_enabled = false; 275 m_enabled = false;
276 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); 276 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled);
277 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) 277 if (DatabaseClient* client = DatabaseClient::fromPage(m_page))
278 client->setInspectorAgent(nullptr); 278 client->setInspectorAgent(nullptr);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 DEFINE_TRACE(InspectorDatabaseAgent) 347 DEFINE_TRACE(InspectorDatabaseAgent)
348 { 348 {
349 visitor->trace(m_page); 349 visitor->trace(m_page);
350 visitor->trace(m_resources); 350 visitor->trace(m_resources);
351 InspectorBaseAgent::trace(visitor); 351 InspectorBaseAgent::trace(visitor);
352 } 352 }
353 353
354 } // namespace blink 354 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp ('k') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698