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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29361562: Issue 3594 - remove circular references JsEngine-JsValue-JsEngine (Closed)
Patch Set: Created Nov. 3, 2016, 11:26 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 | « no previous file | include/AdblockPlus/JsValue.h » ('j') | include/AdblockPlus/JsValue.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h
index 19d2586ea9a3515b8806d4edb5f26448e6e16012..9f371ec0795db246650d45dd46e2940708afff2a 100644
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -93,6 +93,21 @@ namespace AdblockPlus
typedef std::map<std::string, EventCallback> EventMap;
/**
+ * Exception which is thrown when JsEngine is not available.
+ *
+ * For instance, if JsEngine is already released but someone calls a method
+ * on JsValue this exception will be thrown.
+ */
+ class JsEngineNotAvailableException : public std::runtime_error
+ {
+ public:
+ JsEngineNotAvailableException()
+ : std::runtime_error("JsEngine is not available")
+ {
+ }
+ };
+
+ /**
* Creates a new JavaScript engine instance.
* @param appInfo Information about the app.
* @param isolate v8::Isolate wrapper. This parameter should be considered
« no previous file with comments | « no previous file | include/AdblockPlus/JsValue.h » ('j') | include/AdblockPlus/JsValue.h » ('J')

Powered by Google App Engine
This is Rietveld