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

Delta Between Two Patch Sets: include/AdblockPlus/Platform.h

Issue 29527588: Issue 5570 - Make V8 isolate injectable into JsEngine (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Left Patch Set: Created Aug. 25, 2017, 8:32 a.m.
Right Patch Set: rebase Created Aug. 25, 2017, 3:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include/AdblockPlus/JsEngine.h ('k') | src/JsEngine.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 * Platform constructor. 88 * Platform constructor.
89 * 89 *
90 * When a parameter value is nullptr the corresponding default 90 * When a parameter value is nullptr the corresponding default
91 * implementation is chosen. 91 * implementation is chosen.
92 */ 92 */
93 explicit Platform(CreationParameters&& creationParameters = CreationParamete rs()); 93 explicit Platform(CreationParameters&& creationParameters = CreationParamete rs());
94 ~Platform(); 94 ~Platform();
95 95
96 /** 96 /**
97 * Ensures that JsEngine is constructed. If JsEngine is already present 97 * Ensures that JsEngine is constructed. If JsEngine is already present
98 * then the parameters areignored. 98 * then the parameters are ignored.
hub 2017/08/25 13:20:39 typo: 'are ignored'
sergei 2017/08/25 15:02:53 Done.
99 * 99 *
100 * @param appInfo Information about the app, 100 * @param appInfo Information about the app,
101 * @param isolate A provider of v8::Isolate, if the value is nullptr then 101 * @param isolate A provider of v8::Isolate, if the value is nullptr then
102 * a default implementation is used. 102 * a default implementation is used.
103 */ 103 */
104 void SetUpJsEngine(const AppInfo& appInfo = AppInfo(), std::unique_ptr<IV8Is olateProvider> isolate = nullptr); 104 void SetUpJsEngine(const AppInfo& appInfo = AppInfo(), std::unique_ptr<IV8Is olateProvider> isolate = nullptr);
105 105
106 /** 106 /**
107 * Retrieves the `JsEngine` instance. It calls SetUpJsEngine if JsEngine is 107 * Retrieves the `JsEngine` instance. It calls SetUpJsEngine if JsEngine is
108 * not initialized yet. 108 * not initialized yet.
(...skipping 27 matching lines...) Expand all
136 * @return The asynchronous IFileSystem implementation. 136 * @return The asynchronous IFileSystem implementation.
137 */ 137 */
138 IFileSystem& GetFileSystem(); 138 IFileSystem& GetFileSystem();
139 139
140 /** 140 /**
141 * @return The asynchronous IWebRequest implementation. 141 * @return The asynchronous IWebRequest implementation.
142 */ 142 */
143 IWebRequest& GetWebRequest(); 143 IWebRequest& GetWebRequest();
144 144
145 /** 145 /**
146 * @see `SetLogSystem()`. 146 * @return The LogSystem implementation.
147 */ 147 */
148 LogSystem& GetLogSystem(); 148 LogSystem& GetLogSystem();
149 149
150 private: 150 private:
151 LogSystemPtr logSystem; 151 LogSystemPtr logSystem;
152 TimerPtr timer; 152 TimerPtr timer;
153 FileSystemPtr fileSystem; 153 FileSystemPtr fileSystem;
154 WebRequestPtr webRequest; 154 WebRequestPtr webRequest;
155 // used for creation and deletion of modules. 155 // used for creation and deletion of modules.
156 std::mutex modulesMutex; 156 std::mutex modulesMutex;
157 std::shared_ptr<JsEngine> jsEngine; 157 std::shared_ptr<JsEngine> jsEngine;
158 std::shared_future<FilterEnginePtr> filterEngine; 158 std::shared_future<FilterEnginePtr> filterEngine;
159 }; 159 };
160 } 160 }
161 161
162 #endif // ADBLOCK_PLUS_PLATFORM_H 162 #endif // ADBLOCK_PLUS_PLATFORM_H
LEFTRIGHT

Powered by Google App Engine
This is Rietveld