summaryrefslogtreecommitdiffstats
path: root/js/src/shell
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-16 11:32:41 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:34 -0400
commit8e932efef46c70fd0c165ee432893f9898267f08 (patch)
tree64be5e8c0a9157f3c8044e4ad0659453fcd86bc8 /js/src/shell
parenta781578b416c502e642ab465da3344abd419475f (diff)
downloadUXP-8e932efef46c70fd0c165ee432893f9898267f08.tar
UXP-8e932efef46c70fd0c165ee432893f9898267f08.tar.gz
UXP-8e932efef46c70fd0c165ee432893f9898267f08.tar.lz
UXP-8e932efef46c70fd0c165ee432893f9898267f08.tar.xz
UXP-8e932efef46c70fd0c165ee432893f9898267f08.zip
1283712 - Part 10: Support notes in getLastWarning shell-only testing function.
Diffstat (limited to 'js/src/shell')
-rw-r--r--js/src/shell/js.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
index 19bb6b84a..1e2435955 100644
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -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;
}