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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 Database* database = nullptr; 51 Database* database = nullptr;
52 DatabaseManager& db_manager = DatabaseManager::Manager(); 52 DatabaseManager& db_manager = DatabaseManager::Manager();
53 DatabaseError error = DatabaseError::kNone; 53 DatabaseError error = DatabaseError::kNone;
54 if (RuntimeEnabledFeatures::databaseEnabled() && 54 if (RuntimeEnabledFeatures::databaseEnabled() &&
55 window.document()->GetSecurityOrigin()->CanAccessDatabase()) { 55 window.document()->GetSecurityOrigin()->CanAccessDatabase()) {
56 String error_message; 56 String error_message;
57 database = db_manager.OpenDatabase(window.document(), name, version, 57 database = db_manager.OpenDatabase(window.document(), name, version,
58 display_name, estimated_size, 58 display_name, estimated_size,
59 creation_callback, error, error_message); 59 creation_callback, error, error_message);
60 ASSERT(database || error != DatabaseError::kNone); 60 DCHECK(database || error != DatabaseError::kNone);
61 if (error != DatabaseError::kNone) 61 if (error != DatabaseError::kNone)
62 DatabaseManager::ThrowExceptionForDatabaseError(error, error_message, 62 DatabaseManager::ThrowExceptionForDatabaseError(error, error_message,
63 exception_state); 63 exception_state);
64 } else { 64 } else {
65 exception_state.ThrowSecurityError( 65 exception_state.ThrowSecurityError(
66 "Access to the WebDatabase API is denied in this context."); 66 "Access to the WebDatabase API is denied in this context.");
67 } 67 }
68 68
69 return database; 69 return database;
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698