mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 986940 - Remove Cu.createDateIn. r=gabor
When we switch ObjectWrapper.jsm to use Cu.cloneInto, this became unused.
This commit is contained in:
parent
57c071047f
commit
517fa7aa17
@ -121,7 +121,7 @@ interface ScheduledGCCallback : nsISupports
|
||||
/**
|
||||
* interface of Components.utils
|
||||
*/
|
||||
[scriptable, uuid(0b81b4f2-cad7-4602-a5cb-b99c9d514196)]
|
||||
[scriptable, uuid(587ae679-97bc-4571-accb-b14a4dcbca00)]
|
||||
interface nsIXPCComponents_Utils : nsISupports
|
||||
{
|
||||
|
||||
@ -372,14 +372,6 @@ interface nsIXPCComponents_Utils : nsISupports
|
||||
[implicit_jscontext]
|
||||
jsval createArrayIn(in jsval vobj);
|
||||
|
||||
/*
|
||||
* To be called from JS only.
|
||||
*
|
||||
* Returns a date given timestamp |msec| created in |vobj|'s compartment.
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
jsval createDateIn(in jsval vobj, in long long msec);
|
||||
|
||||
/*
|
||||
* To be called from JS only.
|
||||
*
|
||||
|
@ -3067,34 +3067,6 @@ nsXPCComponents_Utils::CreateArrayIn(HandleValue vobj, JSContext *cx,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* jsval createDateIn(in jsval vobj, in long long msec); */
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::CreateDateIn(HandleValue vobj, int64_t msec, JSContext *cx,
|
||||
MutableHandleValue rval)
|
||||
{
|
||||
if (!cx)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// first argument must be an object
|
||||
if (!vobj.isObject())
|
||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||
|
||||
RootedObject obj(cx);
|
||||
{
|
||||
JSObject *scope = js::UncheckedUnwrap(&vobj.toObject());
|
||||
JSAutoCompartment ac(cx, scope);
|
||||
obj = JS_NewDateObjectMsec(cx, msec);
|
||||
if (!obj)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!JS_WrapObject(cx, &obj))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
rval.setObject(*obj);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void makeObjectPropsNormal(jsval vobj); */
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::MakeObjectPropsNormal(HandleValue vobj, JSContext *cx)
|
||||
|
Loading…
Reference in New Issue
Block a user