From cdce139e4aac3d2f1e4b2f41f6fc4d77779b2b7f Mon Sep 17 00:00:00 2001 From: "dglazkov@google.com" Date: Fri, 10 Oct 2008 17:56:04 +0000 Subject: Rolling back tree breakage TBR=pkasting Review URL: http://codereview.chromium.org/7086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3224 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/build/KJSBindings/KJSBindings.vcproj | 8 -------- webkit/build/V8Bindings/V8Bindings.vcproj | 4 ---- webkit/build/port/port.vcproj | 4 ++++ webkit/pending/ExceptionContext.h | 29 +++++++++-------------------- webkit/port/bridge/ExceptionContextV8.cpp | 24 ++++++++++++------------ 5 files changed, 25 insertions(+), 44 deletions(-) (limited to 'webkit') diff --git a/webkit/build/KJSBindings/KJSBindings.vcproj b/webkit/build/KJSBindings/KJSBindings.vcproj index 39867ef..c1f5a21 100644 --- a/webkit/build/KJSBindings/KJSBindings.vcproj +++ b/webkit/build/KJSBindings/KJSBindings.vcproj @@ -1922,14 +1922,6 @@ > - - - - diff --git a/webkit/build/V8Bindings/V8Bindings.vcproj b/webkit/build/V8Bindings/V8Bindings.vcproj index 209ba50..4e660d4 100644 --- a/webkit/build/V8Bindings/V8Bindings.vcproj +++ b/webkit/build/V8Bindings/V8Bindings.vcproj @@ -2393,10 +2393,6 @@ > - - diff --git a/webkit/build/port/port.vcproj b/webkit/build/port/port.vcproj index 4aa94d7..9f0805b 100644 --- a/webkit/build/port/port.vcproj +++ b/webkit/build/port/port.vcproj @@ -1208,6 +1208,10 @@ Name="bridge" > + + diff --git a/webkit/pending/ExceptionContext.h b/webkit/pending/ExceptionContext.h index 529b8f3..7b6c1b4 100644 --- a/webkit/pending/ExceptionContext.h +++ b/webkit/pending/ExceptionContext.h @@ -35,13 +35,6 @@ #include #include "ScriptController.h" -#if USE(JSC) -namespace KJS { -class ExecState; -} -#endif - - namespace WebCore { class Node; @@ -54,30 +47,26 @@ class ExceptionCatcher; // by the ExceptionCatcher. class ExceptionContext : Noncopyable { public: - ExceptionContext(Node*); -#if USE(V8) ExceptionContext(); -#elif USE(JSC) - ExceptionContext(KJS::ExecState* exec) : m_exec(exec) {} - KJS::ExecState* exec() const { return m_exec; } -#endif - ~ExceptionContext() {} + ~ExceptionContext(); bool hadException(); - JSException exception() const; + JSException exception() const { return m_exception; } + + static ExceptionContext* createFromNode(Node*); // Returns a non-exception code object. - static JSException noException(); + static JSException NoException(); private: + void setException(JSException exception) { m_exception = exception; } + + JSException m_exception; + #if USE(V8) friend class ExceptionCatcher; - void setException(JSException exception) { m_exception = exception; } void setExceptionCatcher(ExceptionCatcher*); - JSException m_exception; ExceptionCatcher* m_exceptionCatcher; -#elif USE(JSC) - KJS::ExecState* m_exec; #endif }; diff --git a/webkit/port/bridge/ExceptionContextV8.cpp b/webkit/port/bridge/ExceptionContextV8.cpp index 9b14d76..7301522 100644 --- a/webkit/port/bridge/ExceptionContextV8.cpp +++ b/webkit/port/bridge/ExceptionContextV8.cpp @@ -34,20 +34,16 @@ namespace WebCore { -// Unlike JSC, which stores exceptions in ExecState that is accessible from -// ScriptController that is retrievable from Node*, V8 uses static chain of -// handlers (encapsulated as v8::TryCatch and here as ExceptionCatcher) -// to track exceptions, so it has no need for Node*. -ExceptionContext::ExceptionContext(Node* node) -{ -} - ExceptionContext::ExceptionContext() : m_exception() , m_exceptionCatcher(0) { } +ExceptionContext::~ExceptionContext() +{ +} + void ExceptionContext::setExceptionCatcher(ExceptionCatcher* exceptionCatcher) { if (m_exceptionCatcher && exceptionCatcher) @@ -64,12 +60,16 @@ bool ExceptionContext::hadException() return !m_exception.IsEmpty(); } -JSException ExceptionContext::exception() const +ExceptionContext* ExceptionContext::createFromNode(Node*) { - return m_exception; + // Unlike JSC, which stores exceptions in ExecState that is accessible from + // ScriptController that is retrievable from Node*, V8 uses static chain of + // handlers (encapsulated as v8::TryCatch and here as ExceptionCatcher) + // to track exceptions, so it has no need for Node*. + return new ExceptionContext(); } -JSException ExceptionContext::noException() +JSException ExceptionContext::NoException() { return v8::Local(); } @@ -93,7 +93,7 @@ void ExceptionCatcher::updateContext() if (m_catcher.HasCaught()) m_context->setException(m_catcher.Exception()); else - m_context->setException(ExceptionContext::noException()); + m_context->setException(ExceptionContext::NoException()); } ExceptionCatcher::~ExceptionCatcher() -- cgit v1.1