diff options
author | Andrei Popescu <andreip@google.com> | 2009-08-06 15:25:07 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-08-06 16:18:42 +0100 |
commit | 1a8fe8ee97a14e44298afb328919b5652277a223 (patch) | |
tree | e90c3b097b8aeb1aed4130c5a3d0088f31ee2d02 /WebCore/bindings | |
parent | cc42ddfc59bb9fa5aa3b916a27f682fa6fb128a0 (diff) | |
download | external_webkit-1a8fe8ee97a14e44298afb328919b5652277a223.zip external_webkit-1a8fe8ee97a14e44298afb328919b5652277a223.tar.gz external_webkit-1a8fe8ee97a14e44298afb328919b5652277a223.tar.bz2 |
Add more LOCK_V8 macros: the custom V8 bindings are used to invoke JS callbacks to let the JS application know when something interesting happens. These entry points into V8 are denoted by "handleEvent" methods and need to be protected as well.
Diffstat (limited to 'WebCore/bindings')
6 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp index 97bb8ec..eecff45 100644 --- a/WebCore/bindings/v8/ScriptController.cpp +++ b/WebCore/bindings/v8/ScriptController.cpp @@ -145,7 +145,7 @@ bool ScriptController::processingUserGesture() const return true; V8Proxy* activeProxy = activeFrame->script()->proxy(); - + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(activeFrame); // FIXME: find all cases context can be empty: @@ -244,6 +244,7 @@ void ScriptController::bindToWindowObject(Frame* frame, const String& key, NPObj void ScriptController::collectGarbage() { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_proxy->frame()); if (context.IsEmpty()) @@ -336,6 +337,7 @@ static NPObject* createNoScriptObject() static NPObject* createScriptObject(Frame* frame) { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(frame); if (context.IsEmpty()) diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp index a277027..daa9b34 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp @@ -52,6 +52,7 @@ V8CustomSQLStatementCallback::~V8CustomSQLStatementCallback() void V8CustomSQLStatementCallback::handleEvent(SQLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException) { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get()); diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp index 2f4401f..6c7aba2 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp @@ -52,6 +52,7 @@ V8CustomSQLStatementErrorCallback::~V8CustomSQLStatementErrorCallback() bool V8CustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLError* error) { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get()); diff --git a/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp index a175df5..c255483 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp @@ -53,6 +53,7 @@ V8CustomSQLTransactionCallback::~V8CustomSQLTransactionCallback() void V8CustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bool& raisedException) { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get()); diff --git a/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp index 6233a1d..8dcb0a8 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp @@ -52,6 +52,7 @@ V8CustomSQLTransactionErrorCallback::~V8CustomSQLTransactionErrorCallback() void V8CustomSQLTransactionErrorCallback::handleEvent(SQLError* error) { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get()); diff --git a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp index ee0b05e..b2972e4 100644 --- a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp @@ -48,6 +48,7 @@ V8CustomVoidCallback::~V8CustomVoidCallback() void V8CustomVoidCallback::handleEvent() { + LOCK_V8; v8::HandleScope handleScope; v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get()); |