OSDN Git Service

Add more LOCK_V8 macros: the custom V8 bindings are used to invoke JS callbacks to...
authorAndrei Popescu <andreip@google.com>
Thu, 6 Aug 2009 14:25:07 +0000 (15:25 +0100)
committerAndrei Popescu <andreip@google.com>
Thu, 6 Aug 2009 15:18:42 +0000 (16:18 +0100)
WebCore/bindings/v8/ScriptController.cpp
WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp
WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp
WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp
WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp

index 97bb8ec..eecff45 100644 (file)
@@ -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())
index a277027..daa9b34 100644 (file)
@@ -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());
index 2f4401f..6c7aba2 100644 (file)
@@ -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());
index a175df5..c255483 100644 (file)
@@ -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());
index 6233a1d..8dcb0a8 100644 (file)
@@ -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());
index ee0b05e..b2972e4 100644 (file)
@@ -48,6 +48,7 @@ V8CustomVoidCallback::~V8CustomVoidCallback()
 
 void V8CustomVoidCallback::handleEvent()
 {
+    LOCK_V8;
     v8::HandleScope handleScope;
 
     v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame.get());