Index: src/GlobalJsObject.cpp |
=================================================================== |
--- a/src/GlobalJsObject.cpp |
+++ b/src/GlobalJsObject.cpp |
@@ -1,6 +1,7 @@ |
#include <vector> |
#include <stdexcept> |
+#include "AppInfoJsObject.h" |
#include "GlobalJsObject.h" |
#include "ConsoleJsObject.h" |
#include "WebRequestJsObject.h" |
@@ -88,7 +89,7 @@ |
} |
v8::Handle<v8::ObjectTemplate> GlobalJsObject::Create( |
- ErrorCallback& errorCallback, WebRequest& webRequest) |
+ const AppInfo& appInfo, ErrorCallback& errorCallback, WebRequest& webRequest) |
{ |
const v8::Locker locker(v8::Isolate::GetCurrent()); |
v8::HandleScope handleScope; |
@@ -99,6 +100,8 @@ |
const v8::Handle<v8::FunctionTemplate> setTimeoutFunction = |
v8::FunctionTemplate::New(SetTimeoutCallback); |
global->Set(v8::String::New("setTimeout"), setTimeoutFunction); |
+ const v8::Handle<v8::ObjectTemplate> info = AppInfoJsObject::Create(appInfo); |
+ global->Set(v8::String::New("_appInfo"), info); |
const v8::Handle<v8::ObjectTemplate> request = |
AdblockPlus::WebRequestJsObject::Create(webRequest); |
global->Set(v8::String::New("_webRequest"), request); |