mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #2645 - Return null if getName() PC is invalid.
This commit is contained in:
parent
7d978ccd71
commit
e665b30629
1 changed files with 5 additions and 2 deletions
|
|
@ -1871,8 +1871,11 @@ class JSScript : public js::gc::TenuredCell
|
|||
}
|
||||
|
||||
js::PropertyName* getName(jsbytecode* pc) const {
|
||||
MOZ_ASSERT(containsPC(pc) && containsPC(pc + sizeof(uint32_t)));
|
||||
return getAtom(GET_UINT32_INDEX(pc))->asPropertyName();
|
||||
if (containsPC(pc) && containsPC(pc + sizeof(uint32_t))) {
|
||||
return getAtom(GET_UINT32_INDEX(pc))->asPropertyName();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
JSObject* getObject(size_t index) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue