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

Unified Diff: src/JsContext.cpp

Issue 29377060: Noissue - add JsLocker which is merely v8::Locker but can be used with our JsEngine. (Closed)
Patch Set: Created Feb. 28, 2017, 12:01 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
« src/JsContext.h ('K') | « src/JsContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsContext.cpp
diff --git a/src/JsContext.cpp b/src/JsContext.cpp
index 8d489afbfaa22d2108069bbbcdbe2af6dc05d33c..a364d8b7946898840b05ce0e0a2d81516c57ec21 100644
--- a/src/JsContext.cpp
+++ b/src/JsContext.cpp
@@ -17,8 +17,14 @@
#include "JsContext.h"
-AdblockPlus::JsContext::JsContext(const JsEnginePtr jsEngine)
- : locker(jsEngine->GetIsolate()), isolateScope(jsEngine->GetIsolate()),
+AdblockPlus::JsLocker::JsLocker(const JsEnginePtr& jsEngine)
+ : locker(jsEngine->GetIsolate())
+{
+}
+
+AdblockPlus::JsContext::JsContext(const JsEnginePtr& jsEngine)
+ : locker(jsEngine),
+ isolateScope(jsEngine->GetIsolate()),
handleScope(jsEngine->GetIsolate()),
context(v8::Local<v8::Context>::New(jsEngine->GetIsolate(), *jsEngine->context)),
contextScope(context)
« src/JsContext.h ('K') | « src/JsContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld