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

Unified Diff: webkit/pending/TreeWalker.cpp

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/TreeWalker.h ('k') | webkit/port/DerivedSources.make » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/pending/TreeWalker.cpp
===================================================================
--- webkit/pending/TreeWalker.cpp (revision 2614)
+++ webkit/pending/TreeWalker.cpp (working copy)
@@ -25,14 +25,12 @@
#include "config.h"
#include "TreeWalker.h"
-#include <kjs/ExecState.h>
#include "ExceptionCode.h"
+#include "ExceptionContext.h"
#include "Node.h"
#include "NodeFilter.h"
#include <wtf/PassRefPtr.h>
-using namespace KJS;
-
namespace WebCore {
TreeWalker::TreeWalker(PassRefPtr<Node> rootNode, unsigned whatToShow, PassRefPtr<NodeFilter> filter, bool expandEntityReferences)
@@ -56,8 +54,7 @@
return m_current.get();
}
-#if USE(JSC)
-Node* TreeWalker::parentNode(ExecState* exec)
+Node* TreeWalker::parentNode(ExceptionContext* exec)
{
RefPtr<Node> node = m_current;
while (node != root()) {
@@ -73,7 +70,7 @@
return 0;
}
-Node* TreeWalker::firstChild(ExecState* exec)
+Node* TreeWalker::firstChild(ExceptionContext* exec)
{
for (RefPtr<Node> node = m_current->firstChild(); node; ) {
short acceptNodeResult = acceptNode(exec, node.get());
@@ -106,7 +103,7 @@
return 0;
}
-Node* TreeWalker::lastChild(ExecState* exec)
+Node* TreeWalker::lastChild(ExceptionContext* exec)
{
for (RefPtr<Node> node = m_current->lastChild(); node; ) {
short acceptNodeResult = acceptNode(exec, node.get());
@@ -139,7 +136,7 @@
return 0;
}
-Node* TreeWalker::previousSibling(ExecState* exec)
+Node* TreeWalker::previousSibling(ExceptionContext* exec)
{
RefPtr<Node> node = m_current;
if (node == root())
@@ -175,7 +172,7 @@
}
}
-Node* TreeWalker::nextSibling(ExecState* exec)
+Node* TreeWalker::nextSibling(ExceptionContext* exec)
{
RefPtr<Node> node = m_current;
if (node == root())
@@ -211,7 +208,7 @@
}
}
-Node* TreeWalker::previousNode(ExecState* exec)
+Node* TreeWalker::previousNode(ExceptionContext* exec)
{
RefPtr<Node> node = m_current;
while (node != root()) {
@@ -250,7 +247,7 @@
return 0;
}
-Node* TreeWalker::nextNode(ExecState* exec)
+Node* TreeWalker::nextNode(ExceptionContext* exec)
{
RefPtr<Node> node = m_current;
Children:
@@ -276,6 +273,5 @@
}
return 0;
}
-#endif // USE(JSC)
} // namespace WebCore
« no previous file with comments | « webkit/pending/TreeWalker.h ('k') | webkit/port/DerivedSources.make » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698