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

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

Issue 11186059: Fixed json regression (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | test/mjsunit/regress/regress-2374.js » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (value.is_null()) return ReportUnexpectedCharacter(); 336 if (value.is_null()) return ReportUnexpectedCharacter();
337 337
338 if (key->Equals(isolate()->heap()->Proto_symbol())) { 338 if (key->Equals(isolate()->heap()->Proto_symbol())) {
339 prototype = value; 339 prototype = value;
340 } else { 340 } else {
341 if (JSObject::TryTransitionToField(json_object, key)) { 341 if (JSObject::TryTransitionToField(json_object, key)) {
342 json_object->FastPropertyAtPut(current_index++, *value); 342 json_object->FastPropertyAtPut(current_index++, *value);
343 } else { 343 } else {
344 JSObject::SetLocalPropertyIgnoreAttributes( 344 JSObject::SetLocalPropertyIgnoreAttributes(
345 json_object, key, value, NONE); 345 json_object, key, value, NONE);
346 current_index = json_object->NumberOfLocalProperties();
346 } 347 }
347 } 348 }
348 } 349 }
349 } while (MatchSkipWhiteSpace(',')); 350 } while (MatchSkipWhiteSpace(','));
350 if (c0_ != '}') { 351 if (c0_ != '}') {
351 return ReportUnexpectedCharacter(); 352 return ReportUnexpectedCharacter();
352 } 353 }
353 if (!prototype.is_null()) SetPrototype(json_object, prototype); 354 if (!prototype.is_null()) SetPrototype(json_object, prototype);
354 } 355 }
355 AdvanceSkipWhitespace(); 356 AdvanceSkipWhitespace();
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 } 679 }
679 ASSERT_EQ('"', c0_); 680 ASSERT_EQ('"', c0_);
680 // Advance past the last '"'. 681 // Advance past the last '"'.
681 AdvanceSkipWhitespace(); 682 AdvanceSkipWhitespace();
682 return result; 683 return result;
683 } 684 }
684 685
685 } } // namespace v8::internal 686 } } // namespace v8::internal
686 687
687 #endif // V8_JSON_PARSER_H_ 688 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2374.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698