Merge last PGO-green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2012-09-10 15:02:46 +01:00
Родитель e3fbd8f676 cc392b52cd
Коммит 44a8beda6f
29 изменённых файлов: 268 добавлений и 97 удалений

Просмотреть файл

@ -86,9 +86,9 @@ nsChromeRegistry::LogMessageWithContext(nsIURI* aURL, uint32_t aLineNumber, uint
if (aURL)
aURL->GetSpec(spec);
rv = error->Init(NS_ConvertUTF8toUTF16(formatted).get(),
NS_ConvertUTF8toUTF16(spec).get(),
nullptr,
rv = error->Init(NS_ConvertUTF8toUTF16(formatted),
NS_ConvertUTF8toUTF16(spec),
EmptyString(),
aLineNumber, 0, flags, "chrome registration");
PR_smprintf_free(formatted);

Просмотреть файл

@ -3260,9 +3260,9 @@ nsContentUtils::ReportToConsole(uint32_t aErrorFlags,
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = errorObject->InitWithWindowID(errorText.get(),
NS_ConvertUTF8toUTF16(spec).get(), // file name
aSourceLine.get(),
rv = errorObject->InitWithWindowID(errorText,
NS_ConvertUTF8toUTF16(spec), // file name
aSourceLine,
aLineNumber, aColumnNumber,
aErrorFlags, aCategory,
innerWindowID);

Просмотреть файл

@ -1093,9 +1093,9 @@ nsEventSource::PrintErrorOnConsole(const char *aBundleURI,
}
NS_ENSURE_SUCCESS(rv, rv);
rv = errObj->InitWithWindowID(message.get(),
mScriptFile.get(),
nullptr,
rv = errObj->InitWithWindowID(message,
mScriptFile,
EmptyString(),
mScriptLine, 0,
nsIScriptError::errorFlag,
"Event Source", mInnerWindowID);

Просмотреть файл

@ -683,10 +683,10 @@ ContentScriptErrorReporter(JSContext* aCx,
if (aReport) {
if (aReport->ucmessage) {
message.Assign(reinterpret_cast<const PRUnichar*>(aReport->ucmessage));
message.Assign(static_cast<const PRUnichar*>(aReport->ucmessage));
}
filename.AssignWithConversion(aReport->filename);
line.Assign(reinterpret_cast<const PRUnichar*>(aReport->uclinebuf));
line.Assign(static_cast<const PRUnichar*>(aReport->uclinebuf));
lineNumber = aReport->lineno;
columnNumber = aReport->uctokenptr - aReport->uclinebuf;
flags = aReport->flags;
@ -700,7 +700,7 @@ ContentScriptErrorReporter(JSContext* aCx,
message.AssignWithConversion(aMessage);
}
rv = scriptError->Init(message.get(), filename.get(), line.get(),
rv = scriptError->Init(message, filename, line,
lineNumber, columnNumber, flags,
"Message manager content script");
if (NS_FAILED(rv)) {
@ -731,7 +731,7 @@ ContentScriptErrorReporter(JSContext* aCx,
error.AppendInt(lineNumber, 10);
error.Append(": ");
if (aReport->ucmessage) {
AppendUTF16toUTF8(reinterpret_cast<const PRUnichar*>(aReport->ucmessage),
AppendUTF16toUTF8(static_cast<const PRUnichar*>(aReport->ucmessage),
error);
} else {
error.Append(aMessage);

Просмотреть файл

@ -130,9 +130,9 @@ nsWebSocket::PrintErrorOnConsole(const char *aBundleURI,
}
NS_ENSURE_SUCCESS(rv, rv);
rv = errorObject->InitWithWindowID(message.get(),
NS_ConvertUTF8toUTF16(mScriptFile).get(),
nullptr, mScriptLine, 0,
rv = errorObject->InitWithWindowID(message,
NS_ConvertUTF8toUTF16(mScriptFile),
EmptyString(), mScriptLine, 0,
nsIScriptError::errorFlag, "Web Socket",
mInnerWindowID);
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -218,10 +218,15 @@ XBL_ProtoErrorReporter(JSContext *cx,
if (errorObject && consoleService) {
uint32_t column = report->uctokenptr - report->uclinebuf;
const PRUnichar* ucmessage =
static_cast<const PRUnichar*>(report->ucmessage);
const PRUnichar* uclinebuf =
static_cast<const PRUnichar*>(report->uclinebuf);
errorObject->Init
(reinterpret_cast<const PRUnichar*>(report->ucmessage),
NS_ConvertUTF8toUTF16(report->filename).get(),
reinterpret_cast<const PRUnichar*>(report->uclinebuf),
(ucmessage ? nsDependentString(ucmessage) : EmptyString(),
NS_ConvertUTF8toUTF16(report->filename),
uclinebuf ? nsDependentString(uclinebuf) : EmptyString(),
report->lineno, column, report->flags,
"xbl javascript"
);

Просмотреть файл

@ -368,8 +368,10 @@ nsXMLDocument::Load(const nsAString& aUrl, bool *aReturn)
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = errorObject->InitWithWindowID(error.get(), NS_ConvertUTF8toUTF16(spec).get(),
nullptr, 0, 0, nsIScriptError::warningFlag,
rv = errorObject->InitWithWindowID(error,
NS_ConvertUTF8toUTF16(spec),
EmptyString(),
0, 0, nsIScriptError::warningFlag,
"DOM",
callingDoc ?
callingDoc->InnerWindowID() :

Просмотреть файл

@ -1953,9 +1953,9 @@ PrintWarningOnConsole(JSContext *cx, const char *stringBundleProperty)
}
}
nsresult rv = scriptError->InitWithWindowID(msg.get(),
sourcefile.get(),
EmptyString().get(),
nsresult rv = scriptError->InitWithWindowID(msg,
sourcefile,
EmptyString(),
lineno,
0, // column for error is not available
nsIScriptError::warningFlag,
@ -5986,9 +5986,9 @@ IDBConstantGetter(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHan
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
NS_WARN_IF_FALSE(errorObject, "Failed to create error object");
if (errorObject) {
nsresult rv = errorObject->InitWithWindowID(warnText.get(),
nullptr, // file name
nullptr, // source line
nsresult rv = errorObject->InitWithWindowID(warnText,
EmptyString(), // file name
EmptyString(), // source line
0, 0, // Line/col number
nsIScriptError::warningFlag,
"DOM Core", windowID);

Просмотреть файл

@ -401,8 +401,8 @@ public:
? "chrome javascript"
: "content javascript";
rv = errorObject->InitWithWindowID(mErrorMsg.get(), mFileName.get(),
mSourceLine.get(),
rv = errorObject->InitWithWindowID(mErrorMsg, mFileName,
mSourceLine,
mLineNr, mColumn, mFlags,
category, mInnerWindowID);

Просмотреть файл

@ -364,6 +364,10 @@ IndexedDatabaseManager::FireWindowOnError(nsPIDOMWindow* aOwner,
nsScriptErrorEvent event(true, NS_LOAD_ERROR);
request->FillScriptErrorEvent(&event);
NS_ABORT_IF_FALSE(event.fileName,
"FillScriptErrorEvent should give us a non-null string "
"for our error's fileName");
event.errorMsg = errorName.get();
nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryInterface(aOwner));
@ -385,9 +389,9 @@ IndexedDatabaseManager::FireWindowOnError(nsPIDOMWindow* aOwner,
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(scriptError->InitWithWindowID(event.errorMsg,
event.fileName,
nullptr, event.lineNr,
if (NS_FAILED(scriptError->InitWithWindowID(errorName,
nsDependentString(event.fileName),
EmptyString(), event.lineNr,
0, 0,
"IndexedDB",
aOwner->WindowID()))) {

Просмотреть файл

@ -1797,7 +1797,7 @@ ContentParent::RecvScriptError(const nsString& aMessage,
return true;
nsCOMPtr<nsIScriptError> msg(do_CreateInstance(NS_SCRIPTERROR_CONTRACTID));
nsresult rv = msg->Init(aMessage.get(), aSourceName.get(), aSourceLine.get(),
nsresult rv = msg->Init(aMessage, aSourceName, aSourceLine,
aLineNumber, aColNumber, aFlags, aCategory.get());
if (NS_FAILED(rv))
return true;

Просмотреть файл

@ -5,3 +5,4 @@ qemu = true
[test_between_emulators.py]
[test_incoming.js]
[test_outgoing.js]

Просмотреть файл

@ -0,0 +1,143 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 20000;
SpecialPowers.setBoolPref("dom.sms.enabled", true);
SpecialPowers.addPermission("sms", true, document);
SpecialPowers.addPermission("mobileconnection", true, document);
let sms = window.navigator.mozSms;
let receiver = "5555552368";
let body = "Hello SMS world!";
function checkSentMessage(message, sentDate) {
ok(message, "message is valid");
ok(message instanceof MozSmsMessage,
"message is instanceof " + message.constructor);
ok(message.id, "message.id is valid");
is(message.delivery, "sent", "message.delivery");
is(message.sender, null, "message.sender");
is(message.receiver, receiver, "message.receiver");
is(message.body, body, "message.body");
ok(message.timestamp instanceof Date,
"message.timestamp is instanceof " + message.timestamp.constructor);
// SMSC timestamp is in seconds.
ok(Math.floor(message.timestamp.getTime() / 1000) >= Math.floor(sentDate / 1000),
"sent timestamp is valid");
is(message.read, true, "message.read");
}
let sentMessages = null;
function checkSameSentMessage(message, now) {
checkSentMessage(message, now);
let sentMessage = sentMessages[message.id];
if (!sentMessage) {
sentMessages[message.id] = message;
return;
}
// The two message instance should be exactly the same, but since we had
// already checked most attributes of them, we only compare their
// timestamps here.
ok(sentMessage.timestamp.getTime() == message.timestamp.getTime(),
"the messages got from onsent event and request result must be the same");
}
function doSendMessageAndCheckSuccess(receivers, callback) {
sentMessages = [];
let now = Date.now();
let count;
function done() {
if (--count > 0) {
return;
}
sms.removeEventListener("sent", onSmsSent);
setTimeout(callback, 0);
}
function onSmsSent(event) {
log("SmsManager.onsent event received.");
ok(event instanceof MozSmsEvent,
"event is instanceof " + event.constructor);
// Event listener is removed in done().
checkSameSentMessage(event.message, now);
done();
}
function onRequestSuccess(event) {
log("SmsRequest.onsuccess event received.");
ok(event.target instanceof MozSmsRequest,
"event.target is instanceof " + event.target.constructor);
event.target.removeEventListener("success", onRequestSuccess);
checkSameSentMessage(event.target.result, now);
done();
}
sms.addEventListener("sent", onSmsSent);
let result = sms.send(receivers, body);
if (Array.isArray(receivers)) {
ok(Array.isArray(result),
"send() returns an array of requests if receivers is an array");
is(result.length, receivers.length, "returned array length");
// `receivers` is an array, so we have N request.onsuccess and N sms.onsent.
count = result.length * 2;
for (let i = 0; i < result.length; i++) {
let request = result[i];
ok(request instanceof MozSmsRequest,
"request is instanceof " + request.constructor);
request.addEventListener("success", onRequestSuccess);
}
return;
}
// `receivers` is not an array, so we have one request.onsuccess and one
// sms.onsent.
count = 2;
let request = result;
ok(request instanceof MozSmsRequest,
"request is instanceof " + request.constructor);
request.addEventListener("success", onRequestSuccess);
}
function testSendMessage() {
log("Testing sending message to one receiver:");
doSendMessageAndCheckSuccess(receiver, testSendMessageToMultipleRecipients);
}
function testSendMessageToMultipleRecipients() {
log("Testing sending message to multiple receivers:");
// TODO: bug 788928 - add test cases for nsIDOMSmsManager.ondelivered event
doSendMessageAndCheckSuccess([receiver, receiver], cleanUp);
}
function cleanUp() {
SpecialPowers.removePermission("sms", document);
SpecialPowers.removePermission("mobileconnection", document);
finish();
}
waitFor(testSendMessage, function () {
let connected = navigator.mozMobileConnection.voice.connected;
if (!connected) {
log("MobileConnection is not ready yet.");
}
return connected;
});

Просмотреть файл

@ -34,6 +34,7 @@ const nsIRadioInterfaceLayer = Ci.nsIRadioInterfaceLayer;
const kNetworkInterfaceStateChangedTopic = "network-interface-state-changed";
const kSmsReceivedObserverTopic = "sms-received";
const kSmsSentObserverTopic = "sms-sent";
const kSmsDeliveredObserverTopic = "sms-delivered";
const kMozSettingsChangedObserverTopic = "mozsettings-changed";
const kSysMsgListenerReadyObserverTopic = "system-message-listener-ready";
@ -1018,6 +1019,8 @@ RadioInterfaceLayer.prototype = {
}
gSmsRequestManager.notifySmsSent(options.requestId, sms);
Services.obs.notifyObservers(options.sms, kSmsSentObserverTopic, null);
},
handleSmsDelivered: function handleSmsDelivered(message) {

Просмотреть файл

@ -2898,7 +2898,7 @@ let RIL = {
let messageStringLength = Buf.readUint32();
if (DEBUG) debug("Got new SMS, length " + messageStringLength);
let message = GsmPDUHelper.readMessage();
if (DEBUG) debug(message);
if (DEBUG) debug("Got new SMS: " + JSON.stringify(message));
// Read string delimiters. See Buf.readString().
Buf.readStringDelimiter(length);
@ -2958,11 +2958,13 @@ let RIL = {
_processSmsStatusReport: function _processSmsStatusReport(length) {
let message = this._processReceivedSms(length);
if (!message) {
if (DEBUG) debug("invalid SMS-STATUS-REPORT");
return PDU_FCS_UNSPECIFIED;
}
let options = this._pendingSentSmsMap[message.messageRef];
if (!options) {
if (DEBUG) debug("no pending SMS-SUBMIT message");
return PDU_FCS_OK;
}
@ -2985,12 +2987,14 @@ let RIL = {
// Pending. Waiting for next status report.
if ((status >>> 5) == 0x01) {
if (DEBUG) debug("SMS-STATUS-REPORT: delivery still pending");
return PDU_FCS_OK;
}
delete this._pendingSentSmsMap[message.messageRef];
if ((status >>> 5) != 0x00) {
if (DEBUG) debug("SMS-STATUS-REPORT: delivery failed");
// It seems unlikely to get a result code for a failure to deliver.
// Even if, we don't want to do anything with this.
return PDU_FCS_OK;
@ -3525,6 +3529,7 @@ RIL[REQUEST_SEND_SMS] = function REQUEST_SEND_SMS(length, options) {
options.errorCode = Buf.readUint32();
if (options.requestStatusReport) {
if (DEBUG) debug("waiting SMS-STATUS-REPORT for messageRef " + options.messageRef);
this._pendingSentSmsMap[options.messageRef] = options;
}

Просмотреть файл

@ -1073,9 +1073,9 @@ public:
NS_WARN_IF_FALSE(scriptError, "Failed to create script error!");
if (scriptError) {
if (NS_FAILED(scriptError->InitWithWindowID(aMessage.get(),
aFilename.get(),
aLine.get(), aLineNumber,
if (NS_FAILED(scriptError->InitWithWindowID(aMessage,
aFilename,
aLine, aLineNumber,
aColumnNumber, aFlags,
"Web Worker",
aInnerWindowId))) {

Просмотреть файл

@ -106,9 +106,9 @@ Decoder::Finish()
NS_ConvertASCIItoUTF16(mImage.GetURIString()));
if (NS_SUCCEEDED(errorObject->InitWithWindowID(
msg.get(),
NS_ConvertUTF8toUTF16(mImage.GetURIString()).get(),
nullptr, 0, 0, nsIScriptError::errorFlag,
msg,
NS_ConvertUTF8toUTF16(mImage.GetURIString()),
EmptyString(), 0, 0, nsIScriptError::errorFlag,
"Image", mImage.InnerWindowID()
))) {
consoleService->LogMessage(errorObject);

Просмотреть файл

@ -11,7 +11,7 @@
#include "nsISupports.idl"
#include "nsIConsoleMessage.idl"
[scriptable, uuid(c6dd877a-87b6-47cc-968d-90f4514ec65f)]
[scriptable, uuid(ddc19b34-e22e-46d5-9f7f-c7768a7dc50a)]
interface nsIScriptError : nsIConsoleMessage
{
/** pseudo-flag for default case */
@ -66,9 +66,9 @@ interface nsIScriptError : nsIConsoleMessage
returned if init() was used instead of initWithWindowID(). */
readonly attribute unsigned long long innerWindowID;
void init(in wstring message,
in wstring sourceName,
in wstring sourceLine,
void init(in AString message,
in AString sourceName,
in AString sourceLine,
in uint32_t lineNumber,
in uint32_t columnNumber,
in uint32_t flags,
@ -77,9 +77,9 @@ interface nsIScriptError : nsIConsoleMessage
/* This should be called instead of nsIScriptError.init to
initialize with a window id. The window id should be for the
inner window associated with this error. */
void initWithWindowID(in wstring message,
in wstring sourceName,
in wstring sourceLine,
void initWithWindowID(in AString message,
in AString sourceName,
in AString sourceLine,
in uint32_t lineNumber,
in uint32_t columnNumber,
in uint32_t flags,

Просмотреть файл

@ -125,21 +125,19 @@ mozJSLoaderErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep)
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
if (consoleService && errorObject) {
/*
* Got an error object; prepare appropriate-width versions of
* various arguments to it.
*/
NS_ConvertASCIItoUTF16 fileUni(rep->filename);
uint32_t column = rep->uctokenptr - rep->uclinebuf;
rv = errorObject->Init(reinterpret_cast<const PRUnichar*>
(rep->ucmessage),
fileUni.get(),
reinterpret_cast<const PRUnichar*>
(rep->uclinebuf),
rep->lineno, column, rep->flags,
"component javascript");
const PRUnichar* ucmessage =
static_cast<const PRUnichar*>(rep->ucmessage);
const PRUnichar* uclinebuf =
static_cast<const PRUnichar*>(rep->uclinebuf);
rv = errorObject->Init(
ucmessage ? nsDependentString(ucmessage) : EmptyString(),
NS_ConvertASCIItoUTF16(rep->filename),
uclinebuf ? nsDependentString(uclinebuf) : EmptyString(),
rep->lineno, column, rep->flags,
"component javascript");
if (NS_SUCCEEDED(rv)) {
rv = consoleService->LogMessage(errorObject);
if (NS_SUCCEEDED(rv)) {

Просмотреть файл

@ -2784,9 +2784,16 @@ nsXPCComponents_Utils::ReportError(const JS::Value &error, JSContext *cx)
uint32_t column = err->uctokenptr - err->uclinebuf;
const PRUnichar* ucmessage =
static_cast<const PRUnichar*>(err->ucmessage);
const PRUnichar* uclinebuf =
static_cast<const PRUnichar*>(err->uclinebuf);
nsresult rv = scripterr->InitWithWindowID(
static_cast<const PRUnichar*>(err->ucmessage), fileUni.get(),
static_cast<const PRUnichar*>(err->uclinebuf), err->lineno,
ucmessage ? nsDependentString(ucmessage) : EmptyString(),
fileUni,
uclinebuf ? nsDependentString(uclinebuf) : EmptyString(),
err->lineno,
column, err->flags, "XPConnect JavaScript", innerWindowID);
NS_ENSURE_SUCCESS(rv, NS_OK);
@ -2817,9 +2824,9 @@ nsXPCComponents_Utils::ReportError(const JS::Value &error, JSContext *cx)
return NS_OK;
nsresult rv = scripterr->InitWithWindowID(
reinterpret_cast<const PRUnichar *>(msgchars),
NS_ConvertUTF8toUTF16(fileName).get(),
nullptr, lineNo, 0, 0, "XPConnect JavaScript", innerWindowID);
nsDependentString(static_cast<const PRUnichar *>(msgchars)),
NS_ConvertUTF8toUTF16(fileName),
EmptyString(), lineNo, 0, 0, "XPConnect JavaScript", innerWindowID);
NS_ENSURE_SUCCESS(rv, NS_OK);
console->LogMessage(scripterr);

Просмотреть файл

@ -1350,24 +1350,25 @@ XPCConvert::JSErrorToXPCException(XPCCallContext& ccx,
if (report) {
nsAutoString bestMessage;
if (report && report->ucmessage) {
bestMessage = (const PRUnichar *)report->ucmessage;
bestMessage = static_cast<const PRUnichar*>(report->ucmessage);
} else if (message) {
CopyASCIItoUTF16(message, bestMessage);
} else {
bestMessage.AssignLiteral("JavaScript Error");
}
const PRUnichar* uclinebuf =
static_cast<const PRUnichar*>(report->uclinebuf);
data = new nsScriptError();
if (!data)
return NS_ERROR_OUT_OF_MEMORY;
data->InitWithWindowID(bestMessage.get(),
NS_ConvertASCIItoUTF16(report->filename).get(),
(const PRUnichar *)report->uclinebuf, report->lineno,
report->uctokenptr - report->uclinebuf, report->flags,
"XPConnect JavaScript",
nsJSUtils::GetCurrentlyRunningCodeInnerWindowID(ccx.GetJSContext()));
data->InitWithWindowID(
bestMessage,
NS_ConvertASCIItoUTF16(report->filename),
uclinebuf ? nsDependentString(uclinebuf) : EmptyString(),
report->lineno,
report->uctokenptr - report->uclinebuf, report->flags,
"XPConnect JavaScript",
nsJSUtils::GetCurrentlyRunningCodeInnerWindowID(ccx.GetJSContext()));
}
if (data) {

Просмотреть файл

@ -1081,9 +1081,9 @@ nsXPCWrappedJSClass::CheckForException(XPCCallContext & ccx,
rv = location->GetFilename(getter_Copies(sourceName));
}
rv = scriptError->InitWithWindowID(newMessage.get(),
NS_ConvertASCIItoUTF16(sourceName).get(),
nullptr,
rv = scriptError->InitWithWindowID(newMessage,
NS_ConvertASCIItoUTF16(sourceName),
EmptyString(),
lineNumber, 0, 0,
"XPConnect JavaScript",
nsJSUtils::GetCurrentlyRunningCodeInnerWindowID(cx));

Просмотреть файл

@ -91,9 +91,9 @@ nsScriptError::GetCategory(char **result) {
}
NS_IMETHODIMP
nsScriptError::Init(const PRUnichar *message,
const PRUnichar *sourceName,
const PRUnichar *sourceLine,
nsScriptError::Init(const nsAString& message,
const nsAString& sourceName,
const nsAString& sourceLine,
uint32_t lineNumber,
uint32_t columnNumber,
uint32_t flags,
@ -104,9 +104,9 @@ nsScriptError::Init(const PRUnichar *message,
}
NS_IMETHODIMP
nsScriptError::InitWithWindowID(const PRUnichar *message,
const PRUnichar *sourceName,
const PRUnichar *sourceLine,
nsScriptError::InitWithWindowID(const nsAString& message,
const nsAString& sourceName,
const nsAString& sourceLine,
uint32_t lineNumber,
uint32_t columnNumber,
uint32_t flags,

Просмотреть файл

@ -406,9 +406,9 @@ nsCSSScanner::OutputError()
do_CreateInstance(gScriptErrorFactory, &rv);
if (NS_SUCCEEDED(rv)) {
rv = errorObject->InitWithWindowID(mError.get(),
NS_ConvertUTF8toUTF16(mFileName).get(),
EmptyString().get(),
rv = errorObject->InitWithWindowID(mError,
NS_ConvertUTF8toUTF16(mFileName),
EmptyString(),
mErrorLineNumber,
mErrorColNumber,
nsIScriptError::warningFlag,

Просмотреть файл

@ -779,9 +779,9 @@ nsUserFontSet::LogMessage(gfxProxyFontEntry *aProxy,
NS_ENSURE_SUCCESS(rv, rv);
uint64_t innerWindowID = GetPresContext()->Document()->InnerWindowID();
rv = scriptError->InitWithWindowID(NS_ConvertUTF8toUTF16(msg).get(),
href.get(), // file
text.get(), // src line
rv = scriptError->InitWithWindowID(NS_ConvertUTF8toUTF16(msg),
href, // file
text, // src line
0, 0, // line & column number
aFlags, // flags
"CSS Loader", // category (make separate?)

Просмотреть файл

@ -220,7 +220,7 @@
}
*|*:-moz-full-screen {
*|*:not(:root):-moz-full-screen {
position: fixed !important;
top: 0 !important;
left: 0 !important;

Просмотреть файл

@ -928,9 +928,9 @@ nsExpatDriver::HandleError()
nsCOMPtr<nsIScriptError> serr(do_CreateInstance(NS_SCRIPTERROR_CONTRACTID));
nsresult rv = NS_ERROR_FAILURE;
if (serr) {
rv = serr->InitWithWindowID(description.get(),
mURISpec.get(),
mLastLine.get(),
rv = serr->InitWithWindowID(description,
mURISpec,
mLastLine,
lineNumber, colNumber,
nsIScriptError::errorFlag, "malformed-xml",
mInnerWindowID);

Просмотреть файл

@ -170,8 +170,8 @@ void LogMessageWithContext(FileLocation &aFile,
if (!console)
return;
nsresult rv = error->Init(NS_ConvertUTF8toUTF16(formatted).get(),
NS_ConvertUTF8toUTF16(file).get(), NULL,
nsresult rv = error->Init(NS_ConvertUTF8toUTF16(formatted),
NS_ConvertUTF8toUTF16(file), EmptyString(),
aLineNumber, 0, nsIScriptError::warningFlag,
"chrome registration");
if (NS_FAILED(rv))

Просмотреть файл

@ -74,6 +74,8 @@ nsDirectoryService::GetCurrentProcessDirectory(nsIFile** aFile)
rv = nsDirectoryService::Create(nullptr,
NS_GET_IID(nsIProperties),
getter_AddRefs(dirService)); // needs to be around for life of product
if (NS_FAILED(rv))
return rv;
if (dirService)
{