summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-10 17:56:04 +0000
committerdglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-10 17:56:04 +0000
commitcdce139e4aac3d2f1e4b2f41f6fc4d77779b2b7f (patch)
tree60a872b2aec7554c666a65c2cb5452d8114c7e43 /webkit
parentbef551add67074d65d2d67cdb877cd8a8a7135e6 (diff)
downloadchromium_src-cdce139e4aac3d2f1e4b2f41f6fc4d77779b2b7f.zip
chromium_src-cdce139e4aac3d2f1e4b2f41f6fc4d77779b2b7f.tar.gz
chromium_src-cdce139e4aac3d2f1e4b2f41f6fc4d77779b2b7f.tar.bz2
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
Diffstat (limited to 'webkit')
-rw-r--r--webkit/build/KJSBindings/KJSBindings.vcproj8
-rw-r--r--webkit/build/V8Bindings/V8Bindings.vcproj4
-rw-r--r--webkit/build/port/port.vcproj4
-rw-r--r--webkit/pending/ExceptionContext.h29
-rw-r--r--webkit/port/bridge/ExceptionContextV8.cpp24
5 files changed, 25 insertions, 44 deletions
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 @@
>
</File>
<File
- RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\js\ExceptionContext.cpp"
- >
- </File>
- <File
- RelativePath="..\..\pending\ExceptionContext.h"
- >
- </File>
- <File
RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\js\ScriptControllerWin.cpp"
>
</File>
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 @@
>
</File>
<File
- RelativePath="..\..\pending\ExceptionContext.h"
- >
- </File>
- <File
RelativePath="..\..\port\bridge\ExceptionContextV8.cpp"
>
</File>
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"
>
<File
+ RelativePath="..\..\pending\ExceptionContext.h"
+ >
+ </File>
+ <File
RelativePath="..\..\port\bridge\FrameWin.cpp"
>
</File>
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 <wtf/Noncopyable.h>
#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<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()