Index: src/json-stringifier.cc |
diff --git a/src/json-stringifier.cc b/src/json-stringifier.cc |
index 6293b0c4593944f30a1832dbf34f7fc6931b6cb2..9d19110d10d945e35783a3d9e9142d60601e3116 100644 |
--- a/src/json-stringifier.cc |
+++ b/src/json-stringifier.cc |
@@ -91,7 +91,9 @@ MaybeHandle<Object> JsonStringifier::Stringify(Handle<Object> object, |
Handle<Object> replacer, |
Handle<Object> gap) { |
if (!InitializeReplacer(replacer)) return MaybeHandle<Object>(); |
- if (!gap->IsUndefined() && !InitializeGap(gap)) return MaybeHandle<Object>(); |
+ if (!gap->IsUndefined(isolate_) && !InitializeGap(gap)) { |
+ return MaybeHandle<Object>(); |
+ } |
Result result = SerializeObject(object); |
if (result == UNCHANGED) return factory()->undefined_value(); |
if (result == SUCCESS) return builder_.Finish(); |