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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29408747: Issue 5013 - Mark more method as const (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Isolate::Get() and JsEngine::GetIsolate() should be non-const Created April 11, 2017, 11:39 a.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 | « include/AdblockPlus/FilterEngine.h ('k') | src/FilterEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
===================================================================
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -217,30 +217,30 @@
* convert.
* @return List of arguments converted to `JsValue` objects.
*/
JsValueList ConvertArguments(const v8::Arguments& arguments);
/**
* @see `SetFileSystem()`.
*/
- FileSystemPtr GetFileSystem();
+ FileSystemPtr GetFileSystem() const;
/**
* Sets the `FileSystem` implementation used for all file I/O.
* Setting this is optional, the engine will use a `DefaultFileSystem`
* instance by default, which might be sufficient.
* @param The `FileSystem` instance to use.
*/
void SetFileSystem(FileSystemPtr val);
/**
* @see `SetWebRequest()`.
*/
- WebRequestPtr GetWebRequest();
+ WebRequestPtr GetWebRequest() const;
/**
* Sets the `WebRequest` implementation used for XMLHttpRequests.
* Setting this is optional, the engine will use a `DefaultWebRequest`
* instance by default, which might be sufficient.
* @param The `WebRequest` instance to use.
*/
void SetWebRequest(WebRequestPtr val);
@@ -251,22 +251,22 @@
* @param callback callback function.
*/
void SetIsConnectionAllowedCallback(const IsConnectionAllowedCallback& callback);
/**
* Checks whether current connection is allowed. If
* IsConnectionAllowedCallback is not set then then it returns true.
*/
- bool IsConnectionAllowed();
+ bool IsConnectionAllowed() const;
/**
* @see `SetLogSystem()`.
*/
- LogSystemPtr GetLogSystem();
+ LogSystemPtr GetLogSystem() const;
/**
* Sets the `LogSystem` implementation used for logging (e.g. to handle
* `console.log()` calls from JavaScript).
* Setting this is optional, the engine will use a `DefaultLogSystem`
* instance by default, which might be sufficient.
* @param The `LogSystem` instance to use.
*/
@@ -305,16 +305,16 @@
ScopedV8IsolatePtr isolate;
FileSystemPtr fileSystem;
WebRequestPtr webRequest;
LogSystemPtr logSystem;
std::unique_ptr<v8::Persistent<v8::Context>> context;
EventMap eventCallbacks;
std::mutex eventCallbacksMutex;
- std::mutex isConnectionAllowedMutex;
+ mutable std::mutex isConnectionAllowedMutex;
IsConnectionAllowedCallback isConnectionAllowed;
TimerTasks timerTasks;
TimerPtr timer;
};
}
#endif
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | src/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld