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

Side by Side Diff: include/AdblockPlus/JsEngine.h

Issue 5598762307158016: Issue 1550 - Get rid of V8ValueHolder.h (Closed)
Patch Set: rebase Created May 20, 2016, 3:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | include/AdblockPlus/JsValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 11 matching lines...) Expand all
22 #include <map> 22 #include <map>
23 #include <stdexcept> 23 #include <stdexcept>
24 #include <stdint.h> 24 #include <stdint.h>
25 #include <string> 25 #include <string>
26 #include <AdblockPlus/AppInfo.h> 26 #include <AdblockPlus/AppInfo.h>
27 #include <AdblockPlus/LogSystem.h> 27 #include <AdblockPlus/LogSystem.h>
28 #include <AdblockPlus/FileSystem.h> 28 #include <AdblockPlus/FileSystem.h>
29 #include <AdblockPlus/JsValue.h> 29 #include <AdblockPlus/JsValue.h>
30 #include <AdblockPlus/WebRequest.h> 30 #include <AdblockPlus/WebRequest.h>
31 31
32 #include "V8ValueHolder.h"
33
34 namespace v8 32 namespace v8
35 { 33 {
36 class Arguments; 34 class Arguments;
37 class Isolate; 35 class Isolate;
38 class Value; 36 class Value;
39 class Context; 37 class Context;
40 template<class T> class Handle; 38 template<class T> class Handle;
41 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); 39 typedef Handle<Value>(*InvocationCallback)(const Arguments &args);
42 } 40 }
43 41
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 */ 215 */
218 void SetGlobalProperty(const std::string& name, AdblockPlus::JsValuePtr valu e); 216 void SetGlobalProperty(const std::string& name, AdblockPlus::JsValuePtr valu e);
219 217
220 private: 218 private:
221 JsEngine(); 219 JsEngine();
222 220
223 FileSystemPtr fileSystem; 221 FileSystemPtr fileSystem;
224 WebRequestPtr webRequest; 222 WebRequestPtr webRequest;
225 LogSystemPtr logSystem; 223 LogSystemPtr logSystem;
226 v8::Isolate* isolate; 224 v8::Isolate* isolate;
227 V8ValueHolder<v8::Context> context; 225 std::unique_ptr<v8::Persistent<v8::Context>> context;
228 EventMap eventCallbacks; 226 EventMap eventCallbacks;
229 JsValuePtr globalJsObject; 227 JsValuePtr globalJsObject;
230 }; 228 };
231 } 229 }
232 230
233 #endif 231 #endif
OLDNEW
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | include/AdblockPlus/JsValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld