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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. Created 6 years, 5 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 #else 105 #else
106 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted 106 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted
107 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated. 107 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated.
108 // Instead, we manually make InternalSettings supplement Page. 108 // Instead, we manually make InternalSettings supplement Page.
109 class InternalSettingsWrapper : public Supplement<Page> { 109 class InternalSettingsWrapper : public Supplement<Page> {
110 public: 110 public:
111 explicit InternalSettingsWrapper(Page& page) 111 explicit InternalSettingsWrapper(Page& page)
112 : m_internalSettings(InternalSettings::create(page)) { } 112 : m_internalSettings(InternalSettings::create(page)) { }
113 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); } 113 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); }
114 #if ASSERT_ENABLED 114 #if ENABLE(ASSERT)
115 virtual bool isRefCountedWrapper() const OVERRIDE { return true; } 115 virtual bool isRefCountedWrapper() const OVERRIDE { return true; }
116 #endif 116 #endif
117 InternalSettings* internalSettings() const { return m_internalSettings.get() ; } 117 InternalSettings* internalSettings() const { return m_internalSettings.get() ; }
118 118
119 private: 119 private:
120 RefPtr<InternalSettings> m_internalSettings; 120 RefPtr<InternalSettings> m_internalSettings;
121 }; 121 };
122 122
123 InternalSettings* InternalSettings::from(Page& page) 123 InternalSettings* InternalSettings::from(Page& page)
124 { 124 {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 void InternalSettings::trace(Visitor* visitor) 337 void InternalSettings::trace(Visitor* visitor)
338 { 338 {
339 visitor->trace(m_page); 339 visitor->trace(m_page);
340 InternalSettingsGenerated::trace(visitor); 340 InternalSettingsGenerated::trace(visitor);
341 #if ENABLE(OILPAN) 341 #if ENABLE(OILPAN)
342 HeapSupplement<Page>::trace(visitor); 342 HeapSupplement<Page>::trace(visitor);
343 #endif 343 #endif
344 } 344 }
345 345
346 } 346 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698