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

Side by Side Diff: src/GlobalJsObject.cpp

Issue 10124007: Thread-safe JS execution (Closed)
Patch Set: Created April 5, 2013, 1:35 p.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 | « no previous file | src/JsEngine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « no previous file | src/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld