summaryrefslogtreecommitdiffstats
path: root/js/src/vm
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2019-12-18 23:07:31 -0500
committerGitHub <noreply@github.com>2019-12-18 23:07:31 -0500
commit3332f584c829aaac455d688c6c073937442c4c7f (patch)
tree741e4325721d1d8d9970e075320262097d3cbeb1 /js/src/vm
parent8220776c9b2e8291f0414f98ac20fbda30e00d2e (diff)
parentc7ae364a887e9fb77196596d6e4345b455ab209f (diff)
downloadUXP-3332f584c829aaac455d688c6c073937442c4c7f.tar
UXP-3332f584c829aaac455d688c6c073937442c4c7f.tar.gz
UXP-3332f584c829aaac455d688c6c073937442c4c7f.tar.lz
UXP-3332f584c829aaac455d688c6c073937442c4c7f.tar.xz
UXP-3332f584c829aaac455d688c6c073937442c4c7f.zip
Merge pull request #1330 from MoonchildProductions/DOM-promise-removal
DOM `Promise` removal
Diffstat (limited to 'js/src/vm')
-rw-r--r--js/src/vm/Debugger.cpp12
-rw-r--r--js/src/vm/Debugger.h14
-rw-r--r--js/src/vm/GlobalObject.cpp2
3 files changed, 0 insertions, 28 deletions
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
index 2680699a4..c49df5aa9 100644
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -8728,7 +8728,6 @@ DebuggerObject::proxyHandlerGetter(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-#ifdef SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::isPromiseGetter(JSContext* cx, unsigned argc, Value* vp)
{
@@ -8897,7 +8896,6 @@ DebuggerObject::promiseDependentPromisesGetter(JSContext* cx, unsigned argc, Val
args.rval().setObject(*promises);
return true;
}
-#endif // SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::isExtensibleMethod(JSContext* cx, unsigned argc, Value* vp)
@@ -9336,7 +9334,6 @@ const JSPropertySpec DebuggerObject::properties_[] = {
JS_PS_END
};
-#ifdef SPIDERMONKEY_PROMISE
const JSPropertySpec DebuggerObject::promiseProperties_[] = {
JS_PSG("isPromise", DebuggerObject::isPromiseGetter, 0),
JS_PSG("promiseState", DebuggerObject::promiseStateGetter, 0),
@@ -9350,7 +9347,6 @@ const JSPropertySpec DebuggerObject::promiseProperties_[] = {
JS_PSG("promiseDependentPromises", DebuggerObject::promiseDependentPromisesGetter, 0),
JS_PS_END
};
-#endif // SPIDERMONKEY_PROMISE
const JSFunctionSpec DebuggerObject::methods_[] = {
JS_FN("isExtensible", DebuggerObject::isExtensibleMethod, 0, 0),
@@ -9390,10 +9386,8 @@ DebuggerObject::initClass(JSContext* cx, HandleObject obj, HandleObject debugCto
if (!objectProto)
return nullptr;
-#ifdef SPIDERMONKEY_PROMISE
if (!DefinePropertiesAndFunctions(cx, objectProto, promiseProperties_, nullptr))
return nullptr;
-#endif // SPIDERMONKEY_PROMISE
return objectProto;
}
@@ -9461,7 +9455,6 @@ DebuggerObject::isScriptedProxy() const
return js::IsScriptedProxy(referent());
}
-#ifdef SPIDERMONKEY_PROMISE
bool
DebuggerObject::isPromise() const
{
@@ -9475,7 +9468,6 @@ DebuggerObject::isPromise() const
return referent->is<PromiseObject>();
}
-#endif // SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::getClassName(JSContext* cx, HandleDebuggerObject object,
@@ -9758,7 +9750,6 @@ DebuggerObject::getErrorColumnNumber(JSContext* cx, HandleDebuggerObject object,
return true;
}
-#ifdef SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::getPromiseValue(JSContext* cx, HandleDebuggerObject object,
MutableHandleValue result)
@@ -9778,7 +9769,6 @@ DebuggerObject::getPromiseReason(JSContext* cx, HandleDebuggerObject object,
result.set(object->promise()->reason());
return object->owner()->wrapDebuggeeValue(cx, result);
}
-#endif // SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::isExtensible(JSContext* cx, HandleDebuggerObject object, bool& result)
@@ -10248,7 +10238,6 @@ DebuggerObject::requireGlobal(JSContext* cx, HandleDebuggerObject object)
return true;
}
-#ifdef SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::requirePromise(JSContext* cx, HandleDebuggerObject object)
{
@@ -10270,7 +10259,6 @@ DebuggerObject::requirePromise(JSContext* cx, HandleDebuggerObject object)
return true;
}
-#endif // SPIDERMONKEY_PROMISE
/* static */ bool
DebuggerObject::getScriptedProxyTarget(JSContext* cx, HandleDebuggerObject object,
diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
index cdcf2d67f..204d1ca3e 100644
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -1256,12 +1256,10 @@ class DebuggerObject : public NativeObject
MutableHandleDebuggerObject result);
static MOZ_MUST_USE bool getScriptedProxyHandler(JSContext* cx, HandleDebuggerObject object,
MutableHandleDebuggerObject result);
-#ifdef SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool getPromiseValue(JSContext* cx, HandleDebuggerObject object,
MutableHandleValue result);
static MOZ_MUST_USE bool getPromiseReason(JSContext* cx, HandleDebuggerObject object,
MutableHandleValue result);
-#endif // SPIDERMONKEY_PROMISE
// Methods
static MOZ_MUST_USE bool isExtensible(JSContext* cx, HandleDebuggerObject object,
@@ -1311,16 +1309,12 @@ class DebuggerObject : public NativeObject
bool isArrowFunction() const;
bool isGlobal() const;
bool isScriptedProxy() const;
-#ifdef SPIDERMONKEY_PROMISE
bool isPromise() const;
-#endif // SPIDERMONKEY_PROMISE
JSAtom* name() const;
JSAtom* displayName() const;
-#ifdef SPIDERMONKEY_PROMISE
JS::PromiseState promiseState() const;
double promiseLifetime() const;
double promiseTimeToResolution() const;
-#endif // SPIDERMONKEY_PROMISE
private:
enum {
@@ -1332,9 +1326,7 @@ class DebuggerObject : public NativeObject
static const ClassOps classOps_;
static const JSPropertySpec properties_[];
-#ifdef SPIDERMONKEY_PROMISE
static const JSPropertySpec promiseProperties_[];
-#endif // SPIDERMONKEY_PROMISE
static const JSFunctionSpec methods_[];
JSObject* referent() const {
@@ -1345,14 +1337,10 @@ class DebuggerObject : public NativeObject
Debugger* owner() const;
-#ifdef SPIDERMONKEY_PROMISE
PromiseObject* promise() const;
-#endif // SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool requireGlobal(JSContext* cx, HandleDebuggerObject object);
-#ifdef SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool requirePromise(JSContext* cx, HandleDebuggerObject object);
-#endif // SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
@@ -1379,7 +1367,6 @@ class DebuggerObject : public NativeObject
static MOZ_MUST_USE bool isProxyGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool proxyTargetGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool proxyHandlerGetter(JSContext* cx, unsigned argc, Value* vp);
-#ifdef SPIDERMONKEY_PROMISE
static MOZ_MUST_USE bool isPromiseGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool promiseStateGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool promiseValueGetter(JSContext* cx, unsigned argc, Value* vp);
@@ -1390,7 +1377,6 @@ class DebuggerObject : public NativeObject
static MOZ_MUST_USE bool promiseResolutionSiteGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool promiseIDGetter(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool promiseDependentPromisesGetter(JSContext* cx, unsigned argc, Value* vp);
-#endif // SPIDERMONKEY_PROMISE
// JSNative methods
static MOZ_MUST_USE bool isExtensibleMethod(JSContext* cx, unsigned argc, Value* vp);
diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
index 70c33c647..a8d401af4 100644
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -21,9 +21,7 @@
#include "builtin/MapObject.h"
#include "builtin/ModuleObject.h"
#include "builtin/Object.h"
-#ifdef SPIDERMONKEY_PROMISE
#include "builtin/Promise.h"
-#endif
#include "builtin/RegExp.h"
#include "builtin/SelfHostingDefines.h"
#include "builtin/SymbolObject.h"