summaryrefslogtreecommitdiffstats
path: root/src/json-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/json-parser.h')
-rw-r--r--src/json-parser.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/json-parser.h b/src/json-parser.h
index d22cd0da..68eab65f 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -130,7 +130,7 @@ class JsonParser BASE_EMBEDDED {
// An object literal is a squiggly-braced and comma separated sequence
// (possibly empty) of key/value pairs, where the key is a JSON string
// literal, the value is a JSON value, and the two are separated by a colon.
- // A JSON array doesn't allow numbers and identifiers as keys, like a
+ // A JSON array dosn't allow numbers and identifiers as keys, like a
// JavaScript array.
Handle<Object> ParseJsonObject();
@@ -165,7 +165,7 @@ class JsonParser BASE_EMBEDDED {
template <bool seq_ascii>
Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source) {
- isolate_ = source->map()->GetHeap()->isolate();
+ isolate_ = source->map()->isolate();
FlattenString(source);
source_ = source;
source_length_ = source_->length();
@@ -177,7 +177,7 @@ Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source) {
// Set initial position right before the string.
position_ = -1;
- // Advance to the first character (possibly EOS)
+ // Advance to the first character (posibly EOS)
AdvanceSkipWhitespace();
Handle<Object> result = ParseJsonValue();
if (result.is_null() || c0_ != kEndOfString) {
@@ -303,12 +303,11 @@ Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() {
uint32_t index;
if (key->AsArrayIndex(&index)) {
- JSObject::SetOwnElement(json_object, index, value, kNonStrictMode);
+ SetOwnElement(json_object, index, value, kNonStrictMode);
} else if (key->Equals(isolate()->heap()->Proto_symbol())) {
SetPrototype(json_object, value);
} else {
- JSObject::SetLocalPropertyIgnoreAttributes(
- json_object, key, value, NONE);
+ SetLocalPropertyIgnoreAttributes(json_object, key, value, NONE);
}
} while (MatchSkipWhiteSpace(','));
if (c0_ != '}') {