forked from mirrors/gecko-dev
Bug 1678032 - Fix hazard with BaseScript::extent(). r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D97639
This commit is contained in:
parent
7352f9f7a6
commit
842f9f30b0
2 changed files with 2 additions and 3 deletions
|
|
@ -4360,8 +4360,7 @@ static JSScript* CopyScriptImpl(JSContext* cx, HandleScript src,
|
|||
|
||||
// When cloning is for `MakeDefaultConstructor`, the SourceExtent will be
|
||||
// provided by caller instead of copying from `src`.
|
||||
const SourceExtent& extent =
|
||||
maybeClassExtent ? *maybeClassExtent : src->extent();
|
||||
SourceExtent extent = maybeClassExtent ? *maybeClassExtent : src->extent();
|
||||
|
||||
ImmutableScriptFlags flags = src->immutableFlags();
|
||||
flags.setFlag(JSScript::ImmutableFlags::HasNonSyntacticScope,
|
||||
|
|
|
|||
|
|
@ -1632,7 +1632,7 @@ class BaseScript : public gc::TenuredCellWithNonGCPointer<uint8_t> {
|
|||
}
|
||||
uint32_t toStringStart() const { return extent_.toStringStart; }
|
||||
uint32_t toStringEnd() const { return extent_.toStringEnd; }
|
||||
const SourceExtent& extent() const { return extent_; }
|
||||
SourceExtent extent() const { return extent_; }
|
||||
|
||||
MOZ_MUST_USE bool appendSourceDataForToString(JSContext* cx,
|
||||
js::StringBuffer& buf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue