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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp

Issue 1855203002: Revert of Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
index 6a9da88a93b73f7411340a1896ab44a2f1a36157..d1b3d5a96d75959561e95883a57145ea2b3af233 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
@@ -39,11 +39,11 @@
DeviceOrientationDispatcher& DeviceOrientationDispatcher::instance(bool absolute)
{
if (absolute) {
- DEFINE_STATIC_LOCAL(DeviceOrientationDispatcher, deviceOrientationAbsoluteDispatcher, (new DeviceOrientationDispatcher(absolute)));
- return deviceOrientationAbsoluteDispatcher;
+ DEFINE_STATIC_LOCAL(Persistent<DeviceOrientationDispatcher>, deviceOrientationAbsoluteDispatcher, (new DeviceOrientationDispatcher(absolute)));
+ return *deviceOrientationAbsoluteDispatcher;
}
- DEFINE_STATIC_LOCAL(DeviceOrientationDispatcher, deviceOrientationDispatcher, (new DeviceOrientationDispatcher(absolute)));
- return deviceOrientationDispatcher;
+ DEFINE_STATIC_LOCAL(Persistent<DeviceOrientationDispatcher>, deviceOrientationDispatcher, (new DeviceOrientationDispatcher(absolute)));
+ return *deviceOrientationDispatcher;
}
DeviceOrientationDispatcher::DeviceOrientationDispatcher(bool absolute) : m_absolute(absolute)

Powered by Google App Engine
This is Rietveld 408576698