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

Side by Side Diff: Source/core/testing/InternalSettings.cpp

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 #else 108 #else
109 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted 109 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted
110 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated. 110 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated.
111 // Instead, we manually make InternalSettings supplement Page. 111 // Instead, we manually make InternalSettings supplement Page.
112 class InternalSettingsWrapper : public Supplement<Page> { 112 class InternalSettingsWrapper : public Supplement<Page> {
113 public: 113 public:
114 explicit InternalSettingsWrapper(Page& page) 114 explicit InternalSettingsWrapper(Page& page)
115 : m_internalSettings(InternalSettings::create(page)) { } 115 : m_internalSettings(InternalSettings::create(page)) { }
116 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); } 116 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); }
117 #if !ASSERT_DISABLED 117 #if ASSERT_ENABLED
118 virtual bool isRefCountedWrapper() const OVERRIDE { return true; } 118 virtual bool isRefCountedWrapper() const OVERRIDE { return true; }
119 #endif 119 #endif
120 InternalSettings* internalSettings() const { return m_internalSettings.get() ; } 120 InternalSettings* internalSettings() const { return m_internalSettings.get() ; }
121 121
122 private: 122 private:
123 RefPtr<InternalSettings> m_internalSettings; 123 RefPtr<InternalSettings> m_internalSettings;
124 }; 124 };
125 125
126 InternalSettings* InternalSettings::from(Page& page) 126 InternalSettings* InternalSettings::from(Page& page)
127 { 127 {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void InternalSettings::trace(Visitor* visitor) 345 void InternalSettings::trace(Visitor* visitor)
346 { 346 {
347 visitor->trace(m_page); 347 visitor->trace(m_page);
348 InternalSettingsGenerated::trace(visitor); 348 InternalSettingsGenerated::trace(visitor);
349 #if ENABLE(OILPAN) 349 #if ENABLE(OILPAN)
350 HeapSupplement<Page>::trace(visitor); 350 HeapSupplement<Page>::trace(visitor);
351 #endif 351 #endif
352 } 352 }
353 353
354 } 354 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698