*/
static const JSClassRef getClassRef();
static JSObjectRef createJSObject(JSContextRef context, const DurationProperties &durations);
+ static JSObjectRef createJSObject(JSContextRef context, const DurationPropertiesPtr duration);
+
+ static JSObjectRef constructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
private:
enum CompareType {
DIFFERENCE,
static bool setProperty(JSContextRef context, JSObjectRef object,
JSStringRef propertyName, JSValueRef value, JSValueRef* exception);
- static JSObjectRef constructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
-
- /**
- * The callback invoked when an object is used as the target of an 'instanceof' expression.
- */
- static bool hasInstance(JSContextRef context,
- JSObjectRef constructor,
- JSValueRef possibleInstance,
- JSValueRef* exception);
-
static JSValueRef diffTimeDuration(JSContextRef context, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef * exception, CompareType type);
static JSValueRef difference(JSContextRef context, JSObjectRef function,
JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef * exception);