Index: src/serialize.h |
diff --git a/src/serialize.h b/src/serialize.h |
index 2b7f2ade9d79f6bbd02444feb0a40b4424cd4cec..ede57df5cc05d2015eb0b321199f33186851fdee 100644 |
--- a/src/serialize.h |
+++ b/src/serialize.h |
@@ -5,7 +5,6 @@ |
#ifndef V8_SERIALIZE_H_ |
#define V8_SERIALIZE_H_ |
-#include "src/compiler.h" |
#include "src/hashmap.h" |
#include "src/heap-profiler.h" |
#include "src/isolate.h" |
@@ -14,6 +13,8 @@ |
namespace v8 { |
namespace internal { |
+class ScriptData; |
+ |
// A TypeCode is used to distinguish different kinds of external reference. |
// It is a single bit to make testing for types easy. |
enum TypeCode { |
@@ -931,14 +932,7 @@ class SerializedCodeData : public SerializedData { |
public: |
// Used when consuming. |
static SerializedCodeData* FromCachedData(ScriptData* cached_data, |
- String* source) { |
- DisallowHeapAllocation no_gc; |
- SerializedCodeData* scd = new SerializedCodeData(cached_data); |
- if (scd->IsSane(source)) return scd; |
- cached_data->Reject(); |
- delete scd; |
- return NULL; |
- } |
+ String* source); |
// Used when producing. |
SerializedCodeData(const List<byte>& payload, const CodeSerializer& cs); |
@@ -953,8 +947,7 @@ class SerializedCodeData : public SerializedData { |
Vector<const uint32_t> CodeStubKeys() const; |
private: |
- explicit SerializedCodeData(ScriptData* data) |
- : SerializedData(const_cast<byte*>(data->data()), data->length()) {} |
+ explicit SerializedCodeData(ScriptData* data); |
bool IsSane(String* source) const; |