Index: src/json.js |
diff --git a/src/json.js b/src/json.js |
index 7ada63eb5c531ebfda9d5d4905fea09a8a0e6f34..5ddf869ae0a9a15b3d9e19caf7437e84261649a3 100644 |
--- a/src/json.js |
+++ b/src/json.js |
@@ -58,7 +58,7 @@ function Revive(holder, name, reviver) { |
function JSONParse(text, reviver) { |
var unfiltered = %ParseJson(TO_STRING_INLINE(text)); |
- if (IS_SPEC_FUNCTION(reviver)) { |
+ if (IS_CALLABLE(reviver)) { |
return Revive({'': unfiltered}, '', reviver); |
} else { |
return unfiltered; |
@@ -146,11 +146,11 @@ function JSONSerialize(key, holder, replacer, stack, indent, gap) { |
var value = holder[key]; |
if (IS_SPEC_OBJECT(value)) { |
var toJSON = value.toJSON; |
- if (IS_SPEC_FUNCTION(toJSON)) { |
+ if (IS_CALLABLE(toJSON)) { |
value = %_CallFunction(value, key, toJSON); |
} |
} |
- if (IS_SPEC_FUNCTION(replacer)) { |
+ if (IS_CALLABLE(replacer)) { |
value = %_CallFunction(holder, key, value, replacer); |
} |
if (IS_STRING(value)) { |