mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1470795 Part 5 - Update content parse users for API movement, r=froydnj.
--HG-- extra : rebase_source : 856eecd3568adc9873b899a38ad96bbf24ebe955
This commit is contained in:
parent
55d5de3688
commit
f594284848
@ -2362,10 +2362,8 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
|
||||
SourceBufferHolder srcBuf = GetScriptSource(aRequest, inlineData);
|
||||
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
JS::BeginContentParseForRecordReplay(this, options.filename(), "application/javascript",
|
||||
JS::SmallestEncoding::UTF16);
|
||||
JS::AddContentParseDataForRecordReplay(this, srcBuf.get(), srcBuf.length() * sizeof(char16_t));
|
||||
JS::EndContentParseForRecordReplay(this);
|
||||
recordreplay::NoteContentParse(this, options.filename(), "application/javascript",
|
||||
srcBuf.get(), srcBuf.length());
|
||||
}
|
||||
|
||||
rv = exec.CompileAndExec(options, srcBuf, &script);
|
||||
|
@ -2221,10 +2221,8 @@ ScriptSource::performXDR(XDRState<mode>* xdr)
|
||||
ScriptSource::PinnedChars chars(xdr->cx(), this, holder, 0, length());
|
||||
if (!chars.get())
|
||||
return xdr->fail(JS::TranscodeResult_Throw);
|
||||
JS::BeginContentParseForRecordReplay(this, filename(), "application/javascript",
|
||||
JS::SmallestEncoding::UTF16);
|
||||
JS::AddContentParseDataForRecordReplay(this, chars.get(), length() * sizeof(char16_t));
|
||||
JS::EndContentParseForRecordReplay(this);
|
||||
mozilla::recordreplay::NoteContentParse(this, filename(), "application/javascript",
|
||||
chars.get(), length());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ nsHtml5StreamParser::~nsHtml5StreamParser()
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
mTokenizer->end();
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
JS::EndContentParseForRecordReplay(this);
|
||||
recordreplay::EndContentParse(this);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
@ -290,8 +290,7 @@ nsHtml5StreamParser::SetViewSourceTitle(nsIURI* aURL)
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
nsAutoCString spec;
|
||||
aURL->GetSpec(spec);
|
||||
JS::BeginContentParseForRecordReplay(this, spec.get(), "text/html",
|
||||
JS::SmallestEncoding::UTF16);
|
||||
recordreplay::BeginContentParse(this, spec.get(), "text/html");
|
||||
}
|
||||
|
||||
if (aURL) {
|
||||
@ -846,7 +845,7 @@ nsHtml5StreamParser::WriteStreamBytes(const uint8_t* aFromSegment,
|
||||
Tie(result, read, written, hadErrors) =
|
||||
mUnicodeDecoder->DecodeToUTF16(src, dst, false);
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
JS::AddContentParseDataForRecordReplay(this, dst.data(), written * sizeof(char16_t));
|
||||
recordreplay::AddContentParseData(this, dst.data(), written);
|
||||
}
|
||||
if (hadErrors && !mHasHadErrors) {
|
||||
mHasHadErrors = true;
|
||||
@ -1105,7 +1104,7 @@ nsHtml5StreamParser::DoStopRequest()
|
||||
Tie(result, read, written, hadErrors) =
|
||||
mUnicodeDecoder->DecodeToUTF16(src, dst, true);
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
JS::AddContentParseDataForRecordReplay(this, dst.data(), written * sizeof(char16_t));
|
||||
recordreplay::AddContentParseData(this, dst.data(), written);
|
||||
}
|
||||
if (hadErrors && !mHasHadErrors) {
|
||||
mHasHadErrors = true;
|
||||
|
Loading…
Reference in New Issue
Block a user