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: Merged upstream, addressed issues, renamed AppInfo fields Created April 17, 2013, 2:47 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
@@ -8,12 +8,13 @@
{
v8::Handle<v8::Context> CreateContext(
v8::Isolate* isolate,
+ const AdblockPlus::AppInfo& appInfo,
AdblockPlus::JsEngine& jsEngine)
{
const v8::Locker locker(isolate);
const v8::HandleScope handleScope;
const v8::Handle<v8::ObjectTemplate> global =
- AdblockPlus::GlobalJsObject::Create(jsEngine);
+ AdblockPlus::GlobalJsObject::Create(appInfo, jsEngine);
return v8::Context::New(0, global);
}
@@ -57,12 +58,13 @@
{
}
-AdblockPlus::JsEngine::JsEngine(FileSystem* const fileSystem,
+AdblockPlus::JsEngine::JsEngine(const AppInfo& appInfo,
+ FileSystem* const fileSystem,
WebRequest* const webRequest,
ErrorCallback* const errorCallback)
: fileSystem(*fileSystem), webRequest(*webRequest),
errorCallback(*errorCallback), isolate(v8::Isolate::GetCurrent()),
- context(CreateContext(isolate, *this))
+ context(CreateContext(isolate, appInfo, *this))
{
}
« src/AppInfoJsObject.cpp ('K') | « src/GlobalJsObject.cpp ('k') | test/AppInfoJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld