Bug 1086987 - MOZ_CRASH if there is no fanotify support, r=dhylands
authorMichael Wu <mwu@mozilla.com>
Tue, 28 Oct 2014 12:32:11 -0400
changeset 212753 74a74122337fc18a22a680f40c5b7f34548f74f2
parent 212752 de8277c450f2accfc1245b5d5f40d1398e272254
child 212754 b4225acf7777b61b6ddf13f134a994f215ed3d37
push id51042
push userryanvm@gmail.com
push dateTue, 28 Oct 2014 20:25:03 +0000
treeherdermozilla-inbound@53d84829b2b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdhylands
bugs1086987
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1086987 - MOZ_CRASH if there is no fanotify support, r=dhylands
hal/gonk/GonkDiskSpaceWatcher.cpp
--- a/hal/gonk/GonkDiskSpaceWatcher.cpp
+++ b/hal/gonk/GonkDiskSpaceWatcher.cpp
@@ -164,16 +164,19 @@ GonkDiskSpaceWatcher::DoStart()
   NS_ASSERTION(XRE_GetIOMessageLoop() == MessageLoopForIO::current(),
                "Not on the correct message loop");
 
   mFd = fanotify_init(FAN_CLASS_NOTIF, FAN_CLOEXEC);
   if (mFd == -1) {
     NS_WARNING("Error calling inotify_init()");
     if (errno == ENOSYS) {
       NS_WARNING("Warning: No fanotify support in this device's kernel.\n");
+#if ANDROID_VERSION >= 19
+      MOZ_CRASH("Fanotify support must be enabled in the kernel.");
+#endif
     }
     return;
   }
 
   if (fanotify_mark(mFd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_CLOSE,
                     0, kWatchedPath) < 0) {
     NS_WARNING("Error calling fanotify_mark");
     close(mFd);