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

Unified Diff: Source/core/page/DOMSelection.cpp

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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
Index: Source/core/page/DOMSelection.cpp
diff --git a/Source/core/page/DOMSelection.cpp b/Source/core/page/DOMSelection.cpp
index a1d67021f1a67e36e770bafecfb68ae74591fbfa..694b81fd11deae104eacfd5c82db59d4b64a60f3 100644
--- a/Source/core/page/DOMSelection.cpp
+++ b/Source/core/page/DOMSelection.cpp
@@ -31,7 +31,6 @@
#include "config.h"
#include "core/page/DOMSelection.h"
-#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/Document.h"
@@ -200,7 +199,7 @@ void DOMSelection::collapse(Node* node, int offset, ExceptionState& exceptionSta
return;
if (offset < 0) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("collapse", "Selection", String::number(offset) + " is not a valid offset."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is not a valid offset.");
return;
}
@@ -219,7 +218,7 @@ void DOMSelection::collapseToEnd(ExceptionState& exceptionState)
const VisibleSelection& selection = m_frame->selection().selection();
if (selection.isNone()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("collapseToEnd", "Selection", "there is no selection."));
+ exceptionState.throwDOMException(InvalidStateError, "there is no selection.");
return;
}
@@ -234,7 +233,7 @@ void DOMSelection::collapseToStart(ExceptionState& exceptionState)
const VisibleSelection& selection = m_frame->selection().selection();
if (selection.isNone()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("collapseToStart", "Selection", "there is no selection."));
+ exceptionState.throwDOMException(InvalidStateError, "there is no selection.");
return;
}
@@ -254,12 +253,12 @@ void DOMSelection::setBaseAndExtent(Node* baseNode, int baseOffset, Node* extent
return;
if (baseOffset < 0) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("setBaseAndExtent", "Selection", String::number(baseOffset) + " is not a valid base offset."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(baseOffset) + " is not a valid base offset.");
return;
}
if (extentOffset < 0) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("setBaseAndExtent", "Selection", String::number(extentOffset) + " is not a valid extent offset."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(extentOffset) + " is not a valid extent offset.");
return;
}
@@ -278,7 +277,7 @@ void DOMSelection::setPosition(Node* node, int offset, ExceptionState& exception
if (!m_frame)
return;
if (offset < 0) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("setPosition", "Selection", String::number(offset) + " is not a valid offset."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is not a valid offset.");
return;
}
@@ -345,16 +344,16 @@ void DOMSelection::extend(Node* node, int offset, ExceptionState& exceptionState
return;
if (!node) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::failedToExecute("extend", "Selection", "The node provided is invalid."));
+ exceptionState.throwDOMException(TypeMismatchError, "The node provided is invalid.");
return;
}
if (offset < 0) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("extend", "Selection", String::number(offset) + " is not a valid offset."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is not a valid offset.");
return;
}
if (offset > (node->offsetInCharacters() ? caretMaxOffset(node) : (int)node->childNodeCount())) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("extend", "Selection", String::number(offset) + " is larger than the given node's length."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is larger than the given node's length.");
return;
}
@@ -371,7 +370,7 @@ PassRefPtr<Range> DOMSelection::getRangeAt(int index, ExceptionState& exceptionS
return 0;
if (index < 0 || index >= rangeCount()) {
- exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("getRangeAt", "Selection", String::number(index) + " is not a valid index."));
+ exceptionState.throwDOMException(IndexSizeError, String::number(index) + " is not a valid index.");
return 0;
}
« no previous file with comments | « Source/core/loader/appcache/ApplicationCache.cpp ('k') | Source/core/platform/chromium/ChromiumDataObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698