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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/Dictionary.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return nullptr; 89 return nullptr;
90 return DictionaryIterator(v8::Local<v8::Object>::Cast(iterator), isolate_); 90 return DictionaryIterator(v8::Local<v8::Object>::Cast(iterator), isolate_);
91 } 91 }
92 92
93 bool Dictionary::Get(const StringView& key, Dictionary& value) const { 93 bool Dictionary::Get(const StringView& key, Dictionary& value) const {
94 v8::Local<v8::Value> v8_value; 94 v8::Local<v8::Value> v8_value;
95 if (!Get(key, v8_value)) 95 if (!Get(key, v8_value))
96 return false; 96 return false;
97 97
98 if (v8_value->IsObject()) { 98 if (v8_value->IsObject()) {
99 ASSERT(isolate_); 99 DCHECK(isolate_);
100 ASSERT(isolate_ == v8::Isolate::GetCurrent()); 100 DCHECK_EQ(isolate_, v8::Isolate::GetCurrent());
101 // TODO(bashi,yukishiino): Should rethrow the exception. 101 // TODO(bashi,yukishiino): Should rethrow the exception.
102 // http://crbug.com/666661 102 // http://crbug.com/666661
103 DummyExceptionStateForTesting exception_state; 103 DummyExceptionStateForTesting exception_state;
104 value = Dictionary(isolate_, v8_value, exception_state); 104 value = Dictionary(isolate_, v8_value, exception_state);
105 } 105 }
106 106
107 return true; 107 return true;
108 } 108 }
109 109
110 bool Dictionary::GetInternal(const v8::Local<v8::Value>& key, 110 bool Dictionary::GetInternal(const v8::Local<v8::Value>& key,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (!string_key.Prepare(GetIsolate(), exception_state)) 196 if (!string_key.Prepare(GetIsolate(), exception_state))
197 return Vector<String>(); 197 return Vector<String>();
198 198
199 names.push_back(string_key); 199 names.push_back(string_key);
200 } 200 }
201 201
202 return names; 202 return names;
203 } 203 }
204 204
205 } // namespace blink 205 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698