mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 810668 - Fix some gcc4.6 build warnings; r=bz
This commit is contained in:
parent
caa2811c9c
commit
4f3a54421a
@ -6225,8 +6225,6 @@ NS_IMETHODIMP
|
||||
nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
|
||||
uint32_t aStateFlags, nsresult aStatus)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if ((~aStateFlags & (STATE_START | STATE_IS_NETWORK)) == 0) {
|
||||
// Save timing statistics.
|
||||
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
|
||||
@ -6241,7 +6239,7 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
|
||||
|
||||
// We don't update navigation timing for wyciwyg channels
|
||||
if (this == aProgress && !wcwgChannel){
|
||||
rv = MaybeInitTiming();
|
||||
MaybeInitTiming();
|
||||
if (mTiming) {
|
||||
mTiming->NotifyFetchStart(uri, ConvertLoadTypeToNavigationType(mLoadType));
|
||||
}
|
||||
@ -6285,11 +6283,11 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
|
||||
// from the channel and store it in session history.
|
||||
// Pass false for aCloneChildren, since we're creating
|
||||
// a new DOM here.
|
||||
rv = AddToSessionHistory(uri, wcwgChannel, nullptr, false,
|
||||
getter_AddRefs(mLSHE));
|
||||
AddToSessionHistory(uri, wcwgChannel, nullptr, false,
|
||||
getter_AddRefs(mLSHE));
|
||||
SetCurrentURI(uri, aRequest, true, 0);
|
||||
// Save history state of the previous page
|
||||
rv = PersistLayoutHistoryState();
|
||||
PersistLayoutHistoryState();
|
||||
// We'll never get an Embed() for this load, so just go ahead
|
||||
// and SetHistoryEntry now.
|
||||
SetHistoryEntry(&mOSHE, mLSHE);
|
||||
|
@ -31,9 +31,11 @@
|
||||
#include "nsSize.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsVersionComparator.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "ANPBase.h"
|
||||
@ -47,7 +49,6 @@
|
||||
#include "GLContextProvider.h"
|
||||
#include "TexturePoolOGL.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gl;
|
||||
|
||||
typedef nsNPAPIPluginInstance::TextureInfo TextureInfo;
|
||||
|
@ -276,25 +276,22 @@ Load(JSContext *cx,
|
||||
unsigned argc,
|
||||
jsval *vp)
|
||||
{
|
||||
unsigned i;
|
||||
JSString *str;
|
||||
jsval result;
|
||||
FILE *file;
|
||||
|
||||
JSObject *obj = JS_THIS_OBJECT(cx, vp);
|
||||
if (!obj)
|
||||
return JS_FALSE;
|
||||
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
for (i = 0; i < argc; i++) {
|
||||
str = JS_ValueToString(cx, argv[i]);
|
||||
for (unsigned i = 0; i < argc; i++) {
|
||||
JSString *str = JS_ValueToString(cx, argv[i]);
|
||||
if (!str)
|
||||
return JS_FALSE;
|
||||
argv[i] = STRING_TO_JSVAL(str);
|
||||
JSAutoByteString filename(cx, str);
|
||||
if (!filename)
|
||||
return JS_FALSE;
|
||||
file = fopen(filename.ptr(), "r");
|
||||
FILE *file = fopen(filename.ptr(), "r");
|
||||
if (!file) {
|
||||
JS_ReportError(cx, "cannot open file '%s' for reading", filename.ptr());
|
||||
return JS_FALSE;
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
/* storage of the frame tree and information about it */
|
||||
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -3580,7 +3580,7 @@ nsRuleNode::GetShadowData(const nsCSSValueList* aList,
|
||||
return nullptr;
|
||||
|
||||
nsStyleCoord tempCoord;
|
||||
bool unitOK;
|
||||
DebugOnly<bool> unitOK;
|
||||
for (nsCSSShadowItem* item = shadowList->ShadowAt(0);
|
||||
aList;
|
||||
aList = aList->mNext, ++item) {
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "nsIScriptableRegion.h"
|
||||
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsAccessibilityService.h"
|
||||
|
@ -512,19 +512,12 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context,
|
||||
URLLoadInfo* info = (URLLoadInfo*)context;
|
||||
|
||||
if (info) {
|
||||
#ifdef PR_LOGGING
|
||||
double connectTime;
|
||||
#endif
|
||||
double readTime;
|
||||
uint32_t httpStatus;
|
||||
bool bHTTPURL = false;
|
||||
|
||||
info->mTotalTime = PR_Now() - info->mTotalTime;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
connectTime = (info->mConnectTime/1000.0)/1000.0;
|
||||
#endif
|
||||
readTime = ((info->mTotalTime-info->mConnectTime)/1000.0)/1000.0;
|
||||
double readTime = ((info->mTotalTime-info->mConnectTime)/1000.0)/1000.0;
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(request));
|
||||
if (pHTTPCon) {
|
||||
@ -540,7 +533,7 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context,
|
||||
NS_ERROR_UNKNOWN_PROXY_HOST == aStatus) {
|
||||
LOG(("\tDNS lookup failed.\n"));
|
||||
}
|
||||
LOG(("\tTime to connect: %.3f seconds\n", connectTime));
|
||||
LOG(("\tTime to connect: %.3f seconds\n", (info->mConnectTime/1000.0)/1000.0));
|
||||
LOG(("\tTime to read: %.3f seconds.\n", readTime));
|
||||
LOG(("\tRead: %lld bytes.\n", info->mBytesRead));
|
||||
if (info->mBytesRead == int64_t(0)) {
|
||||
|
@ -616,14 +616,16 @@ CopyElement(nsISupports* aElement, void *aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSupportsArray::Clone(nsISupportsArray* *result)
|
||||
nsSupportsArray::Clone(nsISupportsArray** aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
nsISupportsArray* newArray;
|
||||
rv = NS_NewISupportsArray(&newArray);
|
||||
nsCOMPtr<nsISupportsArray> newArray;
|
||||
nsresult rv = NS_NewISupportsArray(getter_AddRefs(newArray));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool ok = EnumerateForwards(CopyElement, newArray);
|
||||
if (!ok) return NS_ERROR_OUT_OF_MEMORY;
|
||||
*result = newArray;
|
||||
NS_ENSURE_TRUE(ok, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
newArray.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user