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

Side by Side Diff: src/JsEngine.cpp

Issue 9763002: Add command to initiate garbage collection (Closed)
Patch Set: Created March 11, 2013, 11:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « shell/src/Main.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « shell/src/Main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld