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

Side by Side Diff: src/d8.js

Issue 175009: Fix an assert in the parser that fails if extensions code using 'eval'... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « no previous file | src/parser.cc » ('j') | tools/js2c.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 return details; 1136 return details;
1137 }; 1137 };
1138 1138
1139 1139
1140 /** 1140 /**
1141 * Protocol packages send from the debugger. 1141 * Protocol packages send from the debugger.
1142 * @param {string} json - raw protocol packet as JSON string. 1142 * @param {string} json - raw protocol packet as JSON string.
1143 * @constructor 1143 * @constructor
1144 */ 1144 */
1145 function ProtocolPackage(json) { 1145 function ProtocolPackage(json) {
1146 this.packet_ = eval('(' + json + ')'); 1146 this.packet_ = JSON.parse(json);
1147 this.refs_ = []; 1147 this.refs_ = [];
1148 if (this.packet_.refs) { 1148 if (this.packet_.refs) {
1149 for (var i = 0; i < this.packet_.refs.length; i++) { 1149 for (var i = 0; i < this.packet_.refs.length; i++) {
1150 this.refs_[this.packet_.refs[i].handle] = this.packet_.refs[i]; 1150 this.refs_[this.packet_.refs[i].handle] = this.packet_.refs[i];
1151 } 1151 }
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 1155
1156 /** 1156 /**
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 json += NumberToJSON_(elem); 1611 json += NumberToJSON_(elem);
1612 } else if (typeof(elem) === 'string') { 1612 } else if (typeof(elem) === 'string') {
1613 json += StringToJSON_(elem); 1613 json += StringToJSON_(elem);
1614 } else { 1614 } else {
1615 json += elem; 1615 json += elem;
1616 } 1616 }
1617 } 1617 }
1618 json += ']'; 1618 json += ']';
1619 return json; 1619 return json;
1620 } 1620 }
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | tools/js2c.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698