| Index: Source/bindings/core/dart/DartScriptDebugServer.h
|
| diff --git a/Source/bindings/core/dart/DartScriptDebugServer.h b/Source/bindings/core/dart/DartScriptDebugServer.h
|
| index c65ac3a465cbbffe5f7aad739d78d5b8ca383b79..30228dc049d1ea307b58291ad9a44be0eb354d7a 100644
|
| --- a/Source/bindings/core/dart/DartScriptDebugServer.h
|
| +++ b/Source/bindings/core/dart/DartScriptDebugServer.h
|
| @@ -88,7 +88,13 @@ public:
|
| int removeByValue(T value)
|
| {
|
| int handle = m_valueToHandleMap.take(value);
|
| - m_handleToValueMap.remove(handle);
|
| + // TODO(alanknight): This is clearly wrong. We should never call this
|
| + // with an invalid value, but we are doing so sometimes in isolate
|
| + // shutdown. We need to track down the underlying cause, but this
|
| + // is a workaround.
|
| + if (handle != 0) {
|
| + m_handleToValueMap.remove(handle);
|
| + }
|
| return handle;
|
| }
|
|
|
|
|