| Index: plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java
|
| diff --git a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java
|
| index 34ecf8a54b37734ced397228a41f85fd318329bf..8225a14f90cc6074883996708c87b1f1efb5275f 100644
|
| --- a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java
|
| +++ b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java
|
| @@ -392,16 +392,33 @@ public class BreakpointSynchronizer {
|
| private static class PlannedTaskHelper implements SyncCallback {
|
| private final StatusBuilder statusBuilder;
|
| private volatile Exception exception = null;
|
| + private boolean registerCalled = false;
|
| + private boolean doneCallDeferred = false;
|
| PlannedTaskHelper(StatusBuilder statusBuilder) {
|
| this.statusBuilder = statusBuilder;
|
| }
|
| void registerSelf(RelayOk relayOk) {
|
| statusBuilder.plan(relayOk);
|
| + boolean needCallDeferred;
|
| + synchronized (this) {
|
| + registerCalled = true;
|
| + needCallDeferred = doneCallDeferred;
|
| + }
|
| + if (needCallDeferred) {
|
| + statusBuilder.done(exception);
|
| + }
|
| }
|
| public void callbackDone(RuntimeException e) {
|
| if (e != null) {
|
| exception = e;
|
| }
|
| + synchronized (this) {
|
| + if (!registerCalled) {
|
| + // Defer until helper is registered.
|
| + doneCallDeferred = true;
|
| + return;
|
| + }
|
| + }
|
| statusBuilder.done(exception);
|
| }
|
| void setException(Exception ex) {
|
| @@ -410,7 +427,7 @@ public class BreakpointSynchronizer {
|
| }
|
|
|
| /**
|
| - * A class that contains several conunters.
|
| + * A class that contains several counters.
|
| */
|
| private static class ReportBuilder {
|
| enum Property {
|
|
|