mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
1283712 - Part 10: Support notes in getLastWarning shell-only testing function.
This commit is contained in:
parent
9ab58a4769
commit
700a57c289
2 changed files with 9 additions and 0 deletions
|
|
@ -6419,6 +6419,14 @@ CreateLastWarningObject(JSContext* cx, JSErrorReport* report)
|
|||
if (!DefineProperty(cx, warningObj, cx->names().columnNumber, columnVal))
|
||||
return false;
|
||||
|
||||
RootedObject notesArray(cx, CreateErrorNotesArray(cx, report));
|
||||
if (!notesArray)
|
||||
return false;
|
||||
|
||||
RootedValue notesArrayVal(cx, ObjectValue(*notesArray));
|
||||
if (!DefineProperty(cx, warningObj, cx->names().notes, notesArrayVal))
|
||||
return false;
|
||||
|
||||
GetShellContext(cx)->lastWarning.setObject(*warningObj);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue