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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months 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 | « Source/core/page/DOMSelection.cpp ('k') | Source/core/page/EventSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindow.cpp
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index 4e1b6d38a4165fc027368b244c417eabb46b65b7..59684c8e56811f9e991559460d330bafc388dada 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -640,13 +640,13 @@ Storage* DOMWindow::sessionStorage(ExceptionCode& ec) const
return 0;
if (!document->securityOrigin()->canAccessLocalStorage(document->topOrigin())) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
if (m_sessionStorage) {
if (!m_sessionStorage->area()->canAccessStorage(m_frame)) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
return m_sessionStorage.get();
@@ -658,7 +658,7 @@ Storage* DOMWindow::sessionStorage(ExceptionCode& ec) const
OwnPtr<StorageArea> storageArea = page->sessionStorage()->storageArea(document->securityOrigin());
if (!storageArea->canAccessStorage(m_frame)) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
@@ -676,13 +676,13 @@ Storage* DOMWindow::localStorage(ExceptionCode& ec) const
return 0;
if (!document->securityOrigin()->canAccessLocalStorage(document->topOrigin())) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
if (m_localStorage) {
if (!m_localStorage->area()->canAccessStorage(m_frame)) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
return m_localStorage.get();
@@ -697,7 +697,7 @@ Storage* DOMWindow::localStorage(ExceptionCode& ec) const
OwnPtr<StorageArea> storageArea = StorageNamespace::localStorageArea(document->securityOrigin());
if (!storageArea->canAccessStorage(m_frame)) {
- ec = SECURITY_ERR;
+ ec = SecurityError;
return 0;
}
@@ -713,7 +713,7 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
Document* sourceDocument = source->document();
// Compute the target origin. We need to do this synchronously in order
- // to generate the SYNTAX_ERR exception correctly.
+ // to generate the SyntaxError exception correctly.
RefPtr<SecurityOrigin> target;
if (targetOrigin == "/") {
if (!sourceDocument)
@@ -724,7 +724,7 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
// It doesn't make sense target a postMessage at a unique origin
// because there's no way to represent a unique origin in a string.
if (target->isUnique()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return;
}
}
« no previous file with comments | « Source/core/page/DOMSelection.cpp ('k') | Source/core/page/EventSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698