Commit afbf6358 authored by Daniel Cheng's avatar Daniel Cheng

Add parens around url/origin argument to DEBUG_ALIAS macros.

This allows more complex expressions to be used without confusing the
compiler.

TBR=mkwst@chromium.org

Change-Id: I0b6d3a9526ac932bf1a8e3f7e9b3a76e3da34927
Reviewed-on: https://chromium-review.googlesource.com/1026805
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553378}
parent e1161677
...@@ -485,6 +485,6 @@ URL_EXPORT bool operator!=(const base::StringPiece& spec, const GURL& x); ...@@ -485,6 +485,6 @@ URL_EXPORT bool operator!=(const base::StringPiece& spec, const GURL& x);
// variable named |<var_name>|. This helps ensure that the value of |url| gets // variable named |<var_name>|. This helps ensure that the value of |url| gets
// preserved in crash dumps. // preserved in crash dumps.
#define DEBUG_ALIAS_FOR_GURL(var_name, url) \ #define DEBUG_ALIAS_FOR_GURL(var_name, url) \
DEBUG_ALIAS_FOR_CSTR(var_name, url.possibly_invalid_spec().c_str(), 128) DEBUG_ALIAS_FOR_CSTR(var_name, (url).possibly_invalid_spec().c_str(), 128)
#endif // URL_GURL_H_ #endif // URL_GURL_H_
...@@ -172,7 +172,7 @@ URL_EXPORT bool IsSameOriginWith(const GURL& a, const GURL& b); ...@@ -172,7 +172,7 @@ URL_EXPORT bool IsSameOriginWith(const GURL& a, const GURL& b);
// stack-allocated variable named |<var_name>|. This helps ensure that the // stack-allocated variable named |<var_name>|. This helps ensure that the
// value of |origin| gets preserved in crash dumps. // value of |origin| gets preserved in crash dumps.
#define DEBUG_ALIAS_FOR_ORIGIN(var_name, origin) \ #define DEBUG_ALIAS_FOR_ORIGIN(var_name, origin) \
DEBUG_ALIAS_FOR_CSTR(var_name, origin.Serialize().c_str(), 128) DEBUG_ALIAS_FOR_CSTR(var_name, (origin).Serialize().c_str(), 128)
} // namespace url } // namespace url
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment