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

Unified Diff: src/parser.h

Issue 5122007: Made some functions virtual that were previously hit by templating. (Closed)
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698