OLD | NEW |
1 #include "GlobalJsObject.h" | 1 #include "GlobalJsObject.h" |
2 | 2 |
3 using namespace AdblockPlus; | 3 using namespace AdblockPlus; |
4 | 4 |
5 v8::Handle<v8::ObjectTemplate> GlobalJsObject::Create( | 5 v8::Handle<v8::ObjectTemplate> GlobalJsObject::Create( |
6 ErrorCallback& errorCallback) | 6 ErrorCallback& errorCallback) |
7 { | 7 { |
| 8 const v8::Locker locker(v8::Isolate::GetCurrent()); |
8 v8::HandleScope handleScope; | 9 v8::HandleScope handleScope; |
9 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); | 10 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); |
10 const v8::Handle<v8::ObjectTemplate> console = | 11 const v8::Handle<v8::ObjectTemplate> console = |
11 AdblockPlus::ConsoleJsObject::Create(errorCallback); | 12 AdblockPlus::ConsoleJsObject::Create(errorCallback); |
12 global->Set(v8::String::New("console"), console); | 13 global->Set(v8::String::New("console"), console); |
13 return handleScope.Close(global); | 14 return handleScope.Close(global); |
14 } | 15 } |
OLD | NEW |