Bug 903427 - make ConstantSpecs in OSFileConstants.cpp const and constexpr-foldable; r=khuey
authorNathan Froyd <froydnj@mozilla.com>
Fri, 09 Aug 2013 09:46:07 -0400
changeset 142147 afbed604db0495f4a936cf835eda8c13e103ba9f
parent 142146 b0e1bdb61af3b17d8ce74de0dd4d18872bf7ac6c
child 142148 00fc7e525678938cd4787513bfa7ecda51c8e59f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerskhuey
bugs903427
milestone26.0a1
Bug 903427 - make ConstantSpecs in OSFileConstants.cpp const and constexpr-foldable; r=khuey
dom/system/OSFileConstants.cpp
--- a/dom/system/OSFileConstants.cpp
+++ b/dom/system/OSFileConstants.cpp
@@ -237,17 +237,17 @@ void CleanupOSFileConstants()
  * Produces a |ConstantSpec|.
  */
 #define INT_CONSTANT(name)      \
   { #name, INT_TO_JSVAL(name) }
 
 /**
  * End marker for ConstantSpec
  */
-#define PROP_END { NULL, JSVAL_VOID }
+#define PROP_END { NULL, JS::UndefinedValue() }
 
 
 // Define missing constants for Android
 #if !defined(S_IRGRP)
 #define S_IXOTH 0001
 #define S_IWOTH 0002
 #define S_IROTH 0004
 #define S_IRWXO 0007
@@ -264,17 +264,17 @@ void CleanupOSFileConstants()
 /**
  * The properties defined in libc.
  *
  * If you extend this list of properties, please
  * separate categories ("errors", "open", etc.),
  * keep properties organized by alphabetical order
  * and #ifdef-away properties that are not portable.
  */
-static dom::ConstantSpec gLibcProperties[] =
+static const dom::ConstantSpec gLibcProperties[] =
 {
   // Arguments for open
   INT_CONSTANT(O_APPEND),
   INT_CONSTANT(O_CREAT),
 #if defined(O_DIRECTORY)
   INT_CONSTANT(O_DIRECTORY),
 #endif // defined(O_DIRECTORY)
 #if defined(O_EVTONLY)
@@ -517,17 +517,17 @@ static dom::ConstantSpec gLibcProperties
 /**
  * The properties defined in windows.h.
  *
  * If you extend this list of properties, please
  * separate categories ("errors", "open", etc.),
  * keep properties organized by alphabetical order
  * and #ifdef-away properties that are not portable.
  */
-static dom::ConstantSpec gWinProperties[] =
+static const dom::ConstantSpec gWinProperties[] =
 {
   // FormatMessage flags
   INT_CONSTANT(FORMAT_MESSAGE_FROM_SYSTEM),
   INT_CONSTANT(FORMAT_MESSAGE_IGNORE_INSERTS),
 
   // The max length of paths
   INT_CONSTANT(MAX_PATH),