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

Unified Diff: src/snapshot-common.cc

Issue 18583: Change type of snapshot from char array to byte array to avoid portability pr... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot.h ('k') | src/snapshot-empty.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot-common.cc
===================================================================
--- src/snapshot-common.cc (revision 1142)
+++ src/snapshot-common.cc (working copy)
@@ -35,7 +35,7 @@
namespace v8 { namespace internal {
-bool Snapshot::Deserialize(const char* content, int len) {
+bool Snapshot::Deserialize(const byte* content, int len) {
Deserializer des(content, len);
des.GetFlags();
return V8::Initialize(&des);
@@ -45,7 +45,7 @@
bool Snapshot::Initialize(const char* snapshot_file) {
if (snapshot_file) {
int len;
- char* str = ReadChars(snapshot_file, &len);
+ byte* str = ReadBytes(snapshot_file, &len);
if (!str) return false;
bool result = Deserialize(str, len);
DeleteArray(str);
@@ -60,11 +60,11 @@
bool Snapshot::WriteToFile(const char* snapshot_file) {
Serializer ser;
ser.Serialize();
- char* str;
+ byte* str;
int len;
ser.Finalize(&str, &len);
- int written = WriteChars(snapshot_file, str, len);
+ int written = WriteBytes(snapshot_file, str, len);
DeleteArray(str);
return written == len;
« no previous file with comments | « src/snapshot.h ('k') | src/snapshot-empty.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698