Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: src/json-parser.h

Issue 600733003: Version 3.27.34.21 (merged r24125) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.27
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_JSON_PARSER_H_ 5 #ifndef V8_JSON_PARSER_H_
6 #define V8_JSON_PARSER_H_ 6 #define V8_JSON_PARSER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/char-predicates-inl.h" 10 #include "src/char-predicates-inl.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 } else { 420 } else {
421 key = ParseJsonInternalizedString(); 421 key = ParseJsonInternalizedString();
422 if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter(); 422 if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter();
423 423
424 AdvanceSkipWhitespace(); 424 AdvanceSkipWhitespace();
425 value = ParseJsonValue(); 425 value = ParseJsonValue();
426 if (value.is_null()) return ReportUnexpectedCharacter(); 426 if (value.is_null()) return ReportUnexpectedCharacter();
427 } 427 }
428 428
429 JSObject::SetOwnPropertyIgnoreAttributes( 429 Runtime::ForceSetObjectProperty(json_object, key, value, NONE).Check();
430 json_object, key, value, NONE).Assert();
431 } while (MatchSkipWhiteSpace(',')); 430 } while (MatchSkipWhiteSpace(','));
432 if (c0_ != '}') { 431 if (c0_ != '}') {
433 return ReportUnexpectedCharacter(); 432 return ReportUnexpectedCharacter();
434 } 433 }
435 434
436 // If we transitioned until the very end, transition the map now. 435 // If we transitioned until the very end, transition the map now.
437 if (transitioning) { 436 if (transitioning) {
438 JSObject::AllocateStorageForMap(json_object, map); 437 JSObject::AllocateStorageForMap(json_object, map);
439 int length = properties.length(); 438 int length = properties.length();
440 for (int i = 0; i < length; i++) { 439 for (int i = 0; i < length; i++) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 782
784 ASSERT_EQ('"', c0_); 783 ASSERT_EQ('"', c0_);
785 // Advance past the last '"'. 784 // Advance past the last '"'.
786 AdvanceSkipWhitespace(); 785 AdvanceSkipWhitespace();
787 return result; 786 return result;
788 } 787 }
789 788
790 } } // namespace v8::internal 789 } } // namespace v8::internal
791 790
792 #endif // V8_JSON_PARSER_H_ 791 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698