summaryrefslogtreecommitdiffstats
path: root/dom/bindings/ToJSValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/bindings/ToJSValue.cpp')
-rw-r--r--dom/bindings/ToJSValue.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/dom/bindings/ToJSValue.cpp b/dom/bindings/ToJSValue.cpp
index d84428fb3..7afff41e2 100644
--- a/dom/bindings/ToJSValue.cpp
+++ b/dom/bindings/ToJSValue.cpp
@@ -7,9 +7,7 @@
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/DOMException.h"
#include "mozilla/dom/Exceptions.h"
-#ifdef SPIDERMONKEY_PROMISE
#include "mozilla/dom/Promise.h"
-#endif // SPIDERMONKEY_PROMISE
#include "nsAString.h"
#include "nsContentUtils.h"
#include "nsStringBuffer.h"
@@ -66,15 +64,13 @@ ToJSValue(JSContext* aCx,
return true;
}
-#ifdef SPIDERMONKEY_PROMISE
bool
ToJSValue(JSContext* aCx, Promise& aArgument,
JS::MutableHandle<JS::Value> aValue)
{
aValue.setObject(*aArgument.PromiseObj());
- return true;
+ return MaybeWrapObjectValue(aCx, aValue);
}
-#endif // SPIDERMONKEY_PROMISE
} // namespace dom
} // namespace mozilla