Index: src/FileSystemJsObject.cpp |
=================================================================== |
--- a/src/FileSystemJsObject.cpp |
+++ b/src/FileSystemJsObject.cpp |
@@ -17,17 +17,17 @@ |
#include <AdblockPlus/FileSystem.h> |
#include <stdexcept> |
#include <sstream> |
#include <vector> |
#include <AdblockPlus/JsValue.h> |
#include "FileSystemJsObject.h" |
-#include "Utils.h" |
+#include "JsContext.h" |
#include "Thread.h" |
#include "Utils.h" |
using namespace AdblockPlus; |
namespace |
{ |
class IoThread : public Thread |
@@ -67,17 +67,17 @@ namespace |
{ |
error = e.what(); |
} |
catch (...) |
{ |
error = "Unknown error while reading from " + path; |
} |
- const JsEngine::Context context(jsEngine); |
+ const JsContext context(jsEngine); |
JsValuePtr result = jsEngine->NewObject(); |
result->SetProperty("content", content); |
result->SetProperty("error", error); |
JsValueList params; |
params.push_back(result); |
callback->Call(params); |
delete this; |
} |
@@ -108,17 +108,17 @@ namespace |
{ |
error = e.what(); |
} |
catch (...) |
{ |
error = "Unknown error while writing to " + path; |
} |
- const JsEngine::Context context(jsEngine); |
+ const JsContext context(jsEngine); |
JsValuePtr errorValue = jsEngine->NewValue(error); |
JsValueList params; |
params.push_back(errorValue); |
callback->Call(params); |
delete this; |
} |
private: |
@@ -146,17 +146,17 @@ namespace |
{ |
error = e.what(); |
} |
catch (...) |
{ |
error = "Unknown error while moving " + fromPath + " to " + toPath; |
} |
- const JsEngine::Context context(jsEngine); |
+ const JsContext context(jsEngine); |
JsValuePtr errorValue = jsEngine->NewValue(error); |
JsValueList params; |
params.push_back(errorValue); |
callback->Call(params); |
delete this; |
} |
private: |
@@ -184,17 +184,17 @@ namespace |
{ |
error = e.what(); |
} |
catch (...) |
{ |
error = "Unknown error while removing " + path; |
} |
- const JsEngine::Context context(jsEngine); |
+ const JsContext context(jsEngine); |
JsValuePtr errorValue = jsEngine->NewValue(error); |
JsValueList params; |
params.push_back(errorValue); |
callback->Call(params); |
delete this; |
} |
private: |
@@ -223,17 +223,17 @@ namespace |
{ |
error = e.what(); |
} |
catch (...) |
{ |
error = "Unknown error while calling stat on " + path; |
} |
- const JsEngine::Context context(jsEngine); |
+ const JsContext context(jsEngine); |
JsValuePtr result = jsEngine->NewObject(); |
result->SetProperty("exists", statResult.exists); |
result->SetProperty("isFile", statResult.isFile); |
result->SetProperty("isDirectory", statResult.isDirectory); |
result->SetProperty("lastModified", statResult.lastModified); |
result->SetProperty("error", error); |
JsValueList params; |