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

Unified Diff: src/snapshot-common.cc

Issue 548149: Another step on the way to context snapshots. We can now refer to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/serialize.cc ('k') | src/v8.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 3696)
+++ src/snapshot-common.cc (working copy)
@@ -59,42 +59,4 @@
return false;
}
-
-class FileByteSink : public SnapshotByteSink {
- public:
- explicit FileByteSink(const char* snapshot_file) {
- fp_ = OS::FOpen(snapshot_file, "wb");
- if (fp_ == NULL) {
- PrintF("Unable to write to snapshot file \"%s\"\n", snapshot_file);
- exit(1);
- }
- }
- virtual ~FileByteSink() {
- if (fp_ != NULL) {
- fclose(fp_);
- }
- }
- virtual void Put(int byte, const char* description) {
- if (fp_ != NULL) {
- fputc(byte, fp_);
- }
- }
- virtual int Position() {
- return ftell(fp_);
- }
-
- private:
- FILE* fp_;
-};
-
-
-bool Snapshot::WriteToFile(const char* snapshot_file) {
- FileByteSink file(snapshot_file);
- Serializer ser(&file);
- ser.Serialize();
- return true;
-}
-
-
-
} } // namespace v8::internal
« no previous file with comments | « src/serialize.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698