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

Side by Side Diff: src/json.js

Issue 7687001: Remove trailing whitespaces from *.js files. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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/debug-debugger.js ('k') | src/string.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 BasicJSONSerialize(0, val, stack, builder); 230 BasicJSONSerialize(0, val, stack, builder);
231 if (before == builder.length) builder.push("null"); 231 if (before == builder.length) builder.push("null");
232 for (var i = 1; i < len; i++) { 232 for (var i = 1; i < len; i++) {
233 builder.push(","); 233 builder.push(",");
234 before = builder.length; 234 before = builder.length;
235 BasicJSONSerialize(i, value[i], stack, builder); 235 BasicJSONSerialize(i, value[i], stack, builder);
236 if (before == builder.length) builder[before - 1] = ",null"; 236 if (before == builder.length) builder[before - 1] = ",null";
237 } 237 }
238 } 238 }
239 stack.pop(); 239 stack.pop();
240 builder.push("]"); 240 builder.push("]");
241 } 241 }
242 242
243 243
244 function BasicSerializeObject(value, stack, builder) { 244 function BasicSerializeObject(value, stack, builder) {
245 if (!%PushIfAbsent(stack, value)) { 245 if (!%PushIfAbsent(stack, value)) {
246 throw MakeTypeError('circular_structure', $Array()); 246 throw MakeTypeError('circular_structure', $Array());
247 } 247 }
248 builder.push("{"); 248 builder.push("{");
249 var first = true; 249 var first = true;
250 for (var p in value) { 250 for (var p in value) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 function SetupJSON() { 340 function SetupJSON() {
341 InstallFunctions($JSON, DONT_ENUM, $Array( 341 InstallFunctions($JSON, DONT_ENUM, $Array(
342 "parse", JSONParse, 342 "parse", JSONParse,
343 "stringify", JSONStringify 343 "stringify", JSONStringify
344 )); 344 ));
345 } 345 }
346 346
347 SetupJSON(); 347 SetupJSON();
OLDNEW
« no previous file with comments | « src/debug-debugger.js ('k') | src/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698