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

Unified Diff: src/JsEngine.cpp

Issue 10008015: Move global JS object creation to a separate namespace (Closed)
Patch Set: Created April 3, 2013, 12:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/GlobalJsObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
===================================================================
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -1,7 +1,7 @@
#include <AdblockPlus.h>
#include <sstream>
-#include "ConsoleJsObject.h"
+#include "GlobalJsObject.h"
namespace
{
@@ -9,9 +9,8 @@
AdblockPlus::ErrorCallback& errorCallback)
{
const v8::HandleScope handleScope;
- const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New();
- global->Set(v8::String::New("console"),
- AdblockPlus::ConsoleJsObject::Create(errorCallback));
+ const v8::Handle<v8::ObjectTemplate> global =
+ AdblockPlus::GlobalJsObject::Create(errorCallback);
return v8::Context::New(0, global);
}
« no previous file with comments | « src/GlobalJsObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld