summaryrefslogtreecommitdiff
path: root/js/src/shell
diff options
context:
space:
mode:
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 19bb6b84ab..1e24359557 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;
}