ericmckean / wave-protocol

Automatically exported from code.google.com/p/wave-protocol
0 stars 0 forks source link

Querying annotation ranges should be independent of current selection #242

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I do not have a reliable way to reproduce this, only a flaky way.

What steps will reproduce the problem?
1. Sync to a changeset before the commit for issue 
http://codereview.waveprotocol.org/555002, or write some code to query an 
EditorContext for the current selection range, then a deferred command to query 
for annotations around that range.
2. Keep changing the selection while that command is running (select text, 
click, select text, click, etc).
3. Wait for shiny.

Will eventually trigger assertion failure in EditorImpl:957, which, during 
answering a getAnnotation() query, checks that the browser selection is 
currently collapsed when someone is performing an annotation-range query.

That assertion appears to be invalid.  Application code should be able to query 
for annotation ranges regardless of what the current browser selection is.

Original issue reported on code.google.com by hearn...@google.com on 16 Mar 2011 at 3:03

GoogleCodeExporter commented 9 years ago
In issue 555002, I'm downgrading the assertion to log a warning and return null 
rather than crash.

Original comment by hearn...@google.com on 16 Mar 2011 at 3:24