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

Unified Diff: webkit/pending/Node.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/Node.h ('k') | webkit/pending/NodeFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/pending/Node.cpp
===================================================================
--- webkit/pending/Node.cpp (revision 2614)
+++ webkit/pending/Node.cpp (working copy)
@@ -39,6 +39,7 @@
#include "DynamicNodeList.h"
#include "Element.h"
#include "ExceptionCode.h"
+#include "ExceptionContext.h"
#include "Frame.h"
#include "HTMLNames.h"
#include "Logging.h"
@@ -57,8 +58,6 @@
#include <wtf/RefCountedLeakCounter.h>
#if USE(JSC)
-#include "JSDOMBinding.h"
-#include <kjs/ExecState.h>
#include <kjs/JSLock.h>
#endif
@@ -1271,10 +1270,9 @@
}
};
-#if USE(JSC)
class ResolveNamespaceFunctor {
public:
- ResolveNamespaceFunctor(NSResolver* resolver, ExceptionCode& ec, KJS::ExecState* exec)
+ ResolveNamespaceFunctor(NSResolver* resolver, ExceptionCode& ec, ExceptionContext* exec)
: m_resolver(resolver)
, m_exceptionCode(ec)
, m_exec(exec)
@@ -1312,7 +1310,7 @@
private:
NSResolver* m_resolver;
ExceptionCode& m_exceptionCode;
- KJS::ExecState* m_exec;
+ ExceptionContext* m_exec;
};
static bool selectorNeedsNamespaceResolution(CSSSelector* currentSelector)
@@ -1321,7 +1319,7 @@
return forEachSelector(functor, currentSelector);
}
-static bool resolveNamespacesForSelector(CSSSelector* currentSelector, NSResolver* resolver, ExceptionCode& ec, KJS::ExecState* exec)
+static bool resolveNamespacesForSelector(CSSSelector* currentSelector, NSResolver* resolver, ExceptionCode& ec, ExceptionContext* exec)
{
ResolveNamespaceFunctor functor(resolver, ec, exec);
return forEachSelector(functor, currentSelector);
@@ -1329,15 +1327,15 @@
PassRefPtr<Element> Node::querySelector(const String& selectors, ExceptionCode& ec)
{
- return querySelector(selectors, 0, ec, execStateFromNode(this));
+ return querySelector(selectors, 0, ec, ExceptionContext::createFromNode(this));
}
PassRefPtr<NodeList> Node::querySelectorAll(const String& selectors, ExceptionCode& ec)
{
- return querySelectorAll(selectors, 0, ec, execStateFromNode(this));
+ return querySelectorAll(selectors, 0, ec, ExceptionContext::createFromNode(this));
}
-PassRefPtr<Element> Node::querySelector(const String& selectors, NSResolver* resolver, ExceptionCode& ec, KJS::ExecState* exec)
+PassRefPtr<Element> Node::querySelector(const String& selectors, NSResolver* resolver, ExceptionCode& ec, ExceptionContext* exec)
{
if (selectors.isEmpty()) {
ec = SYNTAX_ERR;
@@ -1397,7 +1395,7 @@
return 0;
}
-PassRefPtr<NodeList> Node::querySelectorAll(const String& selectors, NSResolver* resolver, ExceptionCode& ec, KJS::ExecState* exec)
+PassRefPtr<NodeList> Node::querySelectorAll(const String& selectors, NSResolver* resolver, ExceptionCode& ec, ExceptionContext* exec)
{
if (selectors.isEmpty()) {
ec = SYNTAX_ERR;
@@ -1434,7 +1432,6 @@
return createSelectorNodeList(this, querySelector.get());
}
-#endif // USE(JSC)
Document *Node::ownerDocument() const
{
« no previous file with comments | « webkit/pending/Node.h ('k') | webkit/pending/NodeFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698