diff options
author | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 18:12:00 +0000 |
---|---|---|
committer | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 18:12:00 +0000 |
commit | 628da89f7ff111bd9937ee93544866f5d076298a (patch) | |
tree | c9b6da7200f47ccdae800adda1d568c4a578a098 /webkit/port/bridge | |
parent | 5a179bcc5dace716b7bf87622ac1cac960c2ad9b (diff) | |
download | chromium_src-628da89f7ff111bd9937ee93544866f5d076298a.zip chromium_src-628da89f7ff111bd9937ee93544866f5d076298a.tar.gz chromium_src-628da89f7ff111bd9937ee93544866f5d076298a.tar.bz2 |
Second attempt at introducing cross-platform ExceptionContext in the midst of unforking.
This time I also made changes to files in pending, to temporarily keep them in sync until they are removed and avoid ambiguitiy due to include search path order.
Review URL: http://codereview.chromium.org/7267
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bridge')
-rw-r--r-- | webkit/port/bridge/ExceptionContextV8.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/webkit/port/bridge/ExceptionContextV8.cpp b/webkit/port/bridge/ExceptionContextV8.cpp index 7301522..9b14d76 100644 --- a/webkit/port/bridge/ExceptionContextV8.cpp +++ b/webkit/port/bridge/ExceptionContextV8.cpp @@ -34,13 +34,17 @@ namespace WebCore { -ExceptionContext::ExceptionContext() - : m_exception() - , m_exceptionCatcher(0) +// 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() +ExceptionContext::ExceptionContext() + : m_exception() + , m_exceptionCatcher(0) { } @@ -60,16 +64,12 @@ bool ExceptionContext::hadException() return !m_exception.IsEmpty(); } -ExceptionContext* ExceptionContext::createFromNode(Node*) +JSException ExceptionContext::exception() const { - // 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(); + return m_exception; } -JSException ExceptionContext::NoException() +JSException ExceptionContext::noException() { return v8::Local<v8::Value>(); } @@ -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() |