Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java

Issue 3402011: Support 'break on exception' feature (Closed)
Patch Set: follow codereview Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java
diff --git a/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java b/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java
index 16992dc099112ecc4965b5b89310033375ee9a6d..73e4d133e584b7286c186260b298f166552d5102 100644
--- a/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java
+++ b/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java
@@ -120,8 +120,35 @@ public interface JavascriptVm {
void listBreakpoints(ListBreakpointsCallback callback, SyncCallback syncCallback);
/**
- * Asynchronously enables or disables all breakpoints on remote.
- * @param callback argument reserved for future, should be null
+ * A generic callback used in operations that a remote variable value.
*/
- void enableBreakpoints(boolean enabled, Void callback, SyncCallback syncCallback);
+ interface SetValueCallback<T> {
+ /**
+ * Method is called after variable has been successfully updated.
+ * @param value holds an actual new value of variable if provided or null
+ */
+ void success(T value);
+ void failure(Exception exception);
+ }
+
+ /**
+ * Asynchronously enables or disables all breakpoints on remote. Parameter
+ * 'enabled' may be null, in this case the remote value is not modified and can be
+ * obtained inside the callback.
+ */
+ void enableBreakpoints(Boolean enabled, SetValueCallback<Boolean> callback,
+ SyncCallback syncCallback);
+
+ enum ExceptionCatchType {
+ CAUGHT, UNCAUGHT
+ }
+
+ /**
+ * Asynchronously enables or disables breaking on exception. All exception
+ * events are split into 2 categories: caught and uncaught. Parameter
+ * 'enabled' may be null, in this case the remote value is not modified and can be
+ * obtained inside the callback.
+ */
+ void setBreakOnException(ExceptionCatchType catchType, Boolean enabled,
+ SetValueCallback<Boolean> callback, SyncCallback syncCallback);
}

Powered by Google App Engine
This is Rietveld 408576698