Index: src/parser.h |
diff --git a/src/parser.h b/src/parser.h |
index e15a7fac441f5b9f930a607ea78c0c987342fa0c..9a84ab9071c5baef7ee0412c9e4d03ae1a0e805e 100644 |
--- a/src/parser.h |
+++ b/src/parser.h |
@@ -181,6 +181,7 @@ class ScriptDataImpl : public ScriptData { |
class PartialParserRecorder { |
public: |
PartialParserRecorder(); |
+ virtual ~PartialParserRecorder() {} |
void LogFunction(int start, int end, int literals, int properties) { |
function_store_.Add(start); |
@@ -189,7 +190,7 @@ class PartialParserRecorder { |
function_store_.Add(properties); |
} |
- void LogSymbol(int start, const char* symbol, int length) { } |
+ virtual void LogSymbol(int start, const char* symbol, int length) { } |
// Logs an error message and marks the log as containing an error. |
// Further logging will be ignored, and ExtractData will return a vector |
@@ -212,7 +213,7 @@ class PartialParserRecorder { |
const char* message, |
Vector<const char*> args); |
- Vector<unsigned> ExtractData(); |
+ virtual Vector<unsigned> ExtractData(); |
void PauseRecording() { |
pause_count_++; |
@@ -253,14 +254,15 @@ class PartialParserRecorder { |
class CompleteParserRecorder: public PartialParserRecorder { |
public: |
CompleteParserRecorder(); |
+ virtual ~CompleteParserRecorder() { } |
void LogSymbol(int start, Vector<const char> literal); |
- void LogSymbol(int start, const char* symbol, int length) { |
+ virtual void LogSymbol(int start, const char* symbol, int length) { |
LogSymbol(start, Vector<const char>(symbol, length)); |
} |
- Vector<unsigned> ExtractData(); |
+ virtual Vector<unsigned> ExtractData(); |
int symbol_position() { return symbol_store_.size(); } |
int symbol_ids() { return symbol_id_; } |