Chromium Code Reviews| Index: src/preparser-api.cc |
| diff --git a/src/preparser-api.cc b/src/preparser-api.cc |
| index 6ed8e36dc672de128dd7dc9e4a3f2f69126c0db4..47122512013c2349e71fd0b5572324b0539fc0d3 100644 |
| --- a/src/preparser-api.cc |
| +++ b/src/preparser-api.cc |
| @@ -27,8 +27,6 @@ |
| #include "../include/v8-preparser.h" |
| -#include "v8.h" |
| - |
| #include "globals.h" |
| #include "checks.h" |
| #include "allocation.h" |
| @@ -162,7 +160,7 @@ class InputStreamUTF16Buffer : public UC16CharacterStream { |
| class StandAloneJavaScriptScanner : public JavaScriptScanner { |
| public: |
| StandAloneJavaScriptScanner() |
| - : JavaScriptScanner(Isolate::Current()) { } |
| + : JavaScriptScanner(&scanner_constants_), scanner_constants_() { } |
|
Vitaly Repeshko
2011/03/29 12:33:22
This passes a pointer to a not yet initialized obj
Lasse Reichstein
2011/03/29 13:29:55
Yeah, it's a bit iffy. It should work (the address
|
| void Initialize(UC16CharacterStream* source) { |
| source_ = source; |
| @@ -173,10 +171,13 @@ class StandAloneJavaScriptScanner : public JavaScriptScanner { |
| SkipWhiteSpace(); |
| Scan(); |
| } |
| + private: |
| + ScannerConstants scanner_constants_; |
| }; |
| -// Functions declared by allocation.h |
| +// Functions declared by allocation.h and implemented in both api.cc (for v8) |
| +// or here (for a stand-alone preparser). |
| void FatalProcessOutOfMemory(const char* reason) { |
| V8_Fatal(__FILE__, __LINE__, reason); |