mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711799 - Fix a bunch of initializing-pointer-from-boolean warnings. r=dholbert
--HG-- extra : rebase_source : 4a5d03b10ad8ac4eaff222037ba3400a26e7cf55
This commit is contained in:
parent
ec238d2c71
commit
98dd456fc1
@ -1566,19 +1566,19 @@ XMLHttpRequestPrivate::GetAllResponseHeaders(JSContext* aCx)
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
if (mCanceled) {
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (!mProxy) {
|
||||
ThrowDOMExceptionForCode(aCx, INVALID_STATE_ERR);
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsCString responseHeaders;
|
||||
nsRefPtr<GetAllResponseHeadersRunnable> runnable =
|
||||
new GetAllResponseHeadersRunnable(mWorkerPrivate, mProxy, responseHeaders);
|
||||
if (!runnable->Dispatch(aCx)) {
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
return JS_NewStringCopyN(aCx, responseHeaders.get(),
|
||||
@ -1591,17 +1591,17 @@ XMLHttpRequestPrivate::GetResponseHeader(JSContext* aCx, JSString* aHeader)
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
if (mCanceled) {
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (!mProxy) {
|
||||
ThrowDOMExceptionForCode(aCx, INVALID_STATE_ERR);
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsDependentJSString header;
|
||||
if (!header.init(aCx, aHeader)) {
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsCString value;
|
||||
@ -1609,7 +1609,7 @@ XMLHttpRequestPrivate::GetResponseHeader(JSContext* aCx, JSString* aHeader)
|
||||
new GetResponseHeaderRunnable(mWorkerPrivate, mProxy,
|
||||
NS_ConvertUTF16toUTF8(header), value);
|
||||
if (!runnable->Dispatch(aCx)) {
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
return JS_NewStringCopyN(aCx, value.get(), value.Length());
|
||||
|
@ -948,7 +948,7 @@ nsHTMLEditor::GetBlockNodeParent(nsIDOMNode *aNode)
|
||||
if (!aNode)
|
||||
{
|
||||
NS_NOTREACHED("null node passed to GetBlockNodeParent()");
|
||||
return false;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMNode> p;
|
||||
@ -5680,7 +5680,7 @@ nsHTMLEditor::IsActiveInDOMWindow()
|
||||
nsIContent*
|
||||
nsHTMLEditor::GetActiveEditingHost()
|
||||
{
|
||||
NS_ENSURE_TRUE(mDocWeak, false);
|
||||
NS_ENSURE_TRUE(mDocWeak, nsnull);
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocWeak);
|
||||
NS_ENSURE_TRUE(doc, nsnull);
|
||||
|
@ -302,7 +302,7 @@ nsPropertyEnumeratorByURL::HasMoreElements(bool * aResult)
|
||||
}
|
||||
|
||||
if (!hasMore)
|
||||
mCurrent = false;
|
||||
mCurrent = nsnull;
|
||||
|
||||
*aResult = mCurrent ? true : false;
|
||||
|
||||
|
@ -187,7 +187,7 @@ GeneratePropertyOp(JSContext *cx, JSObject *obj, jsid id, uintN argc, Op pop)
|
||||
JSFunction *fun =
|
||||
js::NewFunctionByIdWithReserved(cx, PropertyOpForwarder<Op>, argc, 0, obj, id);
|
||||
if (!fun)
|
||||
return false;
|
||||
return nsnull;
|
||||
|
||||
JSObject *funobj = JS_GetFunctionObject(fun);
|
||||
|
||||
@ -197,10 +197,10 @@ GeneratePropertyOp(JSContext *cx, JSObject *obj, jsid id, uintN argc, Op pop)
|
||||
// second object to work around this.
|
||||
JSObject *ptrobj = JS_NewObject(cx, &PointerHolderClass, nsnull, funobj);
|
||||
if (!ptrobj)
|
||||
return false;
|
||||
return nsnull;
|
||||
Op *popp = new Op;
|
||||
if (!popp)
|
||||
return false;
|
||||
return nsnull;
|
||||
*popp = pop;
|
||||
JS_SetPrivate(cx, ptrobj, popp);
|
||||
|
||||
|
@ -639,7 +639,7 @@ public:
|
||||
{
|
||||
nsCAutoString spec;
|
||||
if (NS_FAILED(aURI->GetSpec(spec)))
|
||||
return false;
|
||||
return nsnull;
|
||||
return FindChildURI(spec, aNodeIndex);
|
||||
}
|
||||
nsNavHistoryResultNode* FindChildURI(const nsACString& aSpec,
|
||||
|
Loading…
Reference in New Issue
Block a user