Changeset 57530 in webkit
- Timestamp:
- Apr 13, 2010 2:19:53 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57515 r57530 1 2010-04-13 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Test that the HTML5 DB callbacks run in the correct context. 6 https://bugs.webkit.org/show_bug.cgi?id=27698 7 8 * storage/statement-error-callback-isolated-world-expected.txt: Added. 9 * storage/statement-error-callback-isolated-world.html: Added. 10 * storage/statement-success-callback-isolated-world-expected.txt: Added. 11 * storage/statement-success-callback-isolated-world.html: Added. 12 * storage/transaction-callback-isolated-world-expected.txt: Added. 13 * storage/transaction-callback-isolated-world.html: Added. 14 * storage/transaction-error-callback-isolated-world-expected.txt: Added. 15 * storage/transaction-error-callback-isolated-world.html: Added. 16 1 17 2010-04-13 Csaba Osztrogonác <ossy@webkit.org> 2 18 -
trunk/WebCore/ChangeLog
r57529 r57530 1 2010-04-13 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Make all HTML5 DB callbacks run in the correct context. 6 https://bugs.webkit.org/show_bug.cgi?id=27698 7 8 Tests: storage/statement-error-callback-isolated-world.html 9 storage/statement-success-callback-isolated-world.html 10 storage/transaction-callback-isolated-world.html 11 storage/transaction-error-callback-isolated-world.html 12 13 * bindings/js/JSCustomSQLStatementCallback.cpp: 14 (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback): 15 (WebCore::JSCustomSQLStatementCallback::handleEvent): 16 * bindings/js/JSCustomSQLStatementCallback.h: 17 * bindings/js/JSCustomSQLStatementErrorCallback.cpp: 18 (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback): 19 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): 20 * bindings/js/JSCustomSQLStatementErrorCallback.h: 21 * bindings/js/JSCustomSQLTransactionCallback.cpp: 22 (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): 23 (WebCore::JSCustomSQLTransactionCallback::handleEvent): 24 * bindings/js/JSCustomSQLTransactionCallback.h: 25 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: 26 (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback): 27 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): 28 * bindings/js/JSCustomSQLTransactionErrorCallback.h: 29 * bindings/v8/custom/V8CustomSQLStatementCallback.cpp: 30 (WebCore::V8CustomSQLStatementCallback::V8CustomSQLStatementCallback): 31 (WebCore::V8CustomSQLStatementCallback::handleEvent): 32 * bindings/v8/custom/V8CustomSQLStatementCallback.h: 33 * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: 34 (WebCore::V8CustomSQLStatementErrorCallback::V8CustomSQLStatementErrorCallback): 35 (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): 36 * bindings/v8/custom/V8CustomSQLStatementErrorCallback.h: 37 * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp: 38 (WebCore::V8CustomSQLTransactionCallback::V8CustomSQLTransactionCallback): 39 (WebCore::V8CustomSQLTransactionCallback::handleEvent): 40 * bindings/v8/custom/V8CustomSQLTransactionCallback.h: 41 * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp: 42 (WebCore::V8CustomSQLTransactionErrorCallback::V8CustomSQLTransactionErrorCallback): 43 (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent): 44 * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h: 45 * storage/SQLStatement.cpp: 46 (WebCore::SQLStatement::performCallback): 47 * storage/SQLStatementCallback.h: 48 * storage/SQLStatementErrorCallback.h: 49 * storage/SQLTransaction.cpp: 50 (WebCore::SQLTransaction::deliverTransactionCallback): 51 (WebCore::SQLTransaction::deliverTransactionErrorCallback): 52 * storage/SQLTransactionCallback.h: 53 * storage/SQLTransactionErrorCallback.h: 54 (WebCore::SQLTransactionErrorCallback::~SQLTransactionErrorCallback): 55 1 56 2010-04-13 Mikhail Naganov <mnaganov@chromium.org> 2 57 -
trunk/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp
r49280 r57530 33 33 34 34 #include "Frame.h" 35 #include "ScriptController.h"36 35 #include "JSSQLResultSet.h" 37 36 #include "JSSQLTransaction.h" 37 #include "ScriptExecutionContext.h" 38 38 #include <runtime/JSLock.h> 39 39 #include <wtf/MainThread.h> 40 40 41 41 namespace WebCore { 42 42 43 43 using namespace JSC; 44 44 45 45 JSCustomSQLStatementCallback::JSCustomSQLStatementCallback(JSObject* callback, JSDOMGlobalObject* globalObject) 46 46 : m_data(new JSCallbackData(callback, globalObject)) 47 , m_isolatedWorld(globalObject->world()) 47 48 { 48 49 } 49 50 50 51 JSCustomSQLStatementCallback::~JSCustomSQLStatementCallback() 51 52 { … … 56 57 } 57 58 58 void JSCustomSQLStatementCallback::handleEvent(S QLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException)59 void JSCustomSQLStatementCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException) 59 60 { 60 61 ASSERT(m_data); 62 ASSERT(context); 61 63 62 64 RefPtr<JSCustomSQLStatementCallback> protect(this); 63 65 64 66 JSC::JSLock lock(SilenceAssertionsOnly); 65 ExecState* exec = m_data->globalObject()->globalExec(); 67 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get()); 68 if (!globalObject) 69 return; 70 71 ExecState* exec = globalObject->globalExec(); 66 72 MarkedArgumentBuffer args; 67 73 args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); -
trunk/WebCore/bindings/js/JSCustomSQLStatementCallback.h
r49280 r57530 46 46 return adoptRef(new JSCustomSQLStatementCallback(callback, globalObject)); 47 47 } 48 48 49 49 virtual ~JSCustomSQLStatementCallback(); 50 50 51 virtual void handleEvent(S QLTransaction*, SQLResultSet*, bool& raisedException);51 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLResultSet*, bool& raisedException); 52 52 53 53 private: … … 55 55 56 56 JSCallbackData* m_data; 57 RefPtr<DOMWrapperWorld> m_isolatedWorld; 57 58 }; 58 59 -
trunk/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
r56572 r57530 36 36 #include "JSSQLError.h" 37 37 #include "JSSQLTransaction.h" 38 #include "Script Controller.h"38 #include "ScriptExecutionContext.h" 39 39 #include <runtime/JSLock.h> 40 40 #include <wtf/MainThread.h> 41 41 42 42 namespace WebCore { 43 43 44 44 using namespace JSC; 45 45 46 46 JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject) 47 47 : m_data(new JSCallbackData(callback, globalObject)) 48 , m_isolatedWorld(globalObject->world()) 48 49 { 49 50 } … … 57 58 } 58 59 59 bool JSCustomSQLStatementErrorCallback::handleEvent(S QLTransaction* transaction, SQLError* error)60 bool JSCustomSQLStatementErrorCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, SQLError* error) 60 61 { 61 62 ASSERT(m_data); 62 63 ASSERT(context); 64 63 65 RefPtr<JSCustomSQLStatementErrorCallback> protect(this); 64 66 65 67 JSC::JSLock lock(SilenceAssertionsOnly); 66 ExecState* exec = m_data->globalObject()->globalExec(); 68 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get()); 69 if (!globalObject) 70 return true; // if we cannot invoke the callback, roll back the transaction 71 72 ExecState* exec = globalObject->globalExec(); 67 73 MarkedArgumentBuffer args; 68 74 args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); 69 75 args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), error)); 70 76 71 77 bool raisedException = false; 72 78 JSValue result = m_data->invokeCallback(args, &raisedException); -
trunk/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.h
r49280 r57530 32 32 #if ENABLE(DATABASE) 33 33 34 #include "JS DOMGlobalObject.h"34 #include "JSCallbackData.h" 35 35 #include "SQLStatementErrorCallback.h" 36 #include <runtime/Protect.h>37 36 #include <wtf/Forward.h> 38 37 39 38 namespace WebCore { 40 39 41 class JSCallbackData; 40 class JSCallbackData; 42 41 class SQLError; 43 42 44 43 class JSCustomSQLStatementErrorCallback : public SQLStatementErrorCallback { 45 44 public: … … 51 50 virtual ~JSCustomSQLStatementErrorCallback(); 52 51 53 virtual bool handleEvent(S QLTransaction*, SQLError*);52 virtual bool handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLError*); 54 53 55 54 private: … … 57 56 58 57 JSCallbackData* m_data; 58 RefPtr<DOMWrapperWorld> m_isolatedWorld; 59 59 }; 60 60 61 61 } 62 62 … … 64 64 65 65 #endif // JSCustomSQLStatementErrorCallback_h 66 -
trunk/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
r49280 r57530 34 34 #include "Frame.h" 35 35 #include "JSCallbackData.h" 36 #include "JSDOMGlobalObject.h"37 36 #include "JSSQLTransaction.h" 38 #include "Page.h" 39 #include "ScriptController.h" 37 #include "ScriptExecutionContext.h" 40 38 #include <runtime/JSLock.h> 41 39 #include <wtf/MainThread.h> … … 43 41 44 42 namespace WebCore { 45 43 46 44 using namespace JSC; 47 45 48 46 #ifndef NDEBUG 49 47 static WTF::RefCountedLeakCounter counter("JSCustomSQLTransactionCallback"); … … 52 50 JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback(JSObject* callback, JSDOMGlobalObject* globalObject) 53 51 : m_data(new JSCallbackData(callback, globalObject)) 52 , m_isolatedWorld(globalObject->world()) 54 53 { 55 54 #ifndef NDEBUG … … 67 66 } 68 67 69 void JSCustomSQLTransactionCallback::handleEvent(S QLTransaction* transaction, bool& raisedException)68 void JSCustomSQLTransactionCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, bool& raisedException) 70 69 { 71 70 ASSERT(m_data); 71 ASSERT(context); 72 72 73 73 RefPtr<JSCustomSQLTransactionCallback> protect(this); 74 74 75 75 JSC::JSLock lock(SilenceAssertionsOnly); 76 ExecState* exec = m_data->globalObject()->globalExec(); 76 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get()); 77 if (!globalObject) 78 return; 79 80 ExecState* exec = globalObject->globalExec(); 77 81 MarkedArgumentBuffer args; 78 82 args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); 79 83 m_data->invokeCallback(args, &raisedException); 80 84 } 81 85 82 86 } 83 87 -
trunk/WebCore/bindings/js/JSCustomSQLTransactionCallback.h
r49280 r57530 32 32 #if ENABLE(DATABASE) 33 33 34 #include "JSDOMGlobalObject.h" 34 35 #include "SQLTransactionCallback.h" 35 #include <wtf/PassRefPtr.h> 36 37 namespace JSC { 38 class JSObject; 39 } 36 #include <wtf/Forward.h> 40 37 41 38 namespace WebCore { … … 53 50 54 51 virtual ~JSCustomSQLTransactionCallback(); 55 56 virtual void handleEvent(S QLTransaction*, bool& raisedException);52 53 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, bool& raisedException); 57 54 58 55 private: … … 60 57 61 58 JSCallbackData* m_data; 59 RefPtr<DOMWrapperWorld> m_isolatedWorld; 62 60 }; 63 61 -
trunk/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
r49280 r57530 35 35 #include "JSCallbackData.h" 36 36 #include "JSSQLError.h" 37 #include "Script Controller.h"37 #include "ScriptExecutionContext.h" 38 38 #include <runtime/JSLock.h> 39 39 #include <wtf/MainThread.h> 40 40 41 41 namespace WebCore { 42 42 43 43 using namespace JSC; 44 44 45 45 JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject) 46 46 : m_data(new JSCallbackData(callback, globalObject)) 47 , m_isolatedWorld(globalObject->world()) 47 48 { 48 49 } … … 56 57 } 57 58 58 void JSCustomSQLTransactionErrorCallback::handleEvent(S QLError* error)59 void JSCustomSQLTransactionErrorCallback::handleEvent(ScriptExecutionContext* context, SQLError* error) 59 60 { 60 61 ASSERT(m_data); 62 ASSERT(context); 61 63 62 64 RefPtr<JSCustomSQLTransactionErrorCallback> protect(this); 63 65 64 66 JSC::JSLock lock(SilenceAssertionsOnly); 65 ExecState* exec = m_data->globalObject()->globalExec(); 67 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get()); 68 if (!globalObject) 69 return; 70 71 ExecState* exec = globalObject->globalExec(); 66 72 MarkedArgumentBuffer args; 67 73 args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), error)); -
trunk/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.h
r49280 r57530 32 32 #if ENABLE(DATABASE) 33 33 34 #include "JSCallbackData.h" 34 35 #include "SQLTransactionErrorCallback.h" 35 #include "JSDOMGlobalObject.h"36 #include <runtime/Protect.h>37 36 #include <wtf/Forward.h> 38 37 … … 48 47 return adoptRef(new JSCustomSQLTransactionErrorCallback(callback, globalObject)); 49 48 } 50 49 51 50 virtual ~JSCustomSQLTransactionErrorCallback(); 52 53 virtual void handleEvent(S QLError*);51 52 virtual void handleEvent(ScriptExecutionContext*, SQLError*); 54 53 55 54 private: … … 57 56 58 57 JSCallbackData* m_data; 58 RefPtr<DOMWrapperWorld> m_isolatedWorld; 59 59 }; 60 60 -
trunk/WebCore/bindings/js/JSDatabaseCallback.h
r55823 r57530 36 36 #include "DatabaseCallback.h" 37 37 #include "JSCallbackData.h" 38 #include <wtf/Forward.h> 38 39 39 40 namespace WebCore { -
trunk/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp
r54305 r57530 36 36 37 37 #include "Frame.h" 38 #include "ScriptExecutionContext.h" 38 39 #include "V8CustomVoidCallback.h" 39 40 #include "V8SQLResultSet.h" … … 45 46 : m_callback(v8::Persistent<v8::Object>::New(callback)) 46 47 , m_frame(frame) 48 , m_worldContext(UseCurrentWorld) 47 49 { 48 50 } … … 53 55 } 54 56 55 void V8CustomSQLStatementCallback::handleEvent(S QLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException)57 void V8CustomSQLStatementCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException) 56 58 { 57 59 v8::HandleScope handleScope; 58 60 59 v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());60 if ( context.IsEmpty())61 v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext); 62 if (v8Context.IsEmpty()) 61 63 return; 62 64 63 v8::Context::Scope scope( context);65 v8::Context::Scope scope(v8Context); 64 66 65 67 v8::Handle<v8::Value> argv[] = { … … 78 80 79 81 #endif 80 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.h
r43699 r57530 35 35 36 36 #include "SQLStatementCallback.h" 37 #include "WorldContextHandle.h" 37 38 #include <v8.h> 38 #include <wtf/PassRefPtr.h> 39 #include <wtf/RefPtr.h> 39 #include <wtf/Forward.h> 40 40 41 41 namespace WebCore { … … 52 52 virtual ~V8CustomSQLStatementCallback(); 53 53 54 virtual void handleEvent(S QLTransaction*, SQLResultSet*, bool& raisedException);54 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLResultSet*, bool& raisedException); 55 55 private: 56 56 V8CustomSQLStatementCallback(v8::Local<v8::Object>, Frame*); … … 58 58 v8::Persistent<v8::Object> m_callback; 59 59 RefPtr<Frame> m_frame; 60 WorldContextHandle m_worldContext; 60 61 }; 61 62 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
r56572 r57530 36 36 37 37 #include "Frame.h" 38 #include "ScriptExecutionContext.h" 38 39 #include "V8CustomVoidCallback.h" 39 40 #include "V8SQLError.h" … … 45 46 : m_callback(v8::Persistent<v8::Object>::New(callback)) 46 47 , m_frame(frame) 48 , m_worldContext(UseCurrentWorld) 47 49 { 48 50 } … … 53 55 } 54 56 55 bool V8CustomSQLStatementErrorCallback::handleEvent(S QLTransaction* transaction, SQLError* error)57 bool V8CustomSQLStatementErrorCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, SQLError* error) 56 58 { 57 59 v8::HandleScope handleScope; 58 60 59 v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());60 if ( context.IsEmpty())61 v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext); 62 if (v8Context.IsEmpty()) 61 63 return true; 62 64 63 v8::Context::Scope scope( context);65 v8::Context::Scope scope(v8Context); 64 66 65 67 v8::Handle<v8::Value> argv[] = { -
trunk/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.h
r43699 r57530 35 35 36 36 #include "SQLStatementErrorCallback.h" 37 38 #include "SQLStatementErrorCallback.h" 37 #include "WorldContextHandle.h" 39 38 #include <v8.h> 40 39 #include <wtf/PassRefPtr.h> … … 54 53 virtual ~V8CustomSQLStatementErrorCallback(); 55 54 56 virtual bool handleEvent(S QLTransaction*, SQLError*);55 virtual bool handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLError*); 57 56 private: 58 57 V8CustomSQLStatementErrorCallback(v8::Local<v8::Object>, Frame*); … … 60 59 v8::Persistent<v8::Object> m_callback; 61 60 RefPtr<Frame> m_frame; 61 WorldContextHandle m_worldContext; 62 62 }; 63 63 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp
r54305 r57530 36 36 37 37 #include "Frame.h" 38 #include "ScriptExecutionContext.h" 38 39 #include "V8CustomVoidCallback.h" 39 40 #include "V8SQLTransaction.h" … … 44 45 : m_callback(v8::Persistent<v8::Object>::New(callback)) 45 46 , m_frame(frame) 47 , m_worldContext(UseCurrentWorld) 46 48 { 47 49 } … … 53 55 54 56 55 void V8CustomSQLTransactionCallback::handleEvent(S QLTransaction* transaction, bool& raisedException)57 void V8CustomSQLTransactionCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, bool& raisedException) 56 58 { 57 59 v8::HandleScope handleScope; 58 60 59 v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());60 if ( context.IsEmpty())61 v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext); 62 if (v8Context.IsEmpty()) 61 63 return; 62 64 63 v8::Context::Scope scope( context);65 v8::Context::Scope scope(v8Context); 64 66 65 67 v8::Handle<v8::Value> argv[] = { … … 80 82 81 83 #endif 82 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.h
r43699 r57530 35 35 36 36 #include "SQLTransactionCallback.h" 37 #include "WorldContextHandle.h" 37 38 #include <v8.h> 38 #include <wtf/PassRefPtr.h> 39 #include <wtf/RefPtr.h> 39 #include <wtf/Forward.h> 40 40 41 41 namespace WebCore { … … 52 52 virtual ~V8CustomSQLTransactionCallback(); 53 53 54 virtual void handleEvent(S QLTransaction*, bool& raisedException);54 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, bool& raisedException); 55 55 private: 56 56 V8CustomSQLTransactionCallback(v8::Local<v8::Object>, Frame*); … … 58 58 v8::Persistent<v8::Object> m_callback; 59 59 RefPtr<Frame> m_frame; 60 WorldContextHandle m_worldContext; 60 61 }; 61 62 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp
r54305 r57530 36 36 37 37 #include "Frame.h" 38 #include "ScriptExecutionContext.h" 38 39 #include "V8CustomVoidCallback.h" 39 40 #include "V8SQLError.h" … … 44 45 : m_callback(v8::Persistent<v8::Object>::New(callback)) 45 46 , m_frame(frame) 47 , m_worldContext(UseCurrentWorld) 46 48 { 47 49 } … … 52 54 } 53 55 54 void V8CustomSQLTransactionErrorCallback::handleEvent(S QLError* error)56 void V8CustomSQLTransactionErrorCallback::handleEvent(ScriptExecutionContext* context, SQLError* error) 55 57 { 56 58 v8::HandleScope handleScope; 57 59 58 v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());59 if ( context.IsEmpty())60 v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext); 61 if (v8Context.IsEmpty()) 60 62 return; 61 63 62 v8::Context::Scope scope( context);64 v8::Context::Scope scope(v8Context); 63 65 64 66 v8::Handle<v8::Value> argv[] = { … … 76 78 77 79 #endif 78 -
trunk/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h
r44157 r57530 35 35 36 36 #include "SQLTransactionErrorCallback.h" 37 #include "WorldContextHandle.h" 37 38 #include <v8.h> 38 #include <wtf/PassRefPtr.h> 39 #include <wtf/RefPtr.h> 39 #include <wtf/Forward.h> 40 40 41 41 namespace WebCore { … … 52 52 virtual ~V8CustomSQLTransactionErrorCallback(); 53 53 54 virtual void handleEvent(S QLError*);54 virtual void handleEvent(ScriptExecutionContext*, SQLError*); 55 55 56 56 private: … … 59 59 v8::Persistent<v8::Object> m_callback; 60 60 RefPtr<Frame> m_frame; 61 WorldContextHandle m_worldContext; 61 62 }; 62 63 -
trunk/WebCore/bindings/v8/custom/V8DatabaseCallback.h
r55823 r57530 37 37 #include "WorldContextHandle.h" 38 38 #include <v8.h> 39 #include <wtf/PassRefPtr.h> 40 #include <wtf/RefPtr.h> 39 #include <wtf/Forward.h> 41 40 42 41 namespace WebCore { -
trunk/WebCore/storage/SQLStatement.cpp
r49160 r57530 173 173 if (m_error) { 174 174 ASSERT(m_statementErrorCallback); 175 callbackError = m_statementErrorCallback->handleEvent(transaction , m_error.get());175 callbackError = m_statementErrorCallback->handleEvent(transaction->database()->scriptExecutionContext(), transaction, m_error.get()); 176 176 } else if (m_statementCallback) 177 m_statementCallback->handleEvent(transaction , m_resultSet.get(), callbackError);177 m_statementCallback->handleEvent(transaction->database()->scriptExecutionContext(), transaction, m_resultSet.get(), callbackError); 178 178 179 179 // Now release our callbacks, to break reference cycles. -
trunk/WebCore/storage/SQLStatementCallback.h
r47808 r57530 35 35 namespace WebCore { 36 36 37 class ScriptExecutionContext; 37 38 class SQLTransaction; 38 39 class SQLResultSet; … … 41 42 public: 42 43 virtual ~SQLStatementCallback() { } 43 virtual void handleEvent(S QLTransaction*, SQLResultSet*, bool& raisedException) = 0;44 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLResultSet*, bool& raisedException) = 0; 44 45 }; 45 46 -
trunk/WebCore/storage/SQLStatementErrorCallback.h
r47808 r57530 36 36 namespace WebCore { 37 37 38 class ScriptExecutionContext; 38 39 class SQLTransaction; 39 40 class SQLError; … … 42 43 public: 43 44 virtual ~SQLStatementErrorCallback() { } 44 virtual bool handleEvent(S QLTransaction*, SQLError*) = 0;45 virtual bool handleEvent(ScriptExecutionContext*, SQLTransaction*, SQLError*) = 0; 45 46 }; 46 47 -
trunk/WebCore/storage/SQLTransaction.cpp
r55487 r57530 291 291 if (m_callback) { 292 292 m_executeSqlAllowed = true; 293 m_callback->handleEvent( this, shouldDeliverErrorCallback);293 m_callback->handleEvent(m_database->scriptExecutionContext(), this, shouldDeliverErrorCallback); 294 294 m_executeSqlAllowed = false; 295 295 } else … … 546 546 // error to have occurred in this transaction. 547 547 if (m_errorCallback) 548 m_errorCallback->handleEvent(m_ transactionError.get());548 m_errorCallback->handleEvent(m_database->scriptExecutionContext(), m_transactionError.get()); 549 549 550 550 m_nextStep = &SQLTransaction::cleanupAfterTransactionErrorCallback; -
trunk/WebCore/storage/SQLTransactionCallback.h
r47808 r57530 36 36 namespace WebCore { 37 37 38 class ScriptExecutionContext; 38 39 class SQLTransaction; 39 40 class SQLError; … … 42 43 public: 43 44 virtual ~SQLTransactionCallback() { } 44 virtual void handleEvent(S QLTransaction*, bool& raisedException) = 0;45 virtual void handleEvent(ScriptExecutionContext*, SQLTransaction*, bool& raisedException) = 0; 45 46 }; 46 47 -
trunk/WebCore/storage/SQLTransactionErrorCallback.h
r47808 r57530 36 36 namespace WebCore { 37 37 38 class SQLError; 38 class ScriptExecutionContext; 39 class SQLError; 39 40 40 41 42 43 virtual void handleEvent(SQLError*) = 0;44 41 class SQLTransactionErrorCallback : public ThreadSafeShared<SQLTransactionErrorCallback> { 42 public: 43 virtual ~SQLTransactionErrorCallback() { } 44 virtual void handleEvent(ScriptExecutionContext*, SQLError*) = 0; 45 }; 45 46 46 47 }
Note: See TracChangeset
for help on using the changeset viewer.