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

Unified Diff: src/ConsoleJsObject.cpp

Issue 10727002: Get rid of dependencies on v8.h in public header files (Closed)
Patch Set: Created May 23, 2013, 2:43 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 | « libadblockplus.gyp ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ConsoleJsObject.cpp
===================================================================
--- a/src/ConsoleJsObject.cpp
+++ b/src/ConsoleJsObject.cpp
@@ -15,25 +15,26 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
#include <AdblockPlus/JsValue.h>
#include <AdblockPlus/LogSystem.h>
#include <sstream>
#include "ConsoleJsObject.h"
+#include "JsContext.h"
#include "Utils.h"
namespace
{
v8::Handle<v8::Value> DoLog(AdblockPlus::LogSystem::LogLevel logLevel,
const v8::Arguments& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
- const AdblockPlus::JsEngine::Context context(jsEngine);
+ const AdblockPlus::JsContext context(jsEngine);
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
std::stringstream message;
for (size_t i = 0; i < converted.size(); i++)
{
if (i > 0)
message << " ";
message << converted[i]->AsString();
@@ -72,17 +73,17 @@ namespace
v8::Handle<v8::Value> ErrorCallback(const v8::Arguments& arguments)
{
return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_ERROR, arguments);
}
v8::Handle<v8::Value> TraceCallback(const v8::Arguments& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
- const AdblockPlus::JsEngine::Context context(jsEngine);
+ const AdblockPlus::JsContext context(jsEngine);
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
std::stringstream traceback;
v8::Local<v8::StackTrace> frames = v8::StackTrace::CurrentStackTrace(100);
for (int i = 0, l = frames->GetFrameCount(); i < l; i++)
{
v8::Local<v8::StackFrame> frame = frames->GetFrame(i);
traceback << (i + 1) << ": ";
« no previous file with comments | « libadblockplus.gyp ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld