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

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

Issue 2813433002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in modules/webdatabase (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in modules/webdatabase Created 3 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
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (InspectorDatabaseResource* resource = 245 if (InspectorDatabaseResource* resource =
246 FindByFileName(database->FileName())) { 246 FindByFileName(database->FileName())) {
247 resource->SetDatabase(database); 247 resource->SetDatabase(database);
248 return; 248 return;
249 } 249 }
250 250
251 InspectorDatabaseResource* resource = 251 InspectorDatabaseResource* resource =
252 InspectorDatabaseResource::Create(database, domain, name, version); 252 InspectorDatabaseResource::Create(database, domain, name, version);
253 resources_.Set(resource->Id(), resource); 253 resources_.Set(resource->Id(), resource);
254 // Resources are only bound while visible. 254 // Resources are only bound while visible.
255 ASSERT(enabled_ && GetFrontend()); 255 DCHECK(enabled_);
256 DCHECK(GetFrontend());
256 resource->Bind(GetFrontend()); 257 resource->Bind(GetFrontend());
257 } 258 }
258 259
259 void InspectorDatabaseAgent::DidCommitLoadForLocalFrame(LocalFrame* frame) { 260 void InspectorDatabaseAgent::DidCommitLoadForLocalFrame(LocalFrame* frame) {
260 // FIXME(dgozman): adapt this for out-of-process iframes. 261 // FIXME(dgozman): adapt this for out-of-process iframes.
261 if (frame != page_->MainFrame()) 262 if (frame != page_->MainFrame())
262 return; 263 return;
263 264
264 resources_.Clear(); 265 resources_.Clear();
265 } 266 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return it->value->GetDatabase(); 366 return it->value->GetDatabase();
366 } 367 }
367 368
368 DEFINE_TRACE(InspectorDatabaseAgent) { 369 DEFINE_TRACE(InspectorDatabaseAgent) {
369 visitor->Trace(page_); 370 visitor->Trace(page_);
370 visitor->Trace(resources_); 371 visitor->Trace(resources_);
371 InspectorBaseAgent::Trace(visitor); 372 InspectorBaseAgent::Trace(visitor);
372 } 373 }
373 374
374 } // namespace blink 375 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698