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

Side by Side Diff: src/JsEngineInternal.h

Issue 29371607: Issue #3593 - Make isolate a fully internal member of the engine
Patch Set: improve unit tests to go with isolate change Created Jan. 16, 2017, 3:53 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 | « src/JsEngine.cpp ('k') | test/AppInfoJsObject.cpp » ('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 #if !defined(ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H) 2 #if !defined(ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H)
3 #define ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H 3 #define ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H
4 4
5 #include <AdblockPlus/JsEngine.h> 5 #include <AdblockPlus/JsEngine.h>
6 #include <v8.h> 6 #include <v8.h>
7 #include <array> 7 #include <array>
8 #include "AllocatedArray.h" 8 #include "AllocatedArray.h"
9 #include "Scheduler.h" 9 #include "Scheduler.h"
10 #include "V8Upgrade.h" 10 #include "V8Upgrade.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * to allocate a shared pointer to the task. 87 * to allocate a shared pointer to the task.
88 * 88 *
89 * @param task 89 * @param task
90 * Task to execute. All v8 handles must refer to the present engine. 90 * Task to execute. All v8 handles must refer to the present engine.
91 * @param ImmediateSingleUseThreadType 91 * @param ImmediateSingleUseThreadType
92 * The schedule policy--create a new thread and discard it afterwards. 92 * The schedule policy--create a new thread and discard it afterwards.
93 */ 93 */
94 void ScheduleTaskInternal(std::shared_ptr<TaskFunctionInterface>&& body); 94 void ScheduleTaskInternal(std::shared_ptr<TaskFunctionInterface>&& body);
95 95
96 public: 96 public:
97 JsEngineInternal(const AdblockPlus::ScopedV8IsolatePtr& isolate); 97 JsEngineInternal(v8::Isolate* isolate);
98 98
99 /** 99 /**
100 * Retrieve our persistent v8 context as a local handle. 100 * Retrieve our persistent v8 context as a local handle.
101 */ 101 */
102 v8::Local<v8::Context> GetContextAsLocal() const; 102 v8::Local<v8::Context> GetContextAsLocal() const;
103 103
104 /** 104 /**
105 * Retrieve the global object of our context. 105 * Retrieve the global object of our context.
106 */ 106 */
107 v8::Local<v8::Object> GetGlobalObject(); 107 v8::Local<v8::Object> GetGlobalObject();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 */ 234 */
235 const v8::HandleScope handleScope; 235 const v8::HandleScope handleScope;
236 const v8::Context::Scope contextScope; 236 const v8::Context::Scope contextScope;
237 public: 237 public:
238 V8ExecutionScope(JsEngineInternal* engine); 238 V8ExecutionScope(JsEngineInternal* engine);
239 }; 239 };
240 240
241 241
242 242
243 #endif 243 #endif
OLDNEW
« no previous file with comments | « src/JsEngine.cpp ('k') | test/AppInfoJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld