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

Unified Diff: Source/bindings/v8/ExceptionState.cpp

Issue 18398002: Remove IDBNotFoundError ExceptionCode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing include in code gen wich causes win compile failure Created 7 years, 5 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/bindings/v8/ExceptionState.h ('k') | Source/bindings/v8/ExceptionStatePlaceholder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionState.cpp
diff --git a/Source/core/dom/NodeList.cpp b/Source/bindings/v8/ExceptionState.cpp
similarity index 68%
copy from Source/core/dom/NodeList.cpp
copy to Source/bindings/v8/ExceptionState.cpp
index fb06c70817bff7406297e671ca5dd5f5ff7f29e6..8a1cdb154ba84ec163993efb3430879350db8c70 100644
--- a/Source/core/dom/NodeList.cpp
+++ b/Source/bindings/v8/ExceptionState.cpp
@@ -29,29 +29,40 @@
*/
#include "config.h"
-#include "core/dom/NodeList.h"
+#include "bindings/v8/ExceptionState.h"
-#include "core/dom/Node.h"
+#include "bindings/v8/V8ThrowException.h"
+#include "core/dom/ExceptionCode.h"
namespace WebCore {
-void NodeList::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtr<Node>& returnValue0, bool& returnValue1Enabled, unsigned& returnValue1)
+void ExceptionState::throwDOMException(const ExceptionCode& ec, const char* message)
{
- // Length property cannot be overridden.
- DEFINE_STATIC_LOCAL(const AtomicString, length, ("length", AtomicString::ConstructFromLiteral));
- if (name == length) {
- returnValue1Enabled = true;
- returnValue1 = this->length();
+ if (m_exceptionThrown)
return;
- }
+ V8ThrowException::setDOMException(ec, message, m_isolate);
michaeln 2013/07/10 20:31:02 Does this call invoke script? If so, i think this
+ m_exceptionThrown = true;
+}
- Node* result = namedItem(name);
- if (!result)
+void ExceptionState::throwTypeError(const char* message)
+{
+ if (m_exceptionThrown)
return;
+ V8ThrowException::throwTypeError(message, m_isolate);
michaeln 2013/07/10 20:32:21 ditto
+ m_exceptionThrown = true;
+}
+
+NonThrowExceptionState::NonThrowExceptionState()
+ : ExceptionState(0) { }
- returnValue0Enabled = true;
- returnValue0 = result;
+void NonThrowExceptionState::throwDOMException(const ExceptionCode& ec, const char*)
+{
+ m_code = ec;
}
+void NonThrowExceptionState::throwTypeError(const char*)
+{
+ m_code = TypeError;
+}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/ExceptionState.h ('k') | Source/bindings/v8/ExceptionStatePlaceholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698