diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-04 18:21:04 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-04 18:21:04 +0200 |
commit | dee00a8a79394559e0e868cc72464c2de24583ac (patch) | |
tree | 18dc2e3db8127ceabcf9b03416b135bced2976ad /parser | |
parent | 851cfd198bc01020cd411d4f1cd6586222700269 (diff) | |
parent | 363bfeb2c06e5f57136ebdab8da1ebeba0591520 (diff) | |
download | UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.gz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.lz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.xz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'parser')
-rw-r--r-- | parser/html/nsHtml5Portability.cpp | 2 | ||||
-rw-r--r-- | parser/html/nsHtml5TreeOpExecutor.cpp | 17 | ||||
-rw-r--r-- | parser/html/nsHtml5TreeOperation.h | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/parser/html/nsHtml5Portability.cpp b/parser/html/nsHtml5Portability.cpp index 36c7e758a..0a7c6f845 100644 --- a/parser/html/nsHtml5Portability.cpp +++ b/parser/html/nsHtml5Portability.cpp @@ -91,7 +91,7 @@ nsHtml5Portability::releaseString(nsString* str) bool nsHtml5Portability::localEqualsBuffer(nsIAtom* local, char16_t* buf, int32_t offset, int32_t length) { - return local->Equals(nsDependentSubstring(buf + offset, buf + offset + length)); + return local->Equals(buf + offset, length); } bool diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp index 468449698..5c3f32d6f 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp @@ -351,6 +351,12 @@ nsHtml5TreeOpExecutor::RunFlushLoop() nsHtml5FlushLoopGuard guard(this); // this is also the self-kungfu! RefPtr<nsParserBase> parserKungFuDeathGrip(mParser); + RefPtr<nsHtml5StreamParser> streamParserGrip; + if (mParser) { + streamParserGrip = GetParser()->GetStreamParser(); + } + mozilla::Unused + << streamParserGrip; // Intentionally not used within function // Remember the entry time (void) nsContentSink::WillParseImpl(); @@ -409,11 +415,6 @@ nsHtml5TreeOpExecutor::RunFlushLoop() mOpQueue.Clear(); // clear in order to be able to assert in destructor return; } - // Not sure if this grip is still needed, but previously, the code - // gripped before calling ParseUntilBlocked(); - RefPtr<nsHtml5StreamParser> streamKungFuDeathGrip = - GetParser()->GetStreamParser(); - mozilla::Unused << streamKungFuDeathGrip; // Not used within function // Now parse content left in the document.write() buffer queue if any. // This may generate tree ops on its own or dequeue a speculation. nsresult rv = GetParser()->ParseUntilBlocked(); @@ -529,6 +530,12 @@ nsHtml5TreeOpExecutor::FlushDocumentWrite() RefPtr<nsHtml5TreeOpExecutor> kungFuDeathGrip(this); RefPtr<nsParserBase> parserKungFuDeathGrip(mParser); mozilla::Unused << parserKungFuDeathGrip; // Intentionally not used within function + RefPtr<nsHtml5StreamParser> streamParserGrip; + if (mParser) { + streamParserGrip = GetParser()->GetStreamParser(); + } + mozilla::Unused + << streamParserGrip; // Intentionally not used within function NS_ASSERTION(!mReadingFromStage, "Got doc write flush when reading from stage"); diff --git a/parser/html/nsHtml5TreeOperation.h b/parser/html/nsHtml5TreeOperation.h index 0b2970738..a93f44c46 100644 --- a/parser/html/nsHtml5TreeOperation.h +++ b/parser/html/nsHtml5TreeOperation.h @@ -108,7 +108,7 @@ class nsHtml5TreeOperation { } nsAutoString str; aAtom->ToString(str); - return NS_Atomize(str); + return NS_AtomizeMainThread(str); } static nsresult AppendTextToTextNode(const char16_t* aBuffer, |