summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 21:03:37 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 21:03:37 +0000
commite9e9f1b107106487c78de5425261d78a83f29dd3 (patch)
tree781e9d7287f55038dfd70955db7499a694104b8e /skia
parent3e0c7a40353b73c279c3767ad9cc35cdb7771c1d (diff)
downloadchromium_src-e9e9f1b107106487c78de5425261d78a83f29dd3.zip
chromium_src-e9e9f1b107106487c78de5425261d78a83f29dd3.tar.gz
chromium_src-e9e9f1b107106487c78de5425261d78a83f29dd3.tar.bz2
Revert 230161 "Enable reference adoption run time checks for Bli..."
Caused assertion failures upon new tab creation on Windows; crbug.com/310274 > Enable reference adoption run time checks for Blink+skia in Debug builds > > This change enables run run time check that will help detect memory > leaks and unsafe usage in cases where Blink's RefPtr is used to > hold a reference to a skia SkRefCnt-derived object. > > BUG=304265 > > Review URL: https://codereview.chromium.org/29763002 TBR=junov@chromium.org Review URL: https://codereview.chromium.org/30183003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/config/SkUserConfig.h4
-rw-r--r--skia/config/sk_ref_cnt_base_debug.h43
2 files changed, 0 insertions, 47 deletions
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 927db61..302a072 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -152,10 +152,6 @@
// ===== Begin Chrome-specific definitions =====
-#ifdef SK_DEBUG
-#define SK_REF_CNT_BASE_INCLUDE "sk_ref_cnt_base_debug.h"
-#endif
-
#define SK_SCALAR_IS_FLOAT
#undef SK_SCALAR_IS_FIXED
diff --git a/skia/config/sk_ref_cnt_base_debug.h b/skia/config/sk_ref_cnt_base_debug.h
deleted file mode 100644
index d2ea017..0000000
--- a/skia/config/sk_ref_cnt_base_debug.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SK_REF_CNT_BASE_DEBUG_H_
-#define SK_REF_CNT_BASE_DEBUG_H_
-
-// Alternate implementation of SkRefCntBase for Chromium debug builds
-class SK_API SkRefCntBase {
-public:
- SkRefCntBase() : flags_(0) {}
- void aboutToRef() const { SkASSERT(flags_ != AdoptionRequired_Flag); }
- void adopted() const { flags_ |= Adopted_Flag; }
- void requireAdoption() const { flags_ |= AdoptionRequired_Flag; }
-private:
- enum {
- Adopted_Flag = 0x1,
- AdoptionRequired_Flag = 0x2,
- };
-
- mutable int flags_;
-};
-
-// Bootstrap for Blink's WTF::RefPtr
-
-namespace WTF {
- inline void adopted(const SkRefCntBase* object) {
- if (!object)
- return;
- object->adopted();
- }
- inline void requireAdoption(const SkRefCntBase* object) {
- if (!object)
- return;
- object->requireAdoption();
- }
-};
-
-using WTF::adopted;
-using WTF::requireAdoption;
-
-#endif
-