Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.v8native; | 5 package org.chromium.sdk.internal.v8native; |
| 6 | 6 |
| 7 import java.util.Collections; | 7 import java.util.Collections; |
| 8 import java.util.logging.Level; | 8 import java.util.logging.Level; |
| 9 import java.util.logging.Logger; | 9 import java.util.logging.Logger; |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 return this.v8CommandProcessor.runInDispatchThread(callback, syncCallback); | 286 return this.v8CommandProcessor.runInDispatchThread(callback, syncCallback); |
| 287 } | 287 } |
| 288 | 288 |
| 289 public void maybeRethrowContextException(ContextDismissedCheckedException e) { | 289 public void maybeRethrowContextException(ContextDismissedCheckedException e) { |
| 290 // TODO(peter.rybin): make some kind of option out of this | 290 // TODO(peter.rybin): make some kind of option out of this |
| 291 final boolean strictPolicy = true; | 291 final boolean strictPolicy = true; |
| 292 if (strictPolicy) { | 292 if (strictPolicy) { |
| 293 throw new InvalidContextException(e); | 293 throw new InvalidContextException(e); |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | |
| 297 public RelayOk maybeRethrowContextException(ContextDismissedCheckedException e , | |
| 298 SyncCallback syncCallback) { | |
| 299 // TODO(peter.rybin): make some kind of option out of this | |
| 300 final boolean strictPolicy = true; | |
| 301 if (strictPolicy) { | |
| 302 throw new InvalidContextException(e); | |
| 303 } else { | |
| 304 if (syncCallback != null) { | |
| 305 syncCallback.callbackDone(new InvalidContextException(e)); | |
| 306 } | |
| 307 return new RelayOk() { | |
|
apavlov
2013/01/10 13:59:20
Just occurred to me. Why don't you keep a singleto
Peter Rybin
2013/01/10 14:10:44
Mostly because I don't want to spoil outer namespa
| |
| 308 // It's ok, we called SyncCallback alright. | |
| 309 }; | |
| 310 } | |
| 311 } | |
| 296 } | 312 } |
| OLD | NEW |