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

Side by Side Diff: chrome/renderer/extensions/chrome_v8_context.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/renderer/extensions/chrome_v8_context.h" 5 #include "chrome/renderer/extensions/chrome_v8_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 v8::Boolean::New(isolate(), success), 166 v8::Boolean::New(isolate(), success),
167 converter->ToV8Value(&response, v8_context_.NewHandle(isolate())), 167 converter->ToV8Value(&response, v8_context_.NewHandle(isolate())),
168 v8::String::NewFromUtf8(isolate(), error.c_str()) 168 v8::String::NewFromUtf8(isolate(), error.c_str())
169 }; 169 };
170 170
171 v8::Handle<v8::Value> retval = module_system_->CallModuleMethod( 171 v8::Handle<v8::Value> retval = module_system_->CallModuleMethod(
172 "sendRequest", "handleResponse", arraysize(argv), argv); 172 "sendRequest", "handleResponse", arraysize(argv), argv);
173 173
174 // In debug, the js will validate the callback parameters and return a 174 // In debug, the js will validate the callback parameters and return a
175 // string if a validation error has occured. 175 // string if a validation error has occured.
176 if (DCHECK_IS_ON()) { 176 DCHECK(retval.IsEmpty() || retval->IsUndefined())
177 if (!retval.IsEmpty() && !retval->IsUndefined()) { 177 << *v8::String::Utf8Value(retval);
178 std::string error = *v8::String::Utf8Value(retval);
179 DCHECK(false) << error;
180 }
181 }
182 } 178 }
183 179
184 } // namespace extensions 180 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | chrome/renderer/extensions/chrome_v8_context_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698