Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29370568: Issue #4692 - Move responsibility for engine reference from tasks to scheduler
Patch Set: Created Dec. 31, 2016, 10:37 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
===================================================================
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -74,9 +74,6 @@
*/
typedef std::shared_ptr<ScopedV8Isolate> ScopedV8IsolatePtr;
- struct ImmediateSingleUseThreadType {}; ///< Marker class for scheduling policy
- extern const ImmediateSingleUseThreadType ImmediateSingleUseThread; ///< Dummy constant for scheduling policy
-
/**
* JavaScript engine used by `FilterEngine`, wraps v8.
*/
@@ -134,25 +131,6 @@
const std::string& filename = "");
/**
- * Schedule a task with these policies:
- * - timing policy: start execution immediately.
- * - threading policy: run the task in a single-use thread.
- *
- * @param task
- * Task to execute. All v8 handles should refer to the present engine.
- * @param ImmediateSingleUseThreadType
- * The schedule policy--create a new thread and discard it afterwards.
- */
- void Schedule(std::function<void()> task, ImmediateSingleUseThreadType);
-
- /**
- * Block until there are no more tasks running in the scheduler.
- *
- * Note: this function does not prevent new tasks from being scheduled.
- */
- void WaitForQuietScheduler();
-
- /**
* Initiates a garbage collection.
*/
void Gc();
@@ -289,16 +267,6 @@
WebRequestPtr webRequest;
LogSystemPtr logSystem;
EventMap eventCallbacks;
-
- // Forward declaration for PImpl idiom
- class SchedulerImpl;
- /**
- * Scheduler for tasks executed under the current engine.
- *
- * \par Invariant
- * `bool(scheduler)` is always true
- */
- std::unique_ptr<SchedulerImpl> scheduler;
};
}
« no previous file with comments | « no previous file | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld