Bug 911216 - Add --enable-sm-promise configure flag
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -13,8 +13,19 @@ def js_shell_default(build_project, help
js_option('--disable-js-shell', default=js_shell_default,
help='Do not build the JS shell')
@depends('--disable-js-shell')
def js_shell(value):
if not value:
set_config('JS_DISABLE_SHELL', '1')
+
+
+# Use SpiderMonkey Promise implementation if it's enabled
+# =======================================================
+js_option('--enable-sm-promise', help='Enable SpiderMonkey promises')
+
+@depends('--enable-sm-promise')
+def sm_promise(value):
+ if value:
+ set_config('SPIDERMONKEY_PROMISE', '1')
+ set_define('SPIDERMONKEY_PROMISE', '1')