| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 __lsan_disable(); | 66 __lsan_disable(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 ~LeakSanitizerDisabler() | 69 ~LeakSanitizerDisabler() |
| 70 { | 70 { |
| 71 __lsan_enable(); | 71 __lsan_enable(); |
| 72 } | 72 } |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #define WTF_ANNOTATE_SCOPED_MEMORY_LEAK \ | 75 #define WTF_ANNOTATE_SCOPED_MEMORY_LEAK \ |
| 76 LeakSanitizerDisabler leakSanitizerDisabler; static_cast<void>(0) | 76 WTF::LeakSanitizerDisabler leakSanitizerDisabler; static_cast<void>(0) |
| 77 | 77 |
| 78 #define WTF_ANNOTATE_LEAKING_OBJECT_PTR(X) \ | 78 #define WTF_ANNOTATE_LEAKING_OBJECT_PTR(X) \ |
| 79 __lsan_ignore_object(X) | 79 WTF::__lsan_ignore_object(X) |
| 80 | 80 |
| 81 #else // USE(LEAK_SANITIZER) | 81 #else // USE(LEAK_SANITIZER) |
| 82 | 82 |
| 83 // If Leak Sanitizer is not being used, the annotations should be no-ops. | 83 // If Leak Sanitizer is not being used, the annotations should be no-ops. |
| 84 #define WTF_ANNOTATE_SCOPED_MEMORY_LEAK | 84 #define WTF_ANNOTATE_SCOPED_MEMORY_LEAK |
| 85 #define WTF_ANNOTATE_LEAKING_OBJECT_PTR(X) | 85 #define WTF_ANNOTATE_LEAKING_OBJECT_PTR(X) |
| 86 | 86 |
| 87 #endif // USE(LEAK_SANITIZER) | 87 #endif // USE(LEAK_SANITIZER) |
| 88 | 88 |
| 89 } // namespace WTF | 89 } // namespace WTF |
| 90 | 90 |
| 91 #endif // WTF_LeakAnnotations_h | 91 #endif // WTF_LeakAnnotations_h |
| OLD | NEW |