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

Side by Side Diff: third_party/WebKit/Source/modules/storage/Storage.cpp

Issue 2811523002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in modules/storage (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/storage/StorageArea.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void Storage::NamedPropertyEnumerator(Vector<String>& names, 75 void Storage::NamedPropertyEnumerator(Vector<String>& names,
76 ExceptionState& exception_state) { 76 ExceptionState& exception_state) {
77 unsigned length = this->length(exception_state); 77 unsigned length = this->length(exception_state);
78 if (exception_state.HadException()) 78 if (exception_state.HadException())
79 return; 79 return;
80 names.Resize(length); 80 names.Resize(length);
81 for (unsigned i = 0; i < length; ++i) { 81 for (unsigned i = 0; i < length; ++i) {
82 String key = this->key(i, exception_state); 82 String key = this->key(i, exception_state);
83 if (exception_state.HadException()) 83 if (exception_state.HadException())
84 return; 84 return;
85 ASSERT(!key.IsNull()); 85 DCHECK(!key.IsNull());
86 String val = getItem(key, exception_state); 86 String val = getItem(key, exception_state);
87 if (exception_state.HadException()) 87 if (exception_state.HadException())
88 return; 88 return;
89 names[i] = key; 89 names[i] = key;
90 } 90 }
91 } 91 }
92 92
93 bool Storage::NamedPropertyQuery(const AtomicString& name, 93 bool Storage::NamedPropertyQuery(const AtomicString& name,
94 ExceptionState& exception_state) { 94 ExceptionState& exception_state) {
95 if (name == "length") 95 if (name == "length")
96 return false; 96 return false;
97 bool found = Contains(name, exception_state); 97 bool found = Contains(name, exception_state);
98 if (exception_state.HadException() || !found) 98 if (exception_state.HadException() || !found)
99 return false; 99 return false;
100 return true; 100 return true;
101 } 101 }
102 102
103 DEFINE_TRACE(Storage) { 103 DEFINE_TRACE(Storage) {
104 visitor->Trace(storage_area_); 104 visitor->Trace(storage_area_);
105 ContextClient::Trace(visitor); 105 ContextClient::Trace(visitor);
106 } 106 }
107 107
108 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/storage/StorageArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698