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

Side by Side Diff: plugins/org.chromium.sdk/src/org/chromium/sdk/internal/JavascriptVmImpl.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.sdk.internal; 5 package org.chromium.sdk.internal;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 8
9 import org.chromium.sdk.Breakpoint; 9 import org.chromium.sdk.Breakpoint;
10 import org.chromium.sdk.CallbackSemaphore; 10 import org.chromium.sdk.CallbackSemaphore;
11 import org.chromium.sdk.JavascriptVm; 11 import org.chromium.sdk.JavascriptVm;
12 import org.chromium.sdk.SyncCallback; 12 import org.chromium.sdk.SyncCallback;
13 import org.chromium.sdk.JavascriptVm.ExceptionCatchType;
14 import org.chromium.sdk.JavascriptVm.SetValueCallback;
13 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException; 15 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException;
14 16
15 /** 17 /**
16 * Base implementation of JavascriptVm. 18 * Base implementation of JavascriptVm.
17 */ 19 */
18 public abstract class JavascriptVmImpl implements JavascriptVm { 20 public abstract class JavascriptVmImpl implements JavascriptVm {
19 21
20 protected JavascriptVmImpl() { 22 protected JavascriptVmImpl() {
21 } 23 }
22 24
(...skipping 16 matching lines...) Expand all
39 BreakpointCallback callback, SyncCallback syncCallback) { 41 BreakpointCallback callback, SyncCallback syncCallback) {
40 getDebugSession().getBreakpointManager() 42 getDebugSession().getBreakpointManager()
41 .setBreakpoint(type, target, line, position, enabled, condition, ignoreC ount, callback, 43 .setBreakpoint(type, target, line, position, enabled, condition, ignoreC ount, callback,
42 syncCallback); 44 syncCallback);
43 } 45 }
44 46
45 public void listBreakpoints(final ListBreakpointsCallback callback, SyncCallba ck syncCallback) { 47 public void listBreakpoints(final ListBreakpointsCallback callback, SyncCallba ck syncCallback) {
46 getDebugSession().getBreakpointManager().reloadBreakpoints(callback, syncCal lback); 48 getDebugSession().getBreakpointManager().reloadBreakpoints(callback, syncCal lback);
47 } 49 }
48 50
49 public void enableBreakpoints(boolean enabled, Void callback, SyncCallback syn cCallback) { 51 public void enableBreakpoints(Boolean enabled, SetValueCallback<Boolean> callb ack,
52 SyncCallback syncCallback) {
50 getDebugSession().getBreakpointManager().enableBreakpoints(enabled, callback , syncCallback); 53 getDebugSession().getBreakpointManager().enableBreakpoints(enabled, callback , syncCallback);
51 } 54 }
52 55
56 public void setBreakOnException(ExceptionCatchType catchType, Boolean enabled,
57 SetValueCallback<Boolean> callback, SyncCallback syncCallback) {
58 getDebugSession().getBreakpointManager().setBreakOnException(catchType, enab led,
59 callback, syncCallback);
60 }
61
53 protected abstract DebugSession getDebugSession(); 62 protected abstract DebugSession getDebugSession();
54 63
55 // TODO(peter.rybin): This message will be obsolete in JavaSE-1.6. 64 // TODO(peter.rybin): This message will be obsolete in JavaSE-1.6.
56 public static IOException newIOException(String message, Throwable cause) { 65 public static IOException newIOException(String message, Throwable cause) {
57 IOException result = new IOException(message); 66 IOException result = new IOException(message);
58 result.initCause(cause); 67 result.initCause(cause);
59 return result; 68 return result;
60 } 69 }
61 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698