Changeset 56579 in webkit
- Timestamp:
- Mar 25, 2010 4:48:30 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r56571 r56579 1 2010-03-25 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [Chromium] Add an ASSERT macro to the Chromium WebKit API 6 https://bugs.webkit.org/show_bug.cgi?id=36545 7 8 * WebKit.gyp: Add WebCommon.cpp 9 * public/WebCommon.h: Add the Macro. 10 * public/WebPrivatePtr.h: 11 (WebKit::WebPrivatePtr::~WebPrivatePtr): Verify the pointer is now 0. 12 * src/WebCommon.cpp: Added. 13 (WebKit::failedAssertion): Calls the WTF assert function and then crashes. 14 1 15 2010-03-25 Jochen Eisinger <jochen@chromium.org> 2 16 -
trunk/WebKit/chromium/WebKit.gyp
r56457 r56579 288 288 'src/WebCache.cpp', 289 289 'src/WebColor.cpp', 290 'src/WebCommon.cpp', 290 291 'src/WebCrossOriginPreflightResultCache.cpp', 291 292 'src/WebCString.cpp', -
trunk/WebKit/chromium/public/WebCommon.h
r50671 r56579 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 90 90 #endif 91 91 92 // ----------------------------------------------------------------------------- 93 // Assertions 94 95 WEBKIT_API void failedAssertion(const char* file, int line, const char* function, const char* assertion); 96 92 97 } // namespace WebKit 93 98 99 // Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENTATION blocks. (Otherwise use WTF's ASSERT.) 100 #if defined(NDEBUG) 101 #define WEBKIT_ASSERT(assertion) ((void)0) 102 #else 103 #define WEBKIT_ASSERT(assertion) do { \ 104 if (!(assertion)) \ 105 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ 106 } while (0) 94 107 #endif 108 109 #endif -
trunk/WebKit/chromium/public/WebPrivatePtr.h
r55866 r56579 45 45 public: 46 46 WebPrivatePtr() : m_ptr(0) { } 47 ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); } 47 48 48 49 bool isNull() const { return !m_ptr; }
Note: See TracChangeset
for help on using the changeset viewer.