mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1336510 - Part 5: Workaround lambda static analysis in nsMultiMixedConv, r=valentin
MozReview-Commit-ID: 7Mvh9aeCKOh
This commit is contained in:
parent
cab1a9949b
commit
9509bedeee
@ -801,9 +801,14 @@ nsMultiMixedConv::SwitchToControlParsing()
|
||||
nsMultiMixedConv::nsMultiMixedConv() :
|
||||
mCurrentPartID(0),
|
||||
mInOnDataAvailable(false),
|
||||
mTokenizer([this](Token const& token, mozilla::IncrementalTokenizer&) -> nsresult {
|
||||
return this->ConsumeToken(token);
|
||||
})
|
||||
// XXX: This is a hack to bypass the raw pointer to refcounted object in
|
||||
// lambda analysis. It should be removed and replaced when the
|
||||
// IncrementalTokenizer API is improved to avoid the need for such
|
||||
// workarounds.
|
||||
//
|
||||
// This is safe because `mTokenizer` will not outlive `this`, meaning that
|
||||
// this std::bind object will be destroyed before `this` dies.
|
||||
mTokenizer(std::bind(&nsMultiMixedConv::ConsumeToken, this, std::placeholders::_1))
|
||||
{
|
||||
mContentLength = UINT64_MAX;
|
||||
mByteRangeStart = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user