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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/Iterable.h

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Iterable_h 5 #ifndef Iterable_h
6 #define Iterable_h 6 #define Iterable_h
7 7
8 #include "bindings/core/v8/V8IteratorResultValue.h" 8 #include "bindings/core/v8/V8IteratorResultValue.h"
9 #include "bindings/core/v8/V8ScriptRunner.h" 9 #include "bindings/core/v8/V8ScriptRunner.h"
10 #include "core/dom/Iterator.h" 10 #include "core/dom/Iterator.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 args[2] = this_value.V8Value(); 64 args[2] = this_value.V8Value();
65 65
66 while (true) { 66 while (true) {
67 KeyType key; 67 KeyType key;
68 ValueType value; 68 ValueType value;
69 69
70 if (!source->Next(script_state, key, value, exception_state)) 70 if (!source->Next(script_state, key, value, exception_state))
71 return; 71 return;
72 72
73 ASSERT(!exception_state.HadException()); 73 DCHECK(!exception_state.HadException());
74 74
75 args[0] = ToV8(value, creation_context, isolate); 75 args[0] = ToV8(value, creation_context, isolate);
76 args[1] = ToV8(key, creation_context, isolate); 76 args[1] = ToV8(key, creation_context, isolate);
77 if (args[0].IsEmpty() || args[1].IsEmpty()) { 77 if (args[0].IsEmpty() || args[1].IsEmpty()) {
78 if (try_catch.HasCaught()) 78 if (try_catch.HasCaught())
79 exception_state.RethrowV8Exception(try_catch.Exception()); 79 exception_state.RethrowV8Exception(try_catch.Exception());
80 return; 80 return;
81 } 81 }
82 82
83 v8::Local<v8::Value> result; 83 v8::Local<v8::Value> result;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 public: 179 public:
180 Iterator* GetIterator(ScriptState* script_state, 180 Iterator* GetIterator(ScriptState* script_state,
181 ExceptionState& exception_state) { 181 ExceptionState& exception_state) {
182 return this->entriesForBinding(script_state, exception_state); 182 return this->entriesForBinding(script_state, exception_state);
183 } 183 }
184 }; 184 };
185 185
186 } // namespace blink 186 } // namespace blink
187 187
188 #endif // Iterable_h 188 #endif // Iterable_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698