Changeset 56907 in webkit
- Timestamp:
- Apr 1, 2010 3:19:12 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56905 r56907 1 2010-03-31 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Nate Chapin. 4 5 Misc IndexedDatabase cleanup 6 https://bugs.webkit.org/show_bug.cgi?id=36889 7 8 No functional changes. 9 10 * bindings/v8/custom/V8CustomIDBCallbacks.h: 11 (WebCore::V8CustomIDBCallbacks::onSuccess): 12 (WebCore::V8CustomIDBCallbacks::onError): 13 (WebCore::V8CustomIDBCallbacks::V8CustomIDBCallbacks): 14 Get rid of 2 largely redundant bools 15 16 * storage/IndexedDatabase.h: 17 * storage/IndexedDatabaseImpl.cpp: 18 (WebCore::IndexedDatabaseImpl::open): 19 * storage/IndexedDatabaseImpl.h: 20 * storage/IndexedDatabaseRequest.cpp: 21 (WebCore::IndexedDatabaseRequest::open): 22 * storage/IndexedDatabaseRequest.h: 23 Plumb the Frame* and style cleanups. 24 1 25 2010-03-31 Nikolas Zimmermann <nzimmermann@rim.com> 2 26 -
trunk/WebCore/bindings/v8/custom/V8CustomIDBCallbacks.h
r56834 r56907 62 62 virtual void onSuccess(PassRefPtr<ResultType> result) 63 63 { 64 if (m_onSuccess Null)64 if (m_onSuccess.IsEmpty()) 65 65 return; 66 66 v8::HandleScope handleScope; … … 81 81 virtual void onError(PassRefPtr<IDBDatabaseError> error) 82 82 { 83 if (m_onError Null)83 if (m_onError.IsEmpty()) 84 84 return; 85 85 v8::HandleScope handleScope; … … 100 100 private: 101 101 V8CustomIDBCallbacks(v8::Local<v8::Value> onSuccess, v8::Local<v8::Value> onError, Frame* frame) 102 : m_onSuccessNull(!onSuccess->IsObject()) 103 , m_onSuccess(v8::Persistent<v8::Object>::New(onSuccess->ToObject())) 104 , m_onErrorNull(!onError->IsObject()) 105 , m_onError(v8::Persistent<v8::Object>::New(onError->ToObject())) 102 : m_onSuccess(onSuccess->IsObject() ? v8::Persistent<v8::Object>::New(onSuccess->ToObject()) : v8::Persistent<v8::Object>()) 103 , m_onError(onError->IsObject() ? v8::Persistent<v8::Object>::New(onError->ToObject()) : v8::Persistent<v8::Object>()) 106 104 , m_frame(frame) 107 105 { … … 109 107 110 108 // FIXME: Should these be v8::Functions? For some reason, VoidCallback (which this copied) uses v8::Objects. 111 bool m_onSuccessNull;112 109 v8::Persistent<v8::Object> m_onSuccess; 113 bool m_onErrorNull;114 110 v8::Persistent<v8::Object> m_onError; 115 111 RefPtr<Frame> m_frame; -
trunk/WebCore/storage/IndexedDatabase.h
r56777 r56907 38 38 namespace WebCore { 39 39 40 class Frame; 40 41 class IDBDatabase; 41 42 … … 51 52 virtual ~IndexedDatabase() { } 52 53 53 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks> ) = 0;54 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks>, Frame*) = 0; 54 55 }; 55 56 -
trunk/WebCore/storage/IndexedDatabaseImpl.cpp
r56777 r56907 50 50 } 51 51 52 void IndexedDatabaseImpl::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks> )52 void IndexedDatabaseImpl::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks>, Frame* frame) 53 53 { 54 54 // FIXME: Write. -
trunk/WebCore/storage/IndexedDatabaseImpl.h
r56777 r56907 40 40 virtual ~IndexedDatabaseImpl(); 41 41 42 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBCallbacks<IDBDatabase> > );42 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBCallbacks<IDBDatabase> >, Frame*); 43 43 44 44 private: -
trunk/WebCore/storage/IndexedDatabaseRequest.cpp
r56834 r56907 49 49 void IndexedDatabaseRequest::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode& exception, PassRefPtr<IDBDatabaseCallbacks> callbacks) 50 50 { 51 m_indexedDatabase->open(name, description, modifyDatabase, exception, callbacks );51 m_indexedDatabase->open(name, description, modifyDatabase, exception, callbacks, m_frame); 52 52 } 53 53 -
trunk/WebCore/storage/IndexedDatabaseRequest.h
r56834 r56907 51 51 ~IndexedDatabaseRequest(); 52 52 53 void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks> callbacks);53 void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks>); 54 54 55 55 void disconnectFrame() { m_frame = 0; } -
trunk/WebKit/chromium/ChangeLog
r56880 r56907 1 2010-03-31 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Nate Chapin. 4 5 Misc IndexedDatabase cleanup 6 https://bugs.webkit.org/show_bug.cgi?id=36889 7 8 Plumb the Frame* so Chromium knows where the request originated from. 9 10 * public/WebIndexedDatabase.h: 11 * src/IndexedDatabaseProxy.cpp: 12 (WebCore::IndexedDatabaseProxy::open): 13 * src/IndexedDatabaseProxy.h: 14 * src/WebIndexedDatabaseImpl.cpp: 15 (WebKit::WebIndexedDatabaseImpl::open): 16 * src/WebIndexedDatabaseImpl.h: 17 1 18 2010-03-31 Alpha Lam <hclam@chromium.org> 2 19 -
trunk/WebKit/chromium/public/WebIndexedDatabase.h
r56777 r56907 35 35 namespace WebKit { 36 36 37 class WebFrame; 37 38 class WebIDBDatabase; 38 39 class WebString; … … 47 48 virtual ~WebIndexedDatabase() { } 48 49 49 virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>* callbacks) = 0;50 virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>*, WebFrame*) = 0; 50 51 }; 51 52 -
trunk/WebKit/chromium/src/IndexedDatabaseProxy.cpp
r56713 r56907 33 33 #include "IDBDatabaseError.h" 34 34 #include "IDBDatabaseProxy.h" 35 #include "WebFrameImpl.h" 35 36 #include "WebIDBDatabase.h" 36 37 #include "WebIDBDatabaseError.h" … … 57 58 } 58 59 59 void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode& ec, PassRefPtr<IDBDatabaseCallbacks> callbacks )60 void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode& ec, PassRefPtr<IDBDatabaseCallbacks> callbacks, Frame* frame) 60 61 { 62 WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); 61 63 m_webIndexedDatabase->open(name, description, modifyDatabase, ec, 62 new IDBCallbacksProxy<WebKit::WebIDBDatabase, IDBDatabase, IDBDatabaseProxy>(callbacks) );64 new IDBCallbacksProxy<WebKit::WebIDBDatabase, IDBDatabase, IDBDatabaseProxy>(callbacks), webFrame); 63 65 } 64 66 -
trunk/WebKit/chromium/src/IndexedDatabaseProxy.h
r56713 r56907 43 43 virtual ~IndexedDatabaseProxy(); 44 44 45 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks> );45 virtual void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&, PassRefPtr<IDBDatabaseCallbacks>, Frame*); 46 46 47 47 private: -
trunk/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
r56777 r56907 48 48 } 49 49 50 void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>* callbacksPtr )50 void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>* callbacksPtr, WebFrame*) 51 51 { 52 52 OwnPtr<WebIDBCallbacks<WebIDBDatabase>*> callbacks(callbacksPtr); -
trunk/WebKit/chromium/src/WebIndexedDatabaseImpl.h
r56777 r56907 38 38 virtual ~WebIndexedDatabaseImpl(); 39 39 40 virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>* callbacks);40 virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, int& exceptionCode, WebIDBCallbacks<WebIDBDatabase>*, WebFrame*); 41 41 }; 42 42
Note: See TracChangeset
for help on using the changeset viewer.