summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSPromiseConstructor.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSPromiseConstructor.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSPromiseConstructor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/runtime/JSPromiseConstructor.h b/Source/JavaScriptCore/runtime/JSPromiseConstructor.h
index 5881e1630..498bb8b56 100644
--- a/Source/JavaScriptCore/runtime/JSPromiseConstructor.h
+++ b/Source/JavaScriptCore/runtime/JSPromiseConstructor.h
@@ -26,6 +26,8 @@
#ifndef JSPromiseConstructor_h
#define JSPromiseConstructor_h
+#if ENABLE(PROMISES)
+
#include "InternalFunction.h"
namespace JSC {
@@ -36,7 +38,6 @@ class JSPromisePrototype;
class JSPromiseConstructor : public InternalFunction {
public:
typedef InternalFunction Base;
- static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
static JSPromiseConstructor* create(VM&, Structure*, JSPromisePrototype*);
static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
@@ -45,6 +46,7 @@ public:
protected:
void finishCreation(VM&, JSPromisePrototype*);
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
private:
JSPromiseConstructor(VM&, Structure*);
@@ -53,6 +55,10 @@ private:
static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
};
+JSPromise* constructPromise(ExecState*, JSGlobalObject*, JSFunction*);
+
} // namespace JSC
+#endif // ENABLE(PROMISES)
+
#endif // JSPromiseConstructor_h