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

Unified Diff: Source/core/fetch/Resource.h

Issue 210293005: Resource: Add more crash preventing assertions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/fetch/Resource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.h
diff --git a/Source/core/fetch/Resource.h b/Source/core/fetch/Resource.h
index 4be1812a5f172e0d4ba6287f1e67ae12a19c8fe0..6714f2989bb4f3dead0dfc46e41c3abd4f820878 100644
--- a/Source/core/fetch/Resource.h
+++ b/Source/core/fetch/Resource.h
@@ -34,6 +34,9 @@
#include "wtf/OwnPtr.h"
#include "wtf/text/WTFString.h"
+// FIXME(crbug.com/352043): This is temporarily enabled even on RELEASE to diagnose a wild crash.
+#define ENABLE_RESOURCE_IS_DELETED_CHECK
+
namespace WebCore {
struct FetchInitiatorInfo;
@@ -239,6 +242,12 @@ public:
static const char* resourceTypeToString(Type, const FetchInitiatorInfo&);
+#ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
+ void assertAlive() const { RELEASE_ASSERT(!m_deleted); }
+#else
+ void assertAlive() const { }
+#endif
+
protected:
virtual void checkNotify();
virtual void finishOnePart();
@@ -367,7 +376,7 @@ private:
unsigned m_needsSynchronousCacheHit : 1;
-#ifndef NDEBUG
+#ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
bool m_deleted;
#endif
« no previous file with comments | « no previous file | Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698