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

Unified Diff: Source/bindings/core/dart/DartScriptDebugServer.h

Issue 1428333002: Don't remove things, especially isolates, from a map if they're not there (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: format the TODO better Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698