| OLD | NEW |
| 1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
| 2 #include <sstream> | 2 #include <sstream> |
| 3 | 3 |
| 4 #include "ConsoleJsObject.h" | 4 #include "ConsoleJsObject.h" |
| 5 | 5 |
| 6 namespace | 6 namespace |
| 7 { | 7 { |
| 8 v8::Handle<v8::Context> CreateContext( | 8 v8::Handle<v8::Context> CreateContext( |
| 9 AdblockPlus::ErrorCallback& errorCallback) | 9 AdblockPlus::ErrorCallback& errorCallback) |
| 10 { | 10 { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const v8::Context::Scope contextScope(context); | 66 const v8::Context::Scope contextScope(context); |
| 67 const v8::Local<v8::Object> global = context->Global(); | 67 const v8::Local<v8::Object> global = context->Global(); |
| 68 const v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast( | 68 const v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast( |
| 69 global->Get(v8::String::New(functionName.c_str()))); | 69 global->Get(v8::String::New(functionName.c_str()))); |
| 70 const v8::TryCatch tryCatch; | 70 const v8::TryCatch tryCatch; |
| 71 const v8::Local<v8::Value> result = function->Call(function, 0, 0); | 71 const v8::Local<v8::Value> result = function->Call(function, 0, 0); |
| 72 CheckTryCatch(tryCatch); | 72 CheckTryCatch(tryCatch); |
| 73 const v8::String::AsciiValue ascii(result); | 73 const v8::String::AsciiValue ascii(result); |
| 74 return *ascii; | 74 return *ascii; |
| 75 } | 75 } |
| 76 |
| 77 void AdblockPlus::JsEngine::Gc() |
| 78 { |
| 79 while (!v8::V8::IdleNotification()); |
| 80 } |
| OLD | NEW |