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

Issue 885653005: Issue 22191. Grab the document lock before positionsLock to prevent deadlock. (Closed)

Created:
5 years, 10 months ago by scheglov
Modified:
5 years, 10 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org, ricow1
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Issue 22191. Grab the document lock before positionsLock to prevent deadlock. R=paulberry@google.com BUG= https://code.google.com/p/dart/issues/detail?id=22191 Committed: https://code.google.com/p/dart/source/detail?r=43251

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -4 lines) Patch
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java View 2 chunks +20 lines, -4 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
5 years, 10 months ago (2015-01-28 18:25:15 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/885653005/diff/1/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java File editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java (right): https://codereview.chromium.org/885653005/diff/1/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java#newcode339 editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java:339: synchronized (getDocumentLockObject()) { It would be nice to ...
5 years, 10 months ago (2015-01-28 18:30:22 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as 43251 (presubmit successful).
5 years, 10 months ago (2015-01-28 18:33:23 UTC) #3
scheglov
5 years, 10 months ago (2015-01-28 18:33:41 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/885653005/diff/1/editor/tools/plugins/com.goo...
File
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java
(right):

https://codereview.chromium.org/885653005/diff/1/editor/tools/plugins/com.goo...
editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager_NEW.java:339:
synchronized (getDocumentLockObject()) {
On 2015/01/28 18:30:22, Paul Berry wrote:
> It would be nice to have a comment here explaining why we've had to do this,
> e.g. something like "when the ServerResponseReaderThread handles a highlights
> notification, it grabs the document lock before the positions lock.  To avoid
a
> deadlock, we must grab the locks in the same order."

Done.

Powered by Google App Engine
This is Rietveld 408576698