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

Unified Diff: src/background-parsing-task.h

Issue 366153002: Add script streaming API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added tests + fixed compilation flags (!) Created 6 years, 4 months 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
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_

Powered by Google App Engine
This is Rietveld 408576698