| Index: Source/core/editing/DOMSelection.cpp
|
| ===================================================================
|
| --- Source/core/editing/DOMSelection.cpp (revision 181787)
|
| +++ Source/core/editing/DOMSelection.cpp (working copy)
|
| @@ -197,10 +197,14 @@
|
|
|
| void DOMSelection::collapse(Node* node, int offset, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(node);
|
| if (!m_frame)
|
| return;
|
|
|
| + if (!node) {
|
| + m_frame->selection().clear();
|
| + return;
|
| + }
|
| +
|
| if (offset < 0) {
|
| exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is not a valid offset.");
|
| return;
|
|
|