summaryrefslogtreecommitdiffstats
path: root/js/src/vm/JSONParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/JSONParser.cpp')
-rw-r--r--js/src/vm/JSONParser.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/js/src/vm/JSONParser.cpp b/js/src/vm/JSONParser.cpp
index 7a440e3090..54e15176a6 100644
--- a/js/src/vm/JSONParser.cpp
+++ b/js/src/vm/JSONParser.cpp
@@ -1428,35 +1428,34 @@ class MOZ_STACK_CLASS DelegateHandler {
}
inline bool setBooleanValue(bool value, mozilla::Span<const CharT>&& source) {
- return true;
- }
- inline bool setNullValue(mozilla::Span<const CharT>&& source) { return true; }
-
- inline DummyValue numberValue() const { return DummyValue(); }
-
- inline DummyValue stringValue() const { return DummyValue(); }
-
- inline DummyValue booleanValue(bool value) {
if (hadHandlerError_) {
- return DummyValue();
+ return false;
}
if (!handler_->booleanValue(value)) {
hadHandlerError_ = true;
}
- return DummyValue();
+ return !hadHandlerError_;
}
- inline DummyValue nullValue() {
+ inline bool setNullValue(mozilla::Span<const CharT>&& source) {
if (hadHandlerError_) {
- return DummyValue();
+ return false;
}
if (!handler_->nullValue()) {
hadHandlerError_ = true;
}
- return DummyValue();
+ return !hadHandlerError_;
}
+ inline DummyValue numberValue() const { return DummyValue(); }
+
+ inline DummyValue stringValue() const { return DummyValue(); }
+
+ inline DummyValue booleanValue(bool value) { return DummyValue(); }
+
+ inline DummyValue nullValue() { return DummyValue(); }
+
inline bool objectOpen(Vector<StackEntry, 10>& stack,
PropertyVector** properties) {
if (hadHandlerError_) {