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

Unified Diff: extensions/renderer/resources/binding.js

Issue 842523002: base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/resources/binding.js
diff --git a/extensions/renderer/resources/binding.js b/extensions/renderer/resources/binding.js
index 9804b617a4f3fb24a6f0ec26a7adbecd1a57c917..2c0ae58d4a0775fc2e3c500d84be830c84bd5b48 100644
--- a/extensions/renderer/resources/binding.js
+++ b/extensions/renderer/resources/binding.js
@@ -317,7 +317,7 @@ Binding.prototype = {
// TODO(aa): It would be best to run this in a unit test, but in order
// to do that we would need to better factor this code so that it
// doesn't depend on so much v8::Extension machinery.
- if (logging.DCHECK_IS_ON() &&
+ if (!logging.DCHECK_IS_OFF() &&
schemaUtils.isFunctionSignatureAmbiguous(apiFunction.definition)) {
throw new Error(
apiFunction.name + ' has ambiguous optional arguments. ' +
@@ -355,7 +355,7 @@ Binding.prototype = {
sendRequestHandler.clearCalledSendRequest();
// Validate return value if in sanity check mode.
- if (logging.DCHECK_IS_ON() && this.definition.returns)
+ if (!logging.DCHECK_IS_OFF() && this.definition.returns)
schemaUtils.validate([retval], [this.definition.returns]);
return retval;
}, apiFunction);

Powered by Google App Engine
This is Rietveld 408576698