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

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

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 3 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 | « src/isolate.cc ('k') | src/liveobjectlist.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 // 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 default: 283 default:
284 return ReportUnexpectedCharacter(); 284 return ReportUnexpectedCharacter();
285 } 285 }
286 } 286 }
287 287
288 288
289 // Parse a JSON object. Position must be right at '{'. 289 // Parse a JSON object. Position must be right at '{'.
290 template <bool seq_ascii> 290 template <bool seq_ascii>
291 Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() { 291 Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() {
292 Handle<JSFunction> object_constructor( 292 Handle<JSFunction> object_constructor(
293 isolate()->native_context()->object_function()); 293 isolate()->global_context()->object_function());
294 Handle<JSObject> json_object = 294 Handle<JSObject> json_object =
295 isolate()->factory()->NewJSObject(object_constructor); 295 isolate()->factory()->NewJSObject(object_constructor);
296 ASSERT_EQ(c0_, '{'); 296 ASSERT_EQ(c0_, '{');
297 297
298 AdvanceSkipWhitespace(); 298 AdvanceSkipWhitespace();
299 if (c0_ != '}') { 299 if (c0_ != '}') {
300 do { 300 do {
301 if (c0_ != '"') return ReportUnexpectedCharacter(); 301 if (c0_ != '"') return ReportUnexpectedCharacter();
302 Handle<String> key = ParseJsonSymbol(); 302 Handle<String> key = ParseJsonSymbol();
303 if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter(); 303 if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter();
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 ASSERT_EQ('"', c0_); 596 ASSERT_EQ('"', c0_);
597 // Advance past the last '"'. 597 // Advance past the last '"'.
598 AdvanceSkipWhitespace(); 598 AdvanceSkipWhitespace();
599 return result; 599 return result;
600 } 600 }
601 601
602 } } // namespace v8::internal 602 } } // namespace v8::internal
603 603
604 #endif // V8_JSON_PARSER_H_ 604 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/liveobjectlist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698