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 = auto& responses =
const_cast<nsTArray<ObjectStoreCursorResponse>&>(aResponses); 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) { for (ObjectStoreCursorResponse& response : responses) {
StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo())); StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo()));
cloneReadInfo.mDatabase = mTransaction->Database(); cloneReadInfo.mDatabase = mTransaction->Database();
@ -3300,8 +3304,6 @@ BackgroundCursorChild::HandleResponse(
nullptr, nullptr,
cloneReadInfo.mFiles); cloneReadInfo.mFiles);
RefPtr<IDBCursor> newCursor;
if (mCursor) { if (mCursor) {
mCursor->Reset(Move(response.key()), Move(cloneReadInfo)); mCursor->Reset(Move(response.key()), Move(cloneReadInfo));
} else { } else {

View file

@ -555,6 +555,14 @@ void
BufferTextureHost::DeallocateDeviceData() BufferTextureHost::DeallocateDeviceData()
{ {
if (mFirstSource && mFirstSource->NumCompositableRefs() > 0) { 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; return;
} }

View file

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

View file

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

View file

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

View file

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