| 46 | } |
| 47 | |
| 48 | JSValueRef JSPromiseCancel::getFromJSPromise(IJavaScriptContext& jsContext, |
| 49 | const JSValue& jsPromise, |
| 50 | JSExceptionTracker& exceptionTracker) { |
| 51 | if (!jsContext.isValueObject(jsPromise)) { |
| 52 | return jsContext.newUndefined(); |
| 53 | } |
| 54 | |
| 55 | return jsContext.getObjectProperty(jsPromise, getCancelPropertyKey(jsContext), exceptionTracker); |
| 56 | } |
| 57 | |
| 58 | bool JSPromiseCancel::isJSPromiseCancelable(IJavaScriptContext& jsContext, const JSValue& jsPromise) { |
| 59 | return jsContext.hasObjectProperty(jsPromise, getCancelPropertyKey(jsContext)); |
nothing calls this directly
no test coverage detected