Index: src/background-parsing-task.h |
diff --git a/src/background-parsing-task.h b/src/background-parsing-task.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..75713c6d91298aef4827f08ba55e7041ed11b43e |
--- /dev/null |
+++ b/src/background-parsing-task.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8_BACKGROUND_PARSING_TASK_H_ |
+#define V8_BACKGROUND_PARSING_TASK_H_ |
+ |
+#include "src/base/platform/platform.h" |
+#include "src/base/platform/semaphore.h" |
+#include "src/compiler.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask { |
+ public: |
+ BackgroundParsingTask(ScriptCompiler::StreamedSource* source, bool allow_lazy, |
+ Isolate* isolate) |
+ : source_(source), |
+ script_data_(NULL), |
+ hash_seed_(isolate->heap()->HashSeed()), |
+ allow_lazy_(allow_lazy), |
+ isolate_(isolate) {} |
Sven Panne
2014/09/01 09:07:46
Why do we remember the Isolate? Just passing the h
marja
2014/09/01 11:58:17
Done.
|
+ |
+ virtual void Run(); |
+ |
+ private: |
+ friend class v8::ScriptCompiler; |
+ |
+ ScriptCompiler::StreamedSource* source_; |
+ ScriptData* script_data_; |
+ uint32_t hash_seed_; |
+ bool allow_lazy_; |
+ Isolate* isolate_; |
+}; |
+} |
+} // namespace v8::internal |
+ |
+#endif // V8_BACKGROUND_PARSING_TASK_H_ |