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

Unified Diff: webkit/pending/TreeWalker.h

Issue 4097: Implement better JS exception handling by abstracting KJS::ExecState into an ... (Closed) Base URL: svn://chrome-svn/chrome/branches/chrome_webkit_merge_branch/
Patch Set: '' Created 12 years, 3 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 | « webkit/pending/Traversal.cpp ('k') | webkit/pending/TreeWalker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/pending/TreeWalker.h
===================================================================
--- webkit/pending/TreeWalker.h (revision 2614)
+++ webkit/pending/TreeWalker.h (working copy)
@@ -25,9 +25,7 @@
#ifndef TreeWalker_h
#define TreeWalker_h
-#if USE(JSC)
-#include "JSDOMBinding.h"
-#endif
+#include "ExceptionContext.h"
#include "NodeFilter.h"
#include "Traversal.h"
#include <wtf/PassRefPtr.h>
@@ -47,24 +45,22 @@
Node* currentNode() const { return m_current.get(); }
void setCurrentNode(PassRefPtr<Node>, ExceptionCode&);
-#if USE(JSC)
- Node* parentNode(KJS::ExecState*);
- Node* firstChild(KJS::ExecState*);
- Node* lastChild(KJS::ExecState*);
- Node* previousSibling(KJS::ExecState*);
- Node* nextSibling(KJS::ExecState*);
- Node* previousNode(KJS::ExecState*);
- Node* nextNode(KJS::ExecState*);
+ Node* parentNode(ExceptionContext*);
+ Node* firstChild(ExceptionContext*);
+ Node* lastChild(ExceptionContext*);
+ Node* previousSibling(ExceptionContext*);
+ Node* nextSibling(ExceptionContext*);
+ Node* previousNode(ExceptionContext*);
+ Node* nextNode(ExceptionContext*);
// For non-JS bindings. Silently ignores the JavaScript exception if any.
- Node* parentNode() { return parentNode(execStateFromNode(m_current.get())); }
- Node* firstChild() { return firstChild(execStateFromNode(m_current.get())); }
- Node* lastChild() { return lastChild(execStateFromNode(m_current.get())); }
- Node* previousSibling() { return previousSibling(execStateFromNode(m_current.get())); }
- Node* nextSibling() { return nextSibling(execStateFromNode(m_current.get())); }
- Node* previousNode() { return previousNode(execStateFromNode(m_current.get())); }
- Node* nextNode() { return nextNode(execStateFromNode(m_current.get())); }
-#endif
+ Node* parentNode() { return parentNode(ExceptionContext::createFromNode(m_current.get())); }
+ Node* firstChild() { return firstChild(ExceptionContext::createFromNode(m_current.get())); }
+ Node* lastChild() { return lastChild(ExceptionContext::createFromNode(m_current.get())); }
+ Node* previousSibling() { return previousSibling(ExceptionContext::createFromNode(m_current.get())); }
+ Node* nextSibling() { return nextSibling(ExceptionContext::createFromNode(m_current.get())); }
+ Node* previousNode() { return previousNode(ExceptionContext::createFromNode(m_current.get())); }
+ Node* nextNode() { return nextNode(ExceptionContext::createFromNode(m_current.get())); }
private:
TreeWalker(PassRefPtr<Node>, unsigned whatToShow, PassRefPtr<NodeFilter>, bool expandEntityReferences);
« no previous file with comments | « webkit/pending/Traversal.cpp ('k') | webkit/pending/TreeWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698