Bug 858482 - Expose macro DEBUG to OS.Constants. r=khuey, r=dteller
authorKushagra Sinha <sinha.kushagra@gmail.com>
Wed, 24 Apr 2013 08:36:10 -0400
changeset 140687 a9fa331e7a0fe0483f8f9de15fc8fc851454c58d
parent 140686 677a2e675dd9e6ffdc360cb9874acfbca73f00c0
child 140688 12700c8a83551e9c2bec301268e89d31eefa2ec5
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, dteller
bugs858482
milestone23.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 858482 - Expose macro DEBUG to OS.Constants. r=khuey, r=dteller
dom/system/OSFileConstants.cpp
--- a/dom/system/OSFileConstants.cpp
+++ b/dom/system/OSFileConstants.cpp
@@ -707,16 +707,23 @@ bool DefineOSFileConstants(JSContext *cx
     }
 
     JS::Value valVersion = STRING_TO_JSVAL(strVersion);
     if (!JS_SetProperty(cx, objSys, "Name", &valVersion)) {
       return false;
     }
   }
 
+#if defined(DEBUG)
+  JS::Value valDebug = JSVAL_TRUE;
+  if (!JS_SetProperty(cx, objSys, "DEBUG", &valDebug)) {
+    return false;
+  }
+#endif
+
   // Build OS.Constants.Path
 
   JSObject *objPath;
   if (!(objPath = GetOrCreateObjectProperty(cx, objConstants, "Path"))) {
     return false;
   }
 
   // Locate libxul