Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2020-02-14 22:49:37 +08:00
commit 3a29482353
6 changed files with 55 additions and 41 deletions

View file

@ -3291,6 +3291,10 @@ BackgroundCursorChild::HandleResponse(
auto& responses =
const_cast<nsTArray<ObjectStoreCursorResponse>&>(aResponses);
// If a new cursor is created, we need to keep a reference to it until the
// ResultHelper creates a DOM Binding.
RefPtr<IDBCursor> newCursor;
for (ObjectStoreCursorResponse& response : responses) {
StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo()));
cloneReadInfo.mDatabase = mTransaction->Database();
@ -3300,8 +3304,6 @@ BackgroundCursorChild::HandleResponse(
nullptr,
cloneReadInfo.mFiles);
RefPtr<IDBCursor> newCursor;
if (mCursor) {
mCursor->Reset(Move(response.key()), Move(cloneReadInfo));
} else {

View file

@ -555,6 +555,14 @@ void
BufferTextureHost::DeallocateDeviceData()
{
if (mFirstSource && mFirstSource->NumCompositableRefs() > 0) {
// WrappingTextureSourceYCbCrBasic wraps YUV format BufferTextureHost.
// When BufferTextureHost is destroyed, data of
// WrappingTextureSourceYCbCrBasic becomes invalid.
if (mFirstSource->AsWrappingTextureSourceYCbCrBasic() &&
mFirstSource->IsOwnedBy(this)) {
mFirstSource->SetOwner(nullptr);
mFirstSource->DeallocateDeviceData();
}
return;
}

View file

@ -199,7 +199,7 @@ nsHttpHandler::nsHttpHandler()
, mLegacyAppVersion("5.0")
, mProduct("Goanna")
, mCompatFirefoxEnabled(false)
, mCompatFirefoxVersion("52.9")
, mCompatFirefoxVersion("68.9")
, mUserAgentIsDirty(true)
, mAcceptLanguagesIsDirty(true)
, mPromptTempRedirect(true)

View file

@ -717,8 +717,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
tokenizer.setState(Tokenizer.DATA);
}
}
contextName = null;
contextNode = null;
} else {
mode = INITIAL;
// If we are viewing XML source, put a foreign element permanently
@ -1627,6 +1625,8 @@ public abstract class TreeBuilder<T> implements TokenHandler,
public final void endTokenization() throws SAXException {
formPointer = null;
headPointer = null;
contextName = null;
contextNode = null;
deepTreeSurrogateParent = null;
templateModeStack = null;
if (stack != null) {

View file

@ -141,8 +141,6 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
tokenizer->setState(nsHtml5Tokenizer::DATA);
}
}
contextName = nullptr;
contextNode = nullptr;
} else {
mode = INITIAL;
if (tokenizer->isViewingXmlSource()) {
@ -578,6 +576,8 @@ nsHtml5TreeBuilder::endTokenization()
{
formPointer = nullptr;
headPointer = nullptr;
contextName = nullptr;
contextNode = nullptr;
deepTreeSurrogateParent = nullptr;
templateModeStack = nullptr;
if (stack) {

View file

@ -4139,45 +4139,49 @@ XRE_InitCommandLine(int aArgc, char* aArgv[])
delete[] canonArgs;
#endif
const char *path = nullptr;
ArgResult ar = CheckArg("greomni", true, &path);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR,
"Error: argument --greomni requires a path argument or the "
"--osint argument was specified with the --greomni argument "
"which is invalid.\n");
return NS_ERROR_FAILURE;
}
if (PR_GetEnv("UXP_CUSTOM_OMNI")) {
// Process CLI parameters for specifying custom omnijars
const char *path = nullptr;
ArgResult ar = CheckArg("greomni", true, &path);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR,
"Error: argument --greomni requires a path argument or the "
"--osint argument was specified with the --greomni argument "
"which is invalid.\n");
return NS_ERROR_FAILURE;
}
if (!path)
return rv;
if (!path)
return rv;
nsCOMPtr<nsIFile> greOmni;
rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni));
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n");
return rv;
}
nsCOMPtr<nsIFile> greOmni;
rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni));
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n");
return rv;
}
ar = CheckArg("appomni", true, &path);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR,
"Error: argument --appomni requires a path argument or the "
"--osint argument was specified with the --appomni argument "
"which is invalid.\n");
return NS_ERROR_FAILURE;
}
ar = CheckArg("appomni", true, &path);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR,
"Error: argument --appomni requires a path argument or the "
"--osint argument was specified with the --appomni argument "
"which is invalid.\n");
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIFile> appOmni;
if (path) {
rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni));
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n");
return rv;
}
}
nsCOMPtr<nsIFile> appOmni;
if (path) {
rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni));
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n");
return rv;
}
}
mozilla::Omnijar::Init(greOmni, appOmni);
} // UXP_CUSTOM_OMNI
mozilla::Omnijar::Init(greOmni, appOmni);
return rv;
}