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

Unified Diff: src/JsEngine.cpp

Issue 10198022: Pass application data into libadblockplus (Closed)
Patch Set: Created April 12, 2013, 1:23 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
Index: src/JsEngine.cpp
===================================================================
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -6,13 +6,14 @@
namespace
{
v8::Handle<v8::Context> CreateContext(
+ const AdblockPlus::AppInfo& appInfo,
AdblockPlus::ErrorCallback& errorCallback,
AdblockPlus::WebRequest& webRequest)
{
const v8::Locker locker(v8::Isolate::GetCurrent());
const v8::HandleScope handleScope;
const v8::Handle<v8::ObjectTemplate> global =
- AdblockPlus::GlobalJsObject::Create(errorCallback, webRequest);
+ AdblockPlus::GlobalJsObject::Create(appInfo, errorCallback, webRequest);
return v8::Context::New(0, global);
}
@@ -63,10 +64,12 @@
{
}
-AdblockPlus::JsEngine::JsEngine(const FileReader* const fileReader,
+AdblockPlus::JsEngine::JsEngine(const AppInfo& appInfo,
+ const FileReader* const fileReader,
WebRequest* const webRequest,
ErrorCallback* const errorCallback)
- : fileReader(fileReader), context(CreateContext(*errorCallback, *webRequest))
+ : fileReader(fileReader),
+ context(CreateContext(appInfo, *errorCallback, *webRequest))
{
}
« lib/info.js ('K') | « src/GlobalJsObject.cpp ('k') | test/AppInfoJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld