| Index: src/FileSystemJsObject.cpp |
| =================================================================== |
| --- a/src/FileSystemJsObject.cpp |
| +++ b/src/FileSystemJsObject.cpp |
| @@ -67,17 +67,17 @@ |
| { |
| error = e.what(); |
| } |
| catch (...) |
| { |
| error = "Unknown error while reading from " + path; |
| } |
| - const JsContext context(jsEngine); |
| + const JsContext context(*jsEngine); |
| auto result = jsEngine->NewObject(); |
| result.SetProperty("content", content); |
| result.SetProperty("error", error); |
| JsValueList params; |
| params.push_back(result); |
| callback.Call(params); |
| } |
| @@ -107,17 +107,17 @@ |
| { |
| error = e.what(); |
| } |
| catch (...) |
| { |
| error = "Unknown error while writing to " + path; |
| } |
| - const JsContext context(jsEngine); |
| + const JsContext context(*jsEngine); |
| auto errorValue = jsEngine->NewValue(error); |
| JsValueList params; |
| params.push_back(errorValue); |
| callback.Call(params); |
| } |
| private: |
| std::string path; |
| @@ -144,17 +144,17 @@ |
| { |
| error = e.what(); |
| } |
| catch (...) |
| { |
| error = "Unknown error while moving " + fromPath + " to " + toPath; |
| } |
| - const JsContext context(jsEngine); |
| + const JsContext context(*jsEngine); |
| auto errorValue = jsEngine->NewValue(error); |
| JsValueList params; |
| params.push_back(errorValue); |
| callback.Call(params); |
| } |
| private: |
| std::string fromPath; |
| @@ -181,17 +181,17 @@ |
| { |
| error = e.what(); |
| } |
| catch (...) |
| { |
| error = "Unknown error while removing " + path; |
| } |
| - const JsContext context(jsEngine); |
| + const JsContext context(*jsEngine); |
| auto errorValue = jsEngine->NewValue(error); |
| JsValueList params; |
| params.push_back(errorValue); |
| callback.Call(params); |
| } |
| private: |
| std::string path; |
| @@ -219,17 +219,17 @@ |
| { |
| error = e.what(); |
| } |
| catch (...) |
| { |
| error = "Unknown error while calling stat on " + path; |
| } |
| - const JsContext context(jsEngine); |
| + const JsContext context(*jsEngine); |
| auto 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; |