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

Unified Diff: Source/modules/screen_orientation/ScreenScreenOrientation.cpp

Issue 688993002: Oilpan: have Screen be on the heap by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: non-oilpan compile fix Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/screen_orientation/ScreenScreenOrientation.cpp
diff --git a/Source/modules/screen_orientation/ScreenScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenScreenOrientation.cpp
index 69dfda1b980f18afaa218e0a5f21739c1eb2520f..cfe15c3828bfc171b31fecbf6acc24ae0b72bca5 100644
--- a/Source/modules/screen_orientation/ScreenScreenOrientation.cpp
+++ b/Source/modules/screen_orientation/ScreenScreenOrientation.cpp
@@ -14,29 +14,25 @@ namespace blink {
// static
ScreenScreenOrientation& ScreenScreenOrientation::from(Screen& screen)
{
- ScreenScreenOrientation* supplement = static_cast<ScreenScreenOrientation*>(WillBeHeapSupplement<Screen>::from(screen, supplementName()));
+ ScreenScreenOrientation* supplement = static_cast<ScreenScreenOrientation*>(HeapSupplement<Screen>::from(screen, supplementName()));
if (!supplement) {
supplement = new ScreenScreenOrientation();
- provideTo(screen, supplementName(), adoptPtrWillBeNoop(supplement));
+ provideTo(screen, supplementName(), supplement);
}
return *supplement;
}
-ScreenScreenOrientation::~ScreenScreenOrientation()
-{
-}
-
// static
ScreenOrientation* ScreenScreenOrientation::orientation(ScriptState* state, Screen& screen)
{
ScreenScreenOrientation& self = ScreenScreenOrientation::from(screen);
if (!screen.frame())
- return 0;
+ return nullptr;
if (!self.m_orientation)
self.m_orientation = ScreenOrientation::create(screen.frame());
- return self.m_orientation.get();
+ return self.m_orientation;
}
const char* ScreenScreenOrientation::supplementName()
@@ -47,7 +43,7 @@ const char* ScreenScreenOrientation::supplementName()
DEFINE_TRACE(ScreenScreenOrientation)
{
visitor->trace(m_orientation);
- WillBeHeapSupplement<Screen>::trace(visitor);
+ HeapSupplement<Screen>::trace(visitor);
}
} // namespace blink
« Source/core/frame/Screen.h ('K') | « Source/modules/screen_orientation/ScreenScreenOrientation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698