Bug 911216 - Add --enable-sm-promise configure flag draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 09 Mar 2016 16:09:25 +0900
changeset 338475 6bac212c6dae276c5a956ba0d8b4fd68a725911b
parent 338474 dcca95b621df46dc2562cde4ce49bd5f95f1f591
child 515803 92fec96ab5977d14db83a9d07611b2d439f08cd0
push id12520
push userbmo:mh+mozilla@glandium.org
push dateWed, 09 Mar 2016 07:12:02 +0000
bugs911216
milestone48.0a1
Bug 911216 - Add --enable-sm-promise configure flag
js/moz.configure
--- 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')