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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Maybe.h

Issue 2001893002: DevTools: expose raw pointers in protocol collections, s/ASSERT/DCHECK/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h b/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
index 86939851e88d9f6f937de480fb4a57970db9a18f..236c20c9ffcbbe6e7189bca2d74f1d7c58aec4d1 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
@@ -18,10 +18,10 @@ public:
Maybe() { }
Maybe(PassOwnPtr<T> value) : m_value(std::move(value)) { }
void operator=(PassOwnPtr<T> value) { m_value = std::move(value); }
- T* fromJust() const { ASSERT(m_value); return m_value.get(); }
+ T* fromJust() const { DCHECK(m_value); return m_value.get(); }
T* fromMaybe(T* defaultValue) const { return m_value ? m_value.get() : defaultValue; }
bool isJust() const { return !!m_value; }
- PassOwnPtr<T> takeJust() { ASSERT(m_value); return m_value.release(); }
+ PassOwnPtr<T> takeJust() { DCHECK(m_value); return m_value.release(); }
private:
OwnPtr<T> m_value;
};
@@ -32,10 +32,10 @@ public:
MaybeBase() : m_isJust(false) { }
MaybeBase(T value) : m_isJust(true), m_value(value) { }
void operator=(T value) { m_value = value; m_isJust = true; }
- T fromJust() const { ASSERT(m_isJust); return m_value; }
+ T fromJust() const { DCHECK(m_isJust); return m_value; }
T fromMaybe(const T& defaultValue) const { return m_isJust ? m_value : defaultValue; }
bool isJust() const { return m_isJust; }
- T takeJust() { ASSERT(m_isJust); return m_value; }
+ T takeJust() { DCHECK(m_isJust); return m_value; }
protected:
bool m_isJust;

Powered by Google App Engine
This is Rietveld 408576698