mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 939294 - Handlify all the rest. r=terrence
This commit is contained in:
parent
7c411c1c4c
commit
af21b5b94c
@ -1487,7 +1487,7 @@ nsScriptSecurityManager::GetSubjectPrincipal(JSContext *cx,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScriptSecurityManager::GetObjectPrincipal(const JS::Value &aObjectVal,
|
||||
nsScriptSecurityManager::GetObjectPrincipal(JS::Handle<JS::Value> aObjectVal,
|
||||
JSContext *aCx,
|
||||
nsIPrincipal **result)
|
||||
{
|
||||
|
@ -10449,7 +10449,7 @@ nsDocShell::SetReferrerURI(nsIURI * aURI)
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::AddState(const JS::Value &aData, const nsAString& aTitle,
|
||||
nsDocShell::AddState(JS::Handle<JS::Value> aData, const nsAString& aTitle,
|
||||
const nsAString& aURL, bool aReplace, JSContext* aCx)
|
||||
{
|
||||
// Implements History.pushState and History.replaceState
|
||||
|
@ -362,7 +362,8 @@ nsDocShellTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShellTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
||||
nsDocShellTreeOwner::GetContentWindow(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aVal)
|
||||
{
|
||||
if (mTreeOwner)
|
||||
return mTreeOwner->GetContentWindow(aCx, aVal);
|
||||
|
@ -118,7 +118,7 @@ nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length,
|
||||
nsAutoCString script(js_buffer, length);
|
||||
JS::RootedValue v(cx);
|
||||
rv = xpc->EvalInSandboxObject(NS_ConvertASCIItoUTF16(script), filename, cx, autoconfigSb,
|
||||
/* returnStringOnly = */ false, v.address());
|
||||
/* returnStringOnly = */ false, &v);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -127,12 +127,12 @@ NS_IMETHODIMP nsScriptableRegion::GetRegion(nsIntRegion* outRgn)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsScriptableRegion::GetRects(JSContext* aCx, JS::Value* aRects)
|
||||
NS_IMETHODIMP nsScriptableRegion::GetRects(JSContext* aCx, JS::MutableHandle<JS::Value> aRects)
|
||||
{
|
||||
uint32_t numRects = mRegion.GetNumRects();
|
||||
|
||||
if (!numRects) {
|
||||
*aRects = JSVAL_NULL;
|
||||
aRects.setNull();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ NS_IMETHODIMP nsScriptableRegion::GetRects(JSContext* aCx, JS::Value* aRects)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
*aRects = OBJECT_TO_JSVAL(destArray);
|
||||
aRects.setObject(*destArray);
|
||||
|
||||
uint32_t n = 0;
|
||||
nsIntRegionRectIterator iter(mRegion);
|
||||
|
@ -36,7 +36,7 @@ JSDebugger::~JSDebugger()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
JSDebugger::AddClass(const JS::Value &global, JSContext* cx)
|
||||
JSDebugger::AddClass(JS::Handle<JS::Value> global, JSContext* cx)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID(), &rv);
|
||||
|
@ -2364,16 +2364,14 @@ jsdValue::Refresh()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
jsdValue::GetWrappedValue(JSContext* aCx, JS::Value* aRetval)
|
||||
jsdValue::GetWrappedValue(JSContext* aCx, JS::MutableHandle<JS::Value> aRetval)
|
||||
{
|
||||
ASSERT_VALID_EPHEMERAL;
|
||||
|
||||
JS::RootedValue value(aCx, JSD_GetValueWrappedJSVal(mCx, mValue));
|
||||
if (!JS_WrapValue(aCx, &value)) {
|
||||
aRetval.set(JSD_GetValueWrappedJSVal(mCx, mValue));
|
||||
if (!JS_WrapValue(aCx, aRetval))
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
*aRetval = value;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -2987,7 +2985,7 @@ jsdService::ClearAllBreakpoints (void)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
jsdService::WrapValue(const JS::Value &value, jsdIValue **_rval)
|
||||
jsdService::WrapValue(JS::Handle<JS::Value> value, jsdIValue **_rval)
|
||||
{
|
||||
ASSERT_VALID_CONTEXT;
|
||||
JSDValue *jsdv = JSD_NewValue(mCx, value);
|
||||
|
@ -616,7 +616,7 @@ inDOMUtils::GetCSSValuesForProperty(const nsAString& aProperty,
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::ColorNameToRGB(const nsAString& aColorName, JSContext* aCx,
|
||||
JS::Value* aValue)
|
||||
JS::MutableHandle<JS::Value> aValue)
|
||||
{
|
||||
nscolor color;
|
||||
if (!NS_ColorNameToRGB(aColorName, &color)) {
|
||||
@ -628,8 +628,7 @@ inDOMUtils::ColorNameToRGB(const nsAString& aColorName, JSContext* aCx,
|
||||
triple.mG = NS_GET_G(color);
|
||||
triple.mB = NS_GET_B(color);
|
||||
|
||||
if (!triple.ToObject(aCx, JS::NullPtr(),
|
||||
JS::MutableHandle<JS::Value>::fromMarkedLocation(aValue))) {
|
||||
if (!triple.ToObject(aCx, JS::NullPtr(), aValue)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ ArrayBufferInputStream::~ArrayBufferInputStream()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ArrayBufferInputStream::SetData(const JS::Value& aBuffer,
|
||||
ArrayBufferInputStream::SetData(JS::Handle<JS::Value> aBuffer,
|
||||
uint32_t aByteOffset,
|
||||
uint32_t aLength,
|
||||
JSContext* aCx)
|
||||
|
@ -366,7 +366,7 @@ AppProtocolHandler::NewChannel(nsIURI* aUri, nsIChannel* *aResult)
|
||||
|
||||
mozilla::AutoSafeJSContext cx;
|
||||
JS::RootedValue jsInfo(cx);
|
||||
rv = appsService->GetAppInfo(NS_ConvertUTF8toUTF16(host), jsInfo.address());
|
||||
rv = appsService->GetAppInfo(NS_ConvertUTF8toUTF16(host), &jsInfo);
|
||||
if (NS_FAILED(rv) || !jsInfo.isObject()) {
|
||||
// Return a DummyChannel.
|
||||
printf_stderr("!! Creating a dummy channel for %s (no appInfo)\n", host.get());
|
||||
|
@ -220,7 +220,7 @@ Variant_base::GetAsWStringWithSize(uint32_t *,
|
||||
|
||||
inline
|
||||
NS_IMETHODIMP
|
||||
Variant_base::GetAsJSVal(JS::Value *)
|
||||
Variant_base::GetAsJSVal(JS::MutableHandle<JS::Value>)
|
||||
{
|
||||
return NS_ERROR_CANNOT_CONVERT_DATA;
|
||||
}
|
||||
|
@ -180,13 +180,14 @@ nsProfiler::GetSharedLibraryInformation(nsAString& aOutString)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsProfiler::GetProfileData(JSContext* aCx, JS::Value* aResult)
|
||||
NS_IMETHODIMP nsProfiler::GetProfileData(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aResult)
|
||||
{
|
||||
JSObject *obj = profiler_get_profile_jsobject(aCx);
|
||||
if (!obj)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aResult = OBJECT_TO_JSVAL(obj);
|
||||
aResult.setObject(*obj);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -897,7 +897,7 @@ InitCollectors()
|
||||
sCollectors = new nsTArray<GfxInfoCollectorBase*>;
|
||||
}
|
||||
|
||||
nsresult GfxInfoBase::GetInfo(JSContext* aCx, jsval* aResult)
|
||||
nsresult GfxInfoBase::GetInfo(JSContext* aCx, JS::MutableHandle<JS::Value> aResult)
|
||||
{
|
||||
InitCollectors();
|
||||
InfoObject obj(aCx);
|
||||
@ -915,7 +915,7 @@ nsresult GfxInfoBase::GetInfo(JSContext* aCx, jsval* aResult)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
*aResult = OBJECT_TO_JSVAL(obj.mObj);
|
||||
aResult.setObject(*obj.mObj);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
|
||||
NS_IMETHOD GetFailures(uint32_t *failureCount, char ***failures);
|
||||
NS_IMETHOD_(void) LogFailure(const nsACString &failure);
|
||||
NS_IMETHOD GetInfo(JSContext*, jsval*);
|
||||
NS_IMETHOD GetInfo(JSContext*, JS::MutableHandle<JS::Value>);
|
||||
|
||||
// Initialization function. If you override this, you must call this class's
|
||||
// version of Init first.
|
||||
|
@ -1860,7 +1860,7 @@ NS_IMETHODIMP nsVariant::GetAsISupports(nsISupports **_retval)
|
||||
}
|
||||
|
||||
/* jsval getAsJSVal() */
|
||||
NS_IMETHODIMP nsVariant::GetAsJSVal(JS::Value *_retval)
|
||||
NS_IMETHODIMP nsVariant::GetAsJSVal(JS::MutableHandleValue)
|
||||
{
|
||||
// Can only get the jsval from an XPCVariant.
|
||||
return NS_ERROR_CANNOT_CONVERT_DATA;
|
||||
|
@ -730,7 +730,7 @@ nsBinaryInputStream::ReadByteArray(uint32_t aLength, uint8_t* *_rval)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBinaryInputStream::ReadArrayBuffer(uint32_t aLength, const JS::Value& aBuffer, JSContext* cx)
|
||||
nsBinaryInputStream::ReadArrayBuffer(uint32_t aLength, JS::Handle<JS::Value> aBuffer, JSContext* cx)
|
||||
{
|
||||
if (!aBuffer.isObject()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -251,7 +251,7 @@ NS_IMETHODIMP nsChromeTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aS
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsChromeTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
||||
nsChromeTreeOwner::GetContentWindow(JSContext* aCx, JS::MutableHandle<JS::Value> aVal)
|
||||
{
|
||||
NS_ENSURE_STATE(mXULWindow);
|
||||
|
||||
|
@ -304,7 +304,8 @@ nsContentTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
||||
nsContentTreeOwner::GetContentWindow(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aVal)
|
||||
{
|
||||
NS_ENSURE_STATE(mXULWindow);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
Loading…
Reference in New Issue
Block a user