summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeishi@chromium.org <keishi@chromium.org>2014-09-01 08:21:15 +0000
committerkeishi@chromium.org <keishi@chromium.org>2014-09-01 08:21:15 +0000
commit8d9ed3fceea44a1907fdb862557a3de73509199f (patch)
treebab774040faeb759b58bec8cc15fe7fd709484f7
parent539dfd13465e1a5c636a30813aa1b6f55dbcf181 (diff)
downloadchromium_src-8d9ed3fceea44a1907fdb862557a3de73509199f.zip
chromium_src-8d9ed3fceea44a1907fdb862557a3de73509199f.tar.gz
chromium_src-8d9ed3fceea44a1907fdb862557a3de73509199f.tar.bz2
Oilpan: Prepare moving callbacks to oilpan
BUG= Review URL: https://codereview.chromium.org/470823002 git-svn-id: svn://svn.chromium.org/blink/trunk@181160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
-rw-r--r--third_party/WebKit/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp4
-rw-r--r--third_party/WebKit/Source/bindings/templates/callback_interface.h4
-rw-r--r--third_party/WebKit/Source/bindings/templates/methods.cpp2
-rw-r--r--third_party/WebKit/Source/bindings/tests/results/V8TestCallbackInterface.h4
-rw-r--r--third_party/WebKit/Source/bindings/tests/results/V8TestObject.cpp10
-rw-r--r--third_party/WebKit/Source/bindings/tests/results/V8TestTypedefs.cpp2
-rw-r--r--third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp2
-rw-r--r--third_party/WebKit/Source/core/clipboard/DataTransferItem.h2
-rw-r--r--third_party/WebKit/Source/core/css/FontFaceSet.cpp6
-rw-r--r--third_party/WebKit/Source/core/css/FontFaceSet.h6
-rw-r--r--third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h4
-rw-r--r--third_party/WebKit/Source/core/dom/Document.cpp2
-rw-r--r--third_party/WebKit/Source/core/dom/Document.h2
-rw-r--r--third_party/WebKit/Source/core/dom/RequestAnimationFrameCallback.h5
-rw-r--r--third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp4
-rw-r--r--third_party/WebKit/Source/core/dom/ScriptedAnimationController.h4
-rw-r--r--third_party/WebKit/Source/core/dom/StringCallback.cpp8
-rw-r--r--third_party/WebKit/Source/core/dom/StringCallback.h6
-rw-r--r--third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp4
-rw-r--r--third_party/WebKit/Source/core/frame/LocalDOMWindow.h4
-rw-r--r--third_party/WebKit/Source/core/html/VoidCallback.h5
-rw-r--r--third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp2
-rw-r--r--third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp2
-rw-r--r--third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp6
-rw-r--r--third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h7
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp22
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h48
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp18
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h20
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp14
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h2
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp4
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp6
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h6
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp30
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DirectoryReader.h6
-rw-r--r--third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp22
-rw-r--r--third_party/WebKit/Source/modules/filesystem/EntriesCallback.h3
-rw-r--r--third_party/WebKit/Source/modules/filesystem/Entry.cpp10
-rw-r--r--third_party/WebKit/Source/modules/filesystem/Entry.h10
-rw-r--r--third_party/WebKit/Source/modules/filesystem/EntryCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/ErrorCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileEntry.cpp4
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileEntry.h4
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileSystemCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp48
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h63
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h3
-rw-r--r--third_party/WebKit/Source/modules/filesystem/FileWriterCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp44
-rw-r--r--third_party/WebKit/Source/modules/filesystem/MetadataCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h12
-rw-r--r--third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp4
-rw-r--r--third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h4
-rw-r--r--third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp4
-rw-r--r--third_party/WebKit/Source/modules/geolocation/GeoNotifier.h8
-rw-r--r--third_party/WebKit/Source/modules/geolocation/Geolocation.cpp4
-rw-r--r--third_party/WebKit/Source/modules/geolocation/Geolocation.h4
-rw-r--r--third_party/WebKit/Source/modules/geolocation/PositionCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp9
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h8
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp2
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h2
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h3
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h6
-rw-r--r--third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaErrorCallback.h4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaSuccessCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCErrorCallback.h4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp12
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h12
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h9
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCStatsCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h7
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp4
-rw-r--r--third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h9
-rw-r--r--third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp10
-rw-r--r--third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h10
-rw-r--r--third_party/WebKit/Source/modules/notifications/Notification.cpp2
-rw-r--r--third_party/WebKit/Source/modules/notifications/Notification.h2
-rw-r--r--third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h4
-rw-r--r--third_party/WebKit/Source/modules/notifications/NotificationPermissionClient.h2
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp4
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h4
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp4
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h4
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp4
-rw-r--r--third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h15
-rw-r--r--third_party/WebKit/Source/modules/quota/StorageErrorCallback.cpp2
-rw-r--r--third_party/WebKit/Source/modules/quota/StorageErrorCallback.h10
-rw-r--r--third_party/WebKit/Source/modules/quota/StorageQuotaCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/quota/StorageQuotaClient.h2
-rw-r--r--third_party/WebKit/Source/modules/quota/StorageUsageCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/serviceworkers/Headers.cpp6
-rw-r--r--third_party/WebKit/Source/modules/serviceworkers/Headers.h6
-rw-r--r--third_party/WebKit/Source/modules/serviceworkers/HeadersForEachCallback.h4
-rw-r--r--third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp4
-rw-r--r--third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h2
-rw-r--r--third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webaudio/AudioContext.cpp2
-rw-r--r--third_party/WebKit/Source/modules/webaudio/AudioContext.h2
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp2
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h2
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/Database.cpp14
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/Database.h10
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DatabaseCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp10
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp8
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h8
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp30
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h14
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp10
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLStatement.h4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLStatementCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLStatementErrorCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp18
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h12
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp3
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionErrorCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/SQLTransactionSyncCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp4
-rw-r--r--third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h4
-rw-r--r--third_party/WebKit/Source/modules/webmidi/MIDIErrorCallback.h5
-rw-r--r--third_party/WebKit/Source/modules/webmidi/MIDISuccessCallback.h4
-rw-r--r--third_party/WebKit/Source/platform/heap/Handle.h4
-rw-r--r--third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp6
-rw-r--r--third_party/WebKit/Source/web/NotificationPermissionClientImpl.h2
-rw-r--r--third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp2
-rw-r--r--third_party/WebKit/Source/web/StorageQuotaClientImpl.h2
-rw-r--r--third_party/WebKit/Source/wtf/RawPtr.h6
144 files changed, 615 insertions, 446 deletions
diff --git a/third_party/WebKit/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp b/third_party/WebKit/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp
index c113411..89c884a 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp
@@ -91,7 +91,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
}
SQLTransaction* transaction = V8SQLTransaction::toNative(info.Holder());
- OwnPtr<SQLStatementCallback> callback;
+ OwnPtrWillBeRawPtr<SQLStatementCallback> callback = nullptr;
if (info.Length() > 2 && !isUndefinedOrNull(info[2])) {
if (!info[2]->IsFunction()) {
exceptionState.throwDOMException(TypeMismatchError, "The 'callback' (2nd) argument provided is not a function.");
@@ -101,7 +101,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
callback = V8SQLStatementCallback::create(v8::Handle<v8::Function>::Cast(info[2]), ScriptState::current(info.GetIsolate()));
}
- OwnPtr<SQLStatementErrorCallback> errorCallback;
+ OwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback = nullptr;
if (info.Length() > 3 && !isUndefinedOrNull(info[3])) {
if (!info[3]->IsFunction()) {
exceptionState.throwDOMException(TypeMismatchError, "The 'errorCallback' (3rd) argument provided is not a function.");
diff --git a/third_party/WebKit/Source/bindings/templates/callback_interface.h b/third_party/WebKit/Source/bindings/templates/callback_interface.h
index ca1a65d..bab148a 100644
--- a/third_party/WebKit/Source/bindings/templates/callback_interface.h
+++ b/third_party/WebKit/Source/bindings/templates/callback_interface.h
@@ -16,9 +16,9 @@ namespace blink {
class {{v8_class}} FINAL : public {{cpp_class}}, public ActiveDOMCallback {
public:
- static PassOwnPtr<{{v8_class}}> create(v8::Handle<v8::Function> callback, ScriptState* scriptState)
+ static PassOwnPtrWillBeRawPtr<{{v8_class}}> create(v8::Handle<v8::Function> callback, ScriptState* scriptState)
{
- return adoptPtr(new {{v8_class}}(callback, scriptState));
+ return adoptPtrWillBeNoop(new {{v8_class}}(callback, scriptState));
}
virtual ~{{v8_class}}();
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp
index 95ff55b..95abc4c 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp
@@ -89,7 +89,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
{% if argument.idl_type == 'EventListener' %}
RefPtr<{{argument.idl_type}}> {{argument.name}}
{%- else %}
-OwnPtr<{{argument.idl_type}}> {{argument.name}}
+OwnPtrWillBeRawPtr<{{argument.idl_type}}> {{argument.name}} = nullptr;
{%- endif %}{# argument.idl_type == 'EventListener' #}
{%- elif argument.is_clamp %}{# argument.is_callback_interface #}
{# NaN is treated as 0: http://www.w3.org/TR/WebIDL/#es-type-mapping #}
diff --git a/third_party/WebKit/Source/bindings/tests/results/V8TestCallbackInterface.h b/third_party/WebKit/Source/bindings/tests/results/V8TestCallbackInterface.h
index 2aeab18..e7d0a64 100644
--- a/third_party/WebKit/Source/bindings/tests/results/V8TestCallbackInterface.h
+++ b/third_party/WebKit/Source/bindings/tests/results/V8TestCallbackInterface.h
@@ -16,9 +16,9 @@ namespace blink {
class V8TestCallbackInterface FINAL : public TestCallbackInterface, public ActiveDOMCallback {
public:
- static PassOwnPtr<V8TestCallbackInterface> create(v8::Handle<v8::Function> callback, ScriptState* scriptState)
+ static PassOwnPtrWillBeRawPtr<V8TestCallbackInterface> create(v8::Handle<v8::Function> callback, ScriptState* scriptState)
{
- return adoptPtr(new V8TestCallbackInterface(callback, scriptState));
+ return adoptPtrWillBeNoop(new V8TestCallbackInterface(callback, scriptState));
}
virtual ~V8TestCallbackInterface();
diff --git a/third_party/WebKit/Source/bindings/tests/results/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/V8TestObject.cpp
index 3d145cc..99dcb8d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/V8TestObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/V8TestObject.cpp
@@ -6576,7 +6576,7 @@ static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
return;
}
TestObject* impl = V8TestObject::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr;;
{
if (info.Length() <= 0 || !info[0]->IsFunction()) {
V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
@@ -6597,7 +6597,7 @@ static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObject* impl = V8TestObject::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg = nullptr;;
{
if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
if (!info[0]->IsFunction()) {
@@ -6624,7 +6624,7 @@ static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
return;
}
TestObject* impl = V8TestObject::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr;;
{
if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
@@ -9495,7 +9495,7 @@ static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
return;
}
TestObject* impl = V8TestObject::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr;;
{
if (info.Length() <= 0 || !info[0]->IsFunction()) {
exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
@@ -9522,7 +9522,7 @@ static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate());
TestObject* impl = V8TestObject::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg = nullptr;;
{
if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
if (!info[0]->IsFunction()) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/V8TestTypedefs.cpp b/third_party/WebKit/Source/bindings/tests/results/V8TestTypedefs.cpp
index a90f4df..3887135 100644
--- a/third_party/WebKit/Source/bindings/tests/results/V8TestTypedefs.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/V8TestTypedefs.cpp
@@ -150,7 +150,7 @@ static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb
return;
}
TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
- OwnPtr<TestCallbackInterface> testCallbackInterfaceTypeArg;
+ OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceTypeArg = nullptr;;
{
if (info.Length() <= 0 || !info[0]->IsFunction()) {
V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp b/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp
index 7a096f0..e5445ec 100644
--- a/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp
@@ -69,7 +69,7 @@ String DataTransferItem::type() const
return m_item->type();
}
-void DataTransferItem::getAsString(ExecutionContext* context, PassOwnPtr<StringCallback> callback) const
+void DataTransferItem::getAsString(ExecutionContext* context, PassOwnPtrWillBeRawPtr<StringCallback> callback) const
{
if (!m_dataTransfer->canReadData())
return;
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransferItem.h b/third_party/WebKit/Source/core/clipboard/DataTransferItem.h
index b3d453e..172fd54c 100644
--- a/third_party/WebKit/Source/core/clipboard/DataTransferItem.h
+++ b/third_party/WebKit/Source/core/clipboard/DataTransferItem.h
@@ -54,7 +54,7 @@ public:
String kind() const;
String type() const;
- void getAsString(ExecutionContext*, PassOwnPtr<StringCallback>) const;
+ void getAsString(ExecutionContext*, PassOwnPtrWillBeRawPtr<StringCallback>) const;
PassRefPtrWillBeRawPtr<Blob> getAsFile() const;
DataTransfer* dataTransfer() { return m_dataTransfer.get(); }
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index 7a29678..698b5ecba 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -357,17 +357,17 @@ bool FontFaceSet::isCSSConnectedFontFace(FontFace* fontFace) const
return cssConnectedFontFaceList().contains(fontFace);
}
-void FontFaceSet::forEach(PassOwnPtr<FontFaceSetForEachCallback> callback, const ScriptValue& thisArg) const
+void FontFaceSet::forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback> callback, const ScriptValue& thisArg) const
{
forEachInternal(callback, &thisArg);
}
-void FontFaceSet::forEach(PassOwnPtr<FontFaceSetForEachCallback> callback) const
+void FontFaceSet::forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback> callback) const
{
forEachInternal(callback, 0);
}
-void FontFaceSet::forEachInternal(PassOwnPtr<FontFaceSetForEachCallback> callback, const ScriptValue* thisArg) const
+void FontFaceSet::forEachInternal(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback> callback, const ScriptValue* thisArg) const
{
if (!inActiveDocumentContext())
return;
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.h b/third_party/WebKit/Source/core/css/FontFaceSet.h
index c6202ae..46fa791 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.h
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.h
@@ -80,8 +80,8 @@ public:
void add(FontFace*, ExceptionState&);
void clear();
bool remove(FontFace*, ExceptionState&);
- void forEach(PassOwnPtr<FontFaceSetForEachCallback>, const ScriptValue& thisArg) const;
- void forEach(PassOwnPtr<FontFaceSetForEachCallback>) const;
+ void forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback>, const ScriptValue& thisArg) const;
+ void forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback>) const;
bool has(FontFace*, ExceptionState&) const;
unsigned long size() const;
@@ -136,7 +136,7 @@ private:
bool hasLoadedFonts() const { return !m_loadedFonts.isEmpty() || !m_failedFonts.isEmpty(); }
bool inActiveDocumentContext() const;
- void forEachInternal(PassOwnPtr<FontFaceSetForEachCallback>, const ScriptValue* thisArg) const;
+ void forEachInternal(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback>, const ScriptValue* thisArg) const;
void addToLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>);
void removeFromLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>);
void fireLoadingEvent();
diff --git a/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h b/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h
index f002010..fdfe263 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h
+++ b/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h
@@ -27,15 +27,17 @@
#define FontFaceSetForEachCallback_h
#include "bindings/core/v8/ScriptValue.h"
+#include "platform/heap/Handle.h"
namespace blink {
class FontFace;
class FontFaceSet;
-class FontFaceSetForEachCallback {
+class FontFaceSetForEachCallback : public NoBaseWillBeGarbageCollectedFinalized<FontFaceSetForEachCallback> {
public:
virtual ~FontFaceSetForEachCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleItem(ScriptValue thisValue, FontFace*, FontFace*, FontFaceSet*) = 0;
virtual bool handleItem(FontFace*, FontFace*, FontFaceSet*) = 0;
};
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 5106a2f..39bdbdc 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5214,7 +5214,7 @@ ScriptedAnimationController& Document::ensureScriptedAnimationController()
return *m_scriptedAnimationController;
}
-int Document::requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback> callback)
+int Document::requestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback> callback)
{
return ensureScriptedAnimationController().registerCallback(callback);
}
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index b75a1e4..e7ab585 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -937,7 +937,7 @@ public:
const DocumentTiming& timing() const { return m_documentTiming; }
- int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>);
+ int requestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback>);
void cancelAnimationFrame(int id);
void serviceScriptedAnimations(double monotonicAnimationStartTime);
diff --git a/third_party/WebKit/Source/core/dom/RequestAnimationFrameCallback.h b/third_party/WebKit/Source/core/dom/RequestAnimationFrameCallback.h
index 5241c9f..bb773ae 100644
--- a/third_party/WebKit/Source/core/dom/RequestAnimationFrameCallback.h
+++ b/third_party/WebKit/Source/core/dom/RequestAnimationFrameCallback.h
@@ -31,11 +31,14 @@
#ifndef RequestAnimationFrameCallback_h
#define RequestAnimationFrameCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
-class RequestAnimationFrameCallback {
+class RequestAnimationFrameCallback : public NoBaseWillBeGarbageCollectedFinalized<RequestAnimationFrameCallback> {
public:
virtual ~RequestAnimationFrameCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(double highResTimeMs) = 0;
int m_id;
diff --git a/third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp b/third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp
index 2784146..e8df36dd 100644
--- a/third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp
@@ -58,6 +58,8 @@ ScriptedAnimationController::~ScriptedAnimationController()
void ScriptedAnimationController::trace(Visitor* visitor)
{
#if ENABLE(OILPAN)
+ visitor->trace(m_callbacks);
+ visitor->trace(m_callbacksToInvoke);
visitor->trace(m_document);
visitor->trace(m_eventQueue);
visitor->trace(m_mediaQueryListListeners);
@@ -81,7 +83,7 @@ void ScriptedAnimationController::resume()
scheduleAnimationIfNeeded();
}
-ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCallback(PassOwnPtr<RequestAnimationFrameCallback> callback)
+ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCallback(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback> callback)
{
ScriptedAnimationController::CallbackId id = ++m_nextCallbackId;
WTF_LOG(ScriptedAnimationController, "registerCallback: id = %d", id);
diff --git a/third_party/WebKit/Source/core/dom/ScriptedAnimationController.h b/third_party/WebKit/Source/core/dom/ScriptedAnimationController.h
index 0c4e54e..383636a 100644
--- a/third_party/WebKit/Source/core/dom/ScriptedAnimationController.h
+++ b/third_party/WebKit/Source/core/dom/ScriptedAnimationController.h
@@ -53,7 +53,7 @@ public:
typedef int CallbackId;
- int registerCallback(PassOwnPtr<RequestAnimationFrameCallback>);
+ int registerCallback(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback>);
void cancelCallback(CallbackId);
void serviceScriptedAnimations(double monotonicTimeNow);
@@ -73,7 +73,7 @@ private:
void executeCallbacks(double monotonicTimeNow);
void callMediaQueryListListeners();
- typedef Vector<OwnPtr<RequestAnimationFrameCallback> > CallbackList;
+ typedef WillBeHeapVector<OwnPtrWillBeMember<RequestAnimationFrameCallback> > CallbackList;
CallbackList m_callbacks;
CallbackList m_callbacksToInvoke; // only non-empty while inside executeCallbacks
diff --git a/third_party/WebKit/Source/core/dom/StringCallback.cpp b/third_party/WebKit/Source/core/dom/StringCallback.cpp
index 66e19e6..0718182 100644
--- a/third_party/WebKit/Source/core/dom/StringCallback.cpp
+++ b/third_party/WebKit/Source/core/dom/StringCallback.cpp
@@ -41,7 +41,7 @@ namespace {
class DispatchCallbackTask FINAL : public ExecutionContextTask {
public:
- static PassOwnPtr<DispatchCallbackTask> create(PassOwnPtr<StringCallback> callback, const String& data, const String& taskName)
+ static PassOwnPtr<DispatchCallbackTask> create(PassOwnPtrWillBeRawPtr<StringCallback> callback, const String& data, const String& taskName)
{
return adoptPtr(new DispatchCallbackTask(callback, data, taskName));
}
@@ -57,21 +57,21 @@ public:
}
private:
- DispatchCallbackTask(PassOwnPtr<StringCallback> callback, const String& data, const String& taskName)
+ DispatchCallbackTask(PassOwnPtrWillBeRawPtr<StringCallback> callback, const String& data, const String& taskName)
: m_callback(callback)
, m_data(data)
, m_taskName(taskName)
{
}
- OwnPtr<StringCallback> m_callback;
+ OwnPtrWillBePersistent<StringCallback> m_callback;
const String m_data;
const String m_taskName;
};
} // namespace
-void StringCallback::scheduleCallback(PassOwnPtr<StringCallback> callback, ExecutionContext* context, const String& data, const String& instrumentationName)
+void StringCallback::scheduleCallback(PassOwnPtrWillBeRawPtr<StringCallback> callback, ExecutionContext* context, const String& data, const String& instrumentationName)
{
context->postTask(DispatchCallbackTask::create(callback, data, instrumentationName));
}
diff --git a/third_party/WebKit/Source/core/dom/StringCallback.h b/third_party/WebKit/Source/core/dom/StringCallback.h
index 764f2fe..174ef05 100644
--- a/third_party/WebKit/Source/core/dom/StringCallback.h
+++ b/third_party/WebKit/Source/core/dom/StringCallback.h
@@ -31,19 +31,21 @@
#ifndef StringCallback_h
#define StringCallback_h
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
namespace blink {
class ExecutionContext;
-class StringCallback {
+class StringCallback : public NoBaseWillBeGarbageCollectedFinalized<StringCallback> {
public:
virtual ~StringCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const String& data) = 0;
// Helper to post callback task.
- static void scheduleCallback(PassOwnPtr<StringCallback>, ExecutionContext*, const String& data, const String& instrumentationName);
+ static void scheduleCallback(PassOwnPtrWillBeRawPtr<StringCallback>, ExecutionContext*, const String& data, const String& instrumentationName);
};
} // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index ed91973..54eee0b 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1472,7 +1472,7 @@ void LocalDOMWindow::resizeTo(float width, float height) const
host->chrome().setWindowRect(adjustWindowRect(*m_frame, update));
}
-int LocalDOMWindow::requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback> callback)
+int LocalDOMWindow::requestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback> callback)
{
callback->m_useLegacyTimeBase = false;
if (Document* d = document())
@@ -1480,7 +1480,7 @@ int LocalDOMWindow::requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallba
return 0;
}
-int LocalDOMWindow::webkitRequestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback> callback)
+int LocalDOMWindow::webkitRequestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback> callback)
{
callback->m_useLegacyTimeBase = true;
if (Document* d = document())
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.h b/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
index 75f8a0e8..9eb1489 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
@@ -243,8 +243,8 @@ enum PageshowEventPersistence {
void resizeTo(float width, float height) const;
// WebKit animation extensions
- int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>);
- int webkitRequestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>);
+ int requestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback>);
+ int webkitRequestAnimationFrame(PassOwnPtrWillBeRawPtr<RequestAnimationFrameCallback>);
void cancelAnimationFrame(int id);
DOMWindowCSS& css() const;
diff --git a/third_party/WebKit/Source/core/html/VoidCallback.h b/third_party/WebKit/Source/core/html/VoidCallback.h
index 44d569d..78f5fd6 100644
--- a/third_party/WebKit/Source/core/html/VoidCallback.h
+++ b/third_party/WebKit/Source/core/html/VoidCallback.h
@@ -26,11 +26,14 @@
#ifndef VoidCallback_h
#define VoidCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
-class VoidCallback {
+class VoidCallback : public NoBaseWillBeGarbageCollectedFinalized<VoidCallback> {
public:
virtual ~VoidCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent() = 0;
};
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index f2c632a..209d293 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -453,7 +453,7 @@ void InspectorCSSAgent::enable(ErrorString*, PassRefPtr<EnableCallback> prpCallb
prpCallback->sendSuccess();
return;
}
- m_pageAgent->resourceContentLoader()->ensureResourcesContentLoaded(adoptPtr(new InspectorCSSAgent::InspectorResourceContentLoaderCallback(this, prpCallback)));
+ m_pageAgent->resourceContentLoader()->ensureResourcesContentLoaded(adoptPtrWillBeNoop(new InspectorCSSAgent::InspectorResourceContentLoaderCallback(this, prpCallback)));
}
void InspectorCSSAgent::wasEnabled()
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index a1cb233..0eea2bd 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -729,7 +729,7 @@ void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri
callback->sendFailure("Agent is not enabled.");
return;
}
- m_inspectorResourceContentLoader->ensureResourcesContentLoaded(adoptPtr(new GetResourceContentLoadListener(this, frameId, url, callback)));
+ m_inspectorResourceContentLoader->ensureResourcesContentLoaded(adoptPtrWillBeNoop(new GetResourceContentLoadListener(this, frameId, url, callback)));
}
static bool textContentForResource(Resource* cachedResource, String* result)
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
index 5631afd..316a629 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
@@ -145,7 +145,7 @@ void InspectorResourceContentLoader::start()
checkDone();
}
-void InspectorResourceContentLoader::ensureResourcesContentLoaded(PassOwnPtr<VoidCallback> callback)
+void InspectorResourceContentLoader::ensureResourcesContentLoaded(PassOwnPtrWillBeRawPtr<VoidCallback> callback)
{
if (!m_started)
start();
@@ -178,9 +178,9 @@ void InspectorResourceContentLoader::checkDone()
{
if (!hasFinished())
return;
- Vector<OwnPtr<VoidCallback> > callbacks;
+ WillBeHeapVector<OwnPtrWillBeMember<VoidCallback> > callbacks;
callbacks.swap(m_callbacks);
- for (Vector<OwnPtr<VoidCallback> >::const_iterator it = callbacks.begin(); it != callbacks.end(); ++it)
+ for (WillBeHeapVector<OwnPtrWillBeMember<VoidCallback> >::const_iterator it = callbacks.begin(); it != callbacks.end(); ++it)
(*it)->handleEvent();
}
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h
index 97ac085..d85bcdb 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h
@@ -16,12 +16,13 @@ class Page;
class Resource;
class VoidCallback;
+// FIXME: Oilpan: Move InspectorResourceContentLoader to the heap.
class InspectorResourceContentLoader FINAL {
WTF_MAKE_NONCOPYABLE(InspectorResourceContentLoader);
WTF_MAKE_FAST_ALLOCATED;
public:
- InspectorResourceContentLoader(Page*);
- void ensureResourcesContentLoaded(PassOwnPtr<VoidCallback>);
+ explicit InspectorResourceContentLoader(Page*);
+ void ensureResourcesContentLoaded(PassOwnPtrWillBeRawPtr<VoidCallback>);
~InspectorResourceContentLoader();
bool hasFinished();
void stop();
@@ -33,7 +34,7 @@ private:
void checkDone();
void start();
- Vector<OwnPtr<VoidCallback> > m_callbacks;
+ WillBePersistentHeapVector<OwnPtrWillBeMember<VoidCallback> > m_callbacks;
bool m_allRequestsStarted;
bool m_started;
Page* m_page;
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
index c27f929..9336210 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
@@ -114,7 +114,7 @@ bool DOMFileSystem::hasPendingActivity() const
return m_numberOfPendingCallbacks;
}
-void DOMFileSystem::reportError(PassOwnPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
+void DOMFileSystem::reportError(PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
{
scheduleCallback(errorCallback, fileError);
}
@@ -123,9 +123,15 @@ namespace {
class ConvertToFileWriterCallback : public FileWriterBaseCallback {
public:
- static PassOwnPtr<ConvertToFileWriterCallback> create(PassOwnPtr<FileWriterCallback> callback)
+ static PassOwnPtrWillBeRawPtr<ConvertToFileWriterCallback> create(PassOwnPtrWillBeRawPtr<FileWriterCallback> callback)
{
- return adoptPtr(new ConvertToFileWriterCallback(callback));
+ return adoptPtrWillBeNoop(new ConvertToFileWriterCallback(callback));
+ }
+
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(m_callback);
+ FileWriterBaseCallback::trace(visitor);
}
void handleEvent(FileWriterBase* fileWriterBase)
@@ -133,16 +139,16 @@ public:
m_callback->handleEvent(static_cast<FileWriter*>(fileWriterBase));
}
private:
- ConvertToFileWriterCallback(PassOwnPtr<FileWriterCallback> callback)
+ explicit ConvertToFileWriterCallback(PassOwnPtrWillBeRawPtr<FileWriterCallback> callback)
: m_callback(callback)
{
}
- OwnPtr<FileWriterCallback> m_callback;
+ OwnPtrWillBeMember<FileWriterCallback> m_callback;
};
}
-void DOMFileSystem::createWriter(const FileEntry* fileEntry, PassOwnPtr<FileWriterCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DOMFileSystem::createWriter(const FileEntry* fileEntry, PassOwnPtrWillBeRawPtr<FileWriterCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
ASSERT(fileEntry);
@@ -152,12 +158,12 @@ void DOMFileSystem::createWriter(const FileEntry* fileEntry, PassOwnPtr<FileWrit
}
FileWriter* fileWriter = FileWriter::create(executionContext());
- OwnPtr<FileWriterBaseCallback> conversionCallback = ConvertToFileWriterCallback::create(successCallback);
+ OwnPtrWillBeRawPtr<FileWriterBaseCallback> conversionCallback = ConvertToFileWriterCallback::create(successCallback);
OwnPtr<AsyncFileSystemCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, conversionCallback.release(), errorCallback, m_context);
fileSystem()->createFileWriter(createFileSystemURL(fileEntry), fileWriter, callbacks.release());
}
-void DOMFileSystem::createFile(const FileEntry* fileEntry, PassOwnPtr<FileCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DOMFileSystem::createFile(const FileEntry* fileEntry, PassOwnPtrWillBeRawPtr<FileCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
KURL fileSystemURL = createFileSystemURL(fileEntry);
if (!fileSystem()) {
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
index 995778f..344ccf0 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
@@ -59,45 +59,45 @@ public:
// DOMFileSystemBase overrides.
virtual void addPendingCallbacks() OVERRIDE;
virtual void removePendingCallbacks() OVERRIDE;
- virtual void reportError(PassOwnPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
+ virtual void reportError(PassOwnPtrWillBeRawPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
// ActiveDOMObject overrides.
virtual bool hasPendingActivity() const OVERRIDE;
- void createWriter(const FileEntry*, PassOwnPtr<FileWriterCallback>, PassOwnPtr<ErrorCallback>);
- void createFile(const FileEntry*, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>);
+ void createWriter(const FileEntry*, PassOwnPtrWillBeRawPtr<FileWriterCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>);
+ void createFile(const FileEntry*, PassOwnPtrWillBeRawPtr<FileCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>);
// Schedule a callback. This should not cross threads (should be called on the same context thread).
// FIXME: move this to a more generic place.
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, PassRefPtrWillBeRawPtr<CBArg>);
+ static void scheduleCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<CB>, PassRefPtrWillBeRawPtr<CBArg>);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, CBArg*);
+ static void scheduleCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<CB>, CBArg*);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, const HeapVector<CBArg>&);
+ static void scheduleCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<CB>, const HeapVector<CBArg>&);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, const CBArg&);
+ static void scheduleCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<CB>, const CBArg&);
template <typename CB>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>);
+ static void scheduleCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<CB>);
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> callbackArg)
+ void scheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, CBArg* callbackArg)
+ void scheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, CBArg* callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, const CBArg& callbackArg)
+ void scheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, const CBArg& callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
@@ -125,7 +125,7 @@ private:
template <typename CB, typename CBArg>
class DispatchCallbackRefPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackRefPtrArgTask(PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
+ DispatchCallbackRefPtrArgTask(PassOwnPtrWillBeRawPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
: m_callback(callback)
, m_callbackArg(arg)
{
@@ -137,14 +137,14 @@ private:
}
private:
- OwnPtr<CB> m_callback;
+ OwnPtrWillBePersistent<CB> m_callback;
RefPtrWillBePersistent<CBArg> m_callbackArg;
};
template <typename CB, typename CBArg>
class DispatchCallbackPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackPtrArgTask(PassOwnPtr<CB> callback, CBArg* arg)
+ DispatchCallbackPtrArgTask(PassOwnPtrWillBeRawPtr<CB> callback, CBArg* arg)
: m_callback(callback)
, m_callbackArg(arg)
{
@@ -156,14 +156,14 @@ private:
}
private:
- OwnPtr<CB> m_callback;
+ OwnPtrWillBePersistent<CB> m_callback;
Persistent<CBArg> m_callbackArg;
};
template <typename CB, typename CBArg>
class DispatchCallbackNonPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackNonPtrArgTask(PassOwnPtr<CB> callback, const CBArg& arg)
+ DispatchCallbackNonPtrArgTask(PassOwnPtrWillBeRawPtr<CB> callback, const CBArg& arg)
: m_callback(callback)
, m_callbackArg(arg)
{
@@ -175,14 +175,14 @@ private:
}
private:
- OwnPtr<CB> m_callback;
+ OwnPtrWillBePersistent<CB> m_callback;
CBArg m_callbackArg;
};
template <typename CB>
class DispatchCallbackNoArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackNoArgTask(PassOwnPtr<CB> callback)
+ DispatchCallbackNoArgTask(PassOwnPtrWillBeRawPtr<CB> callback)
: m_callback(callback)
{
}
@@ -193,14 +193,14 @@ private:
}
private:
- OwnPtr<CB> m_callback;
+ OwnPtrWillBePersistent<CB> m_callback;
};
int m_numberOfPendingCallbacks;
};
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
@@ -208,7 +208,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwn
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, CBArg* arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<CB> callback, CBArg* arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
@@ -216,7 +216,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwn
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, const HeapVector<CBArg>& arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<CB> callback, const HeapVector<CBArg>& arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
@@ -224,7 +224,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwn
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, const CBArg& arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<CB> callback, const CBArg& arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
@@ -232,7 +232,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwn
}
template <typename CB>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<CB> callback)
{
ASSERT(executionContext->isContextThread());
if (callback)
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
index 60659e9..f1849b98 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
@@ -188,7 +188,7 @@ bool DOMFileSystemBase::pathPrefixToFileSystemType(const String& pathPrefix, Fil
return false;
}
-void DOMFileSystemBase::getMetadata(const EntryBase* entry, PassOwnPtr<MetadataCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::getMetadata(const EntryBase* entry, PassOwnPtrWillBeRawPtr<MetadataCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -229,7 +229,7 @@ static bool verifyAndGetDestinationPathForCopyOrMove(const EntryBase* source, En
return true;
}
-void DOMFileSystemBase::move(const EntryBase* source, EntryBase* parent, const String& newName, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::move(const EntryBase* source, EntryBase* parent, const String& newName, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -248,7 +248,7 @@ void DOMFileSystemBase::move(const EntryBase* source, EntryBase* parent, const S
fileSystem()->move(createFileSystemURL(source), parent->filesystem()->createFileSystemURL(destinationPath), callbacks.release());
}
-void DOMFileSystemBase::copy(const EntryBase* source, EntryBase* parent, const String& newName, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::copy(const EntryBase* source, EntryBase* parent, const String& newName, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -267,7 +267,7 @@ void DOMFileSystemBase::copy(const EntryBase* source, EntryBase* parent, const S
fileSystem()->copy(createFileSystemURL(source), parent->filesystem()->createFileSystemURL(destinationPath), callbacks.release());
}
-void DOMFileSystemBase::remove(const EntryBase* entry, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::remove(const EntryBase* entry, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -287,7 +287,7 @@ void DOMFileSystemBase::remove(const EntryBase* entry, PassOwnPtr<VoidCallback>
fileSystem()->remove(createFileSystemURL(entry), callbacks.release());
}
-void DOMFileSystemBase::removeRecursively(const EntryBase* entry, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::removeRecursively(const EntryBase* entry, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -307,7 +307,7 @@ void DOMFileSystemBase::removeRecursively(const EntryBase* entry, PassOwnPtr<Voi
fileSystem()->removeRecursively(createFileSystemURL(entry), callbacks.release());
}
-void DOMFileSystemBase::getParent(const EntryBase* entry, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DOMFileSystemBase::getParent(const EntryBase* entry, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -320,7 +320,7 @@ void DOMFileSystemBase::getParent(const EntryBase* entry, PassOwnPtr<EntryCallba
fileSystem()->directoryExists(createFileSystemURL(path), EntryCallbacks::create(successCallback, errorCallback, m_context, this, path, true));
}
-void DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, const FileSystemFlags& flags, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, const FileSystemFlags& flags, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -342,7 +342,7 @@ void DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, cons
fileSystem()->fileExists(createFileSystemURL(absolutePath), callbacks.release());
}
-void DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path, const FileSystemFlags& flags, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+void DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path, const FileSystemFlags& flags, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
@@ -364,7 +364,7 @@ void DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path,
fileSystem()->directoryExists(createFileSystemURL(absolutePath), callbacks.release());
}
-int DOMFileSystemBase::readDirectory(DirectoryReaderBase* reader, const String& path, PassOwnPtr<EntriesCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+int DOMFileSystemBase::readDirectory(DirectoryReaderBase* reader, const String& path, PassOwnPtrWillBeRawPtr<EntriesCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
if (!fileSystem()) {
reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
index c9f1c29..abe2e55 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
@@ -79,7 +79,7 @@ public:
virtual void removePendingCallbacks() { }
// Overridden by subclasses to handle sync vs async error-handling.
- virtual void reportError(PassOwnPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) = 0;
+ virtual void reportError(PassOwnPtrWillBeRawPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) = 0;
const String& name() const { return m_name; }
FileSystemType type() const { return m_type; }
@@ -103,15 +103,15 @@ public:
static bool pathPrefixToFileSystemType(const String& pathPrefix, FileSystemType&);
// Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
- void getMetadata(const EntryBase*, PassOwnPtr<MetadataCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void move(const EntryBase* source, EntryBase* parent, const String& name, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void copy(const EntryBase* source, EntryBase* parent, const String& name, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void remove(const EntryBase*, PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void removeRecursively(const EntryBase*, PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void getParent(const EntryBase*, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>);
- void getFile(const EntryBase*, const String& path, const FileSystemFlags&, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- void getDirectory(const EntryBase*, const String& path, const FileSystemFlags&, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
- int readDirectory(DirectoryReaderBase*, const String& path, PassOwnPtr<EntriesCallback>, PassOwnPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void getMetadata(const EntryBase*, PassOwnPtrWillBeRawPtr<MetadataCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void move(const EntryBase* source, EntryBase* parent, const String& name, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void copy(const EntryBase* source, EntryBase* parent, const String& name, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void remove(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void removeRecursively(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void getParent(const EntryBase*, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>);
+ void getFile(const EntryBase*, const String& path, const FileSystemFlags&, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ void getDirectory(const EntryBase*, const String& path, const FileSystemFlags&, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
+ int readDirectory(DirectoryReaderBase*, const String& path, PassOwnPtrWillBeRawPtr<EntriesCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
bool waitForAdditionalResult(int callbacksId);
virtual void trace(Visitor*) { }
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
index 1b33bdd..157d148 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
@@ -65,7 +65,7 @@ DOMFileSystemSync::~DOMFileSystemSync()
{
}
-void DOMFileSystemSync::reportError(PassOwnPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
+void DOMFileSystemSync::reportError(PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
{
errorCallback->handleEvent(fileError.get());
}
@@ -179,9 +179,9 @@ namespace {
class ReceiveFileWriterCallback FINAL : public FileWriterBaseCallback {
public:
- static PassOwnPtr<ReceiveFileWriterCallback> create()
+ static PassOwnPtrWillBeRawPtr<ReceiveFileWriterCallback> create()
{
- return adoptPtr(new ReceiveFileWriterCallback());
+ return adoptPtrWillBeNoop(new ReceiveFileWriterCallback());
}
virtual void handleEvent(FileWriterBase*) OVERRIDE
@@ -196,9 +196,9 @@ private:
class LocalErrorCallback FINAL : public ErrorCallback {
public:
- static PassOwnPtr<LocalErrorCallback> create(FileError::ErrorCode& errorCode)
+ static PassOwnPtrWillBeRawPtr<LocalErrorCallback> create(FileError::ErrorCode& errorCode)
{
- return adoptPtr(new LocalErrorCallback(errorCode));
+ return adoptPtrWillBeNoop(new LocalErrorCallback(errorCode));
}
virtual void handleEvent(FileError* error) OVERRIDE
@@ -223,9 +223,9 @@ FileWriterSync* DOMFileSystemSync::createWriter(const FileEntrySync* fileEntry,
ASSERT(fileEntry);
FileWriterSync* fileWriter = FileWriterSync::create();
- OwnPtr<ReceiveFileWriterCallback> successCallback = ReceiveFileWriterCallback::create();
+ OwnPtrWillBeRawPtr<ReceiveFileWriterCallback> successCallback = ReceiveFileWriterCallback::create();
FileError::ErrorCode errorCode = FileError::OK;
- OwnPtr<LocalErrorCallback> errorCallback = LocalErrorCallback::create(errorCode);
+ OwnPtrWillBeRawPtr<LocalErrorCallback> errorCallback = LocalErrorCallback::create(errorCode);
OwnPtr<AsyncFileSystemCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, successCallback.release(), errorCallback.release(), m_context);
callbacks->setShouldBlockUntilCompletion(true);
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h
index 994c485..4d06781 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h
@@ -54,7 +54,7 @@ public:
virtual ~DOMFileSystemSync();
- virtual void reportError(PassOwnPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
+ virtual void reportError(PassOwnPtrWillBeRawPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
DirectoryEntrySync* root();
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
index b182dc2..f78b085 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
@@ -48,7 +48,7 @@ DOMWindowFileSystem::~DOMWindowFileSystem()
{
}
-void DOMWindowFileSystem::webkitRequestFileSystem(LocalDOMWindow& window, int type, long long size, PassOwnPtr<FileSystemCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DOMWindowFileSystem::webkitRequestFileSystem(LocalDOMWindow& window, int type, long long size, PassOwnPtrWillBeRawPtr<FileSystemCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
if (!window.isCurrentlyDisplayedInFrame())
return;
@@ -71,7 +71,7 @@ void DOMWindowFileSystem::webkitRequestFileSystem(LocalDOMWindow& window, int ty
LocalFileSystem::from(*document)->requestFileSystem(document, fileSystemType, size, FileSystemCallbacks::create(successCallback, errorCallback, document, fileSystemType));
}
-void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(LocalDOMWindow& window, const String& url, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(LocalDOMWindow& window, const String& url, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
if (!window.isCurrentlyDisplayedInFrame())
return;
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
index b8d31f0..917e4df 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
@@ -26,6 +26,7 @@
#ifndef DOMWindowFileSystem_h
#define DOMWindowFileSystem_h
+#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -37,8 +38,8 @@ class FileSystemCallback;
class DOMWindowFileSystem {
public:
- static void webkitRequestFileSystem(LocalDOMWindow&, int type, long long size, PassOwnPtr<FileSystemCallback>, PassOwnPtr<ErrorCallback>);
- static void webkitResolveLocalFileSystemURL(LocalDOMWindow&, const String&, PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>);
+ static void webkitRequestFileSystem(LocalDOMWindow&, int type, long long size, PassOwnPtrWillBeRawPtr<FileSystemCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>);
+ static void webkitResolveLocalFileSystemURL(LocalDOMWindow&, const String&, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>);
// They are placed here and in all capital letters so they can be checked against the constants in the
// IDL at compile time.
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp
index e7bca0f..b8e1adf 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp
@@ -50,19 +50,19 @@ DirectoryReader* DirectoryEntry::createReader()
return DirectoryReader::create(m_fileSystem, m_fullPath);
}
-void DirectoryEntry::getFile(const String& path, const Dictionary& options, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DirectoryEntry::getFile(const String& path, const Dictionary& options, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
FileSystemFlags flags(options);
m_fileSystem->getFile(this, path, flags, successCallback, errorCallback);
}
-void DirectoryEntry::getDirectory(const String& path, const Dictionary& options, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DirectoryEntry::getDirectory(const String& path, const Dictionary& options, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
FileSystemFlags flags(options);
m_fileSystem->getDirectory(this, path, flags, successCallback, errorCallback);
}
-void DirectoryEntry::removeRecursively(PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback) const
+void DirectoryEntry::removeRecursively(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback) const
{
m_fileSystem->removeRecursively(this, successCallback, errorCallback);
}
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
index ec0d8ec..c44a439 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
@@ -53,9 +53,9 @@ public:
virtual bool isDirectory() const OVERRIDE { return true; }
DirectoryReader* createReader();
- void getFile(const String& path, const Dictionary&, PassOwnPtr<EntryCallback> = nullptr, PassOwnPtr<ErrorCallback> = nullptr);
- void getDirectory(const String& path, const Dictionary&, PassOwnPtr<EntryCallback> = nullptr, PassOwnPtr<ErrorCallback> = nullptr);
- void removeRecursively(PassOwnPtr<VoidCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr) const;
+ void getFile(const String& path, const Dictionary&, PassOwnPtrWillBeRawPtr<EntryCallback> = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
+ void getDirectory(const String& path, const Dictionary&, PassOwnPtrWillBeRawPtr<EntryCallback> = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
+ void removeRecursively(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr) const;
virtual void trace(Visitor*) OVERRIDE;
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp
index 25e73b9..5b702e4 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp
@@ -38,7 +38,7 @@
namespace blink {
-class DirectoryReader::EntriesCallbackHelper : public EntriesCallback {
+class DirectoryReader::EntriesCallbackHelper FINAL : public EntriesCallback {
public:
explicit EntriesCallbackHelper(DirectoryReader* reader)
: m_reader(reader)
@@ -50,12 +50,18 @@ public:
m_reader->addEntries(entries);
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_reader);
+ EntriesCallback::trace(visitor);
+ }
+
private:
// FIXME: This Persistent keeps the reader alive until all of the readDirectory results are received. crbug.com/350285
- Persistent<DirectoryReader> m_reader;
+ PersistentWillBeMember<DirectoryReader> m_reader;
};
-class DirectoryReader::ErrorCallbackHelper : public ErrorCallback {
+class DirectoryReader::ErrorCallbackHelper FINAL : public ErrorCallback {
public:
explicit ErrorCallbackHelper(DirectoryReader* reader)
: m_reader(reader)
@@ -67,8 +73,14 @@ public:
m_reader->onError(error);
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_reader);
+ ErrorCallback::trace(visitor);
+ }
+
private:
- Persistent<DirectoryReader> m_reader;
+ PersistentWillBeMember<DirectoryReader> m_reader;
};
DirectoryReader::DirectoryReader(DOMFileSystemBase* fileSystem, const String& fullPath)
@@ -82,11 +94,11 @@ DirectoryReader::~DirectoryReader()
{
}
-void DirectoryReader::readEntries(PassOwnPtr<EntriesCallback> entriesCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void DirectoryReader::readEntries(PassOwnPtrWillBeRawPtr<EntriesCallback> entriesCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
if (!m_isReading) {
m_isReading = true;
- filesystem()->readDirectory(this, m_fullPath, adoptPtr(new EntriesCallbackHelper(this)), adoptPtr(new ErrorCallbackHelper(this)));
+ filesystem()->readDirectory(this, m_fullPath, adoptPtrWillBeNoop(new EntriesCallbackHelper(this)), adoptPtrWillBeNoop(new ErrorCallbackHelper(this)));
}
if (m_error) {
@@ -115,7 +127,7 @@ void DirectoryReader::addEntries(const EntryHeapVector& entries)
m_entries.appendVector(entries);
m_errorCallback = nullptr;
if (m_entriesCallback) {
- OwnPtr<EntriesCallback> entriesCallback = m_entriesCallback.release();
+ OwnPtrWillBeRawPtr<EntriesCallback> entriesCallback = m_entriesCallback.release();
EntryHeapVector entries;
entries.swap(m_entries);
entriesCallback->handleEvent(entries);
@@ -127,7 +139,7 @@ void DirectoryReader::onError(FileError* error)
m_error = error;
m_entriesCallback = nullptr;
if (m_errorCallback) {
- OwnPtr<ErrorCallback> errorCallback = m_errorCallback.release();
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = m_errorCallback.release();
errorCallback->handleEvent(error);
}
}
@@ -136,6 +148,8 @@ void DirectoryReader::trace(Visitor* visitor)
{
visitor->trace(m_entries);
visitor->trace(m_error);
+ visitor->trace(m_entriesCallback);
+ visitor->trace(m_errorCallback);
DirectoryReaderBase::trace(visitor);
}
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
index 05d264c..44423ef 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
@@ -51,7 +51,7 @@ public:
virtual ~DirectoryReader();
- void readEntries(PassOwnPtr<EntriesCallback>, PassOwnPtr<ErrorCallback> = nullptr);
+ void readEntries(PassOwnPtrWillBeRawPtr<EntriesCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
DOMFileSystem* filesystem() const { return static_cast<DOMFileSystem*>(m_fileSystem.get()); }
@@ -70,8 +70,8 @@ private:
bool m_isReading;
EntryHeapVector m_entries;
RefPtrWillBeMember<FileError> m_error;
- OwnPtr<EntriesCallback> m_entriesCallback;
- OwnPtr<ErrorCallback> m_errorCallback;
+ OwnPtrWillBeMember<EntriesCallback> m_entriesCallback;
+ OwnPtrWillBeMember<ErrorCallback> m_errorCallback;
};
}
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
index 2e2097a..9af6ea5 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
@@ -42,7 +42,7 @@
namespace blink {
-class DirectoryReaderSync::EntriesCallbackHelper : public EntriesCallback {
+class DirectoryReaderSync::EntriesCallbackHelper FINAL : public EntriesCallback {
public:
explicit EntriesCallbackHelper(DirectoryReaderSync* reader)
: m_reader(reader)
@@ -58,11 +58,17 @@ public:
m_reader->addEntries(syncEntries);
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_reader);
+ EntriesCallback::trace(visitor);
+ }
+
private:
- Persistent<DirectoryReaderSync> m_reader;
+ PersistentWillBeMember<DirectoryReaderSync> m_reader;
};
-class DirectoryReaderSync::ErrorCallbackHelper : public ErrorCallback {
+class DirectoryReaderSync::ErrorCallbackHelper FINAL : public ErrorCallback {
public:
explicit ErrorCallbackHelper(DirectoryReaderSync* reader)
: m_reader(reader)
@@ -74,8 +80,14 @@ public:
m_reader->setError(error->code());
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_reader);
+ ErrorCallback::trace(visitor);
+ }
+
private:
- Persistent<DirectoryReaderSync> m_reader;
+ PersistentWillBeMember<DirectoryReaderSync> m_reader;
};
DirectoryReaderSync::DirectoryReaderSync(DOMFileSystemBase* fileSystem, const String& fullPath)
@@ -93,7 +105,7 @@ DirectoryReaderSync::~DirectoryReaderSync()
EntrySyncHeapVector DirectoryReaderSync::readEntries(ExceptionState& exceptionState)
{
if (!m_callbacksId) {
- m_callbacksId = filesystem()->readDirectory(this, m_fullPath, adoptPtr(new EntriesCallbackHelper(this)), adoptPtr(new ErrorCallbackHelper(this)), DOMFileSystemBase::Synchronous);
+ m_callbacksId = filesystem()->readDirectory(this, m_fullPath, adoptPtrWillBeNoop(new EntriesCallbackHelper(this)), adoptPtrWillBeNoop(new ErrorCallbackHelper(this)), DOMFileSystemBase::Synchronous);
}
if (m_errorCode == FileError::OK && m_hasMoreEntries && m_entries.isEmpty())
diff --git a/third_party/WebKit/Source/modules/filesystem/EntriesCallback.h b/third_party/WebKit/Source/modules/filesystem/EntriesCallback.h
index 37d0750..8b8f281 100644
--- a/third_party/WebKit/Source/modules/filesystem/EntriesCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/EntriesCallback.h
@@ -38,9 +38,10 @@ namespace blink {
class Entry;
typedef HeapVector<Member<Entry> > EntryHeapVector;
-class EntriesCallback {
+class EntriesCallback : public NoBaseWillBeGarbageCollectedFinalized<EntriesCallback> {
public:
virtual ~EntriesCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const EntryHeapVector&) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/Entry.cpp b/third_party/WebKit/Source/modules/filesystem/Entry.cpp
index 98bc3ae..93afb24 100644
--- a/third_party/WebKit/Source/modules/filesystem/Entry.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/Entry.cpp
@@ -49,27 +49,27 @@ Entry::Entry(DOMFileSystemBase* fileSystem, const String& fullPath)
ScriptWrappable::init(this);
}
-void Entry::getMetadata(PassOwnPtr<MetadataCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void Entry::getMetadata(PassOwnPtrWillBeRawPtr<MetadataCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
m_fileSystem->getMetadata(this, successCallback, errorCallback);
}
-void Entry::moveTo(DirectoryEntry* parent, const String& name, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback) const
+void Entry::moveTo(DirectoryEntry* parent, const String& name, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback) const
{
m_fileSystem->move(this, parent, name, successCallback, errorCallback);
}
-void Entry::copyTo(DirectoryEntry* parent, const String& name, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback) const
+void Entry::copyTo(DirectoryEntry* parent, const String& name, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback) const
{
m_fileSystem->copy(this, parent, name, successCallback, errorCallback);
}
-void Entry::remove(PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback) const
+void Entry::remove(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback) const
{
m_fileSystem->remove(this, successCallback, errorCallback);
}
-void Entry::getParent(PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback) const
+void Entry::getParent(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback) const
{
m_fileSystem->getParent(this, successCallback, errorCallback);
}
diff --git a/third_party/WebKit/Source/modules/filesystem/Entry.h b/third_party/WebKit/Source/modules/filesystem/Entry.h
index 4fa5473..645aecb 100644
--- a/third_party/WebKit/Source/modules/filesystem/Entry.h
+++ b/third_party/WebKit/Source/modules/filesystem/Entry.h
@@ -49,11 +49,11 @@ class Entry : public EntryBase, public ScriptWrappable {
public:
DOMFileSystem* filesystem() const { return static_cast<DOMFileSystem*>(m_fileSystem.get()); }
- void getMetadata(PassOwnPtr<MetadataCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr);
- void moveTo(DirectoryEntry* parent, const String& name = String(), PassOwnPtr<EntryCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr) const;
- void copyTo(DirectoryEntry* parent, const String& name = String(), PassOwnPtr<EntryCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr) const;
- void remove(PassOwnPtr<VoidCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr) const;
- void getParent(PassOwnPtr<EntryCallback> successCallback = nullptr, PassOwnPtr<ErrorCallback> = nullptr) const;
+ void getMetadata(PassOwnPtrWillBeRawPtr<MetadataCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
+ void moveTo(DirectoryEntry* parent, const String& name = String(), PassOwnPtrWillBeRawPtr<EntryCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr) const;
+ void copyTo(DirectoryEntry* parent, const String& name = String(), PassOwnPtrWillBeRawPtr<EntryCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr) const;
+ void remove(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr) const;
+ void getParent(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback = nullptr, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr) const;
virtual void trace(Visitor*) OVERRIDE;
diff --git a/third_party/WebKit/Source/modules/filesystem/EntryCallback.h b/third_party/WebKit/Source/modules/filesystem/EntryCallback.h
index 2bbfdb1..c82512c 100644
--- a/third_party/WebKit/Source/modules/filesystem/EntryCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/EntryCallback.h
@@ -31,13 +31,16 @@
#ifndef EntryCallback_h
#define EntryCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class Entry;
-class EntryCallback {
+class EntryCallback : public NoBaseWillBeGarbageCollectedFinalized<EntryCallback> {
public:
virtual ~EntryCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(Entry*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/ErrorCallback.h b/third_party/WebKit/Source/modules/filesystem/ErrorCallback.h
index 8ccd905..4c6eac2 100644
--- a/third_party/WebKit/Source/modules/filesystem/ErrorCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/ErrorCallback.h
@@ -31,13 +31,16 @@
#ifndef ErrorCallback_h
#define ErrorCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class FileError;
-class ErrorCallback {
+class ErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<ErrorCallback> {
public:
virtual ~ErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(FileError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/FileCallback.h b/third_party/WebKit/Source/modules/filesystem/FileCallback.h
index 44ffc6b..ec1056a 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileCallback.h
@@ -31,13 +31,16 @@
#ifndef FileCallback_h
#define FileCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class File;
-class FileCallback {
+class FileCallback : public NoBaseWillBeGarbageCollectedFinalized<FileCallback> {
public:
virtual ~FileCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(File*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/FileEntry.cpp b/third_party/WebKit/Source/modules/filesystem/FileEntry.cpp
index 7bfddca..2aa5e81 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileEntry.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileEntry.cpp
@@ -45,12 +45,12 @@ FileEntry::FileEntry(DOMFileSystemBase* fileSystem, const String& fullPath)
ScriptWrappable::init(this);
}
-void FileEntry::createWriter(PassOwnPtr<FileWriterCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void FileEntry::createWriter(PassOwnPtrWillBeRawPtr<FileWriterCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
filesystem()->createWriter(this, successCallback, errorCallback);
}
-void FileEntry::file(PassOwnPtr<FileCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void FileEntry::file(PassOwnPtrWillBeRawPtr<FileCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
filesystem()->createFile(this, successCallback, errorCallback);
}
diff --git a/third_party/WebKit/Source/modules/filesystem/FileEntry.h b/third_party/WebKit/Source/modules/filesystem/FileEntry.h
index 1701e5f..85c8cd2 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileEntry.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileEntry.h
@@ -47,8 +47,8 @@ public:
return new FileEntry(fileSystem, fullPath);
}
- void createWriter(PassOwnPtr<FileWriterCallback>, PassOwnPtr<ErrorCallback> = nullptr);
- void file(PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback> = nullptr);
+ void createWriter(PassOwnPtrWillBeRawPtr<FileWriterCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
+ void file(PassOwnPtrWillBeRawPtr<FileCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback> = nullptr);
virtual bool isFile() const OVERRIDE { return true; }
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallback.h b/third_party/WebKit/Source/modules/filesystem/FileSystemCallback.h
index fa1f288..8cdb666 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallback.h
@@ -31,13 +31,16 @@
#ifndef FileSystemCallback_h
#define FileSystemCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class DOMFileSystem;
-class FileSystemCallback {
+class FileSystemCallback : public NoBaseWillBeGarbageCollectedFinalized<FileSystemCallback> {
public:
virtual ~FileSystemCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(DOMFileSystem*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
index 19d35e0..f052897 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
@@ -56,7 +56,7 @@
namespace blink {
-FileSystemCallbacksBase::FileSystemCallbacksBase(PassOwnPtr<ErrorCallback> errorCallback, DOMFileSystemBase* fileSystem, ExecutionContext* context)
+FileSystemCallbacksBase::FileSystemCallbacksBase(PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, DOMFileSystemBase* fileSystem, ExecutionContext* context)
: m_errorCallback(errorCallback)
, m_fileSystem(fileSystem)
, m_executionContext(context)
@@ -87,8 +87,16 @@ bool FileSystemCallbacksBase::shouldScheduleCallback() const
return !shouldBlockUntilCompletion() && m_executionContext && m_executionContext->activeDOMObjectsAreSuspended();
}
+#if !ENABLE(OILPAN)
template <typename CB, typename CBArg>
-void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callback, CBArg* arg)
+void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, RawPtr<CBArg> arg)
+{
+ handleEventOrScheduleCallback(callback, arg.get());
+}
+#endif
+
+template <typename CB, typename CBArg>
+void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, CBArg* arg)
{
ASSERT(callback.get());
InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_executionContext.get(), m_asyncOperationId);
@@ -101,7 +109,7 @@ void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callb
}
template <typename CB, typename CBArg>
-void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
+void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
{
ASSERT(callback.get());
InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_executionContext.get(), m_asyncOperationId);
@@ -114,7 +122,7 @@ void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callb
}
template <typename CB>
-void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callback)
+void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB> callback)
{
ASSERT(callback.get());
InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_executionContext.get(), m_asyncOperationId);
@@ -128,12 +136,12 @@ void FileSystemCallbacksBase::handleEventOrScheduleCallback(PassOwnPtr<CB> callb
// EntryCallbacks -------------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> EntryCallbacks::create(PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem, const String& expectedPath, bool isDirectory)
+PassOwnPtr<AsyncFileSystemCallbacks> EntryCallbacks::create(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem, const String& expectedPath, bool isDirectory)
{
return adoptPtr(new EntryCallbacks(successCallback, errorCallback, context, fileSystem, expectedPath, isDirectory));
}
-EntryCallbacks::EntryCallbacks(PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem, const String& expectedPath, bool isDirectory)
+EntryCallbacks::EntryCallbacks(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem, const String& expectedPath, bool isDirectory)
: FileSystemCallbacksBase(errorCallback, fileSystem, context)
, m_successCallback(successCallback)
, m_expectedPath(expectedPath)
@@ -153,12 +161,12 @@ void EntryCallbacks::didSucceed()
// EntriesCallbacks -----------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> EntriesCallbacks::create(PassOwnPtr<EntriesCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DirectoryReaderBase* directoryReader, const String& basePath)
+PassOwnPtr<AsyncFileSystemCallbacks> EntriesCallbacks::create(PassOwnPtrWillBeRawPtr<EntriesCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DirectoryReaderBase* directoryReader, const String& basePath)
{
return adoptPtr(new EntriesCallbacks(successCallback, errorCallback, context, directoryReader, basePath));
}
-EntriesCallbacks::EntriesCallbacks(PassOwnPtr<EntriesCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DirectoryReaderBase* directoryReader, const String& basePath)
+EntriesCallbacks::EntriesCallbacks(PassOwnPtrWillBeRawPtr<EntriesCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DirectoryReaderBase* directoryReader, const String& basePath)
: FileSystemCallbacksBase(errorCallback, directoryReader->filesystem(), context)
, m_successCallback(successCallback)
, m_directoryReader(directoryReader)
@@ -191,12 +199,12 @@ void EntriesCallbacks::didReadDirectoryEntries(bool hasMore)
// FileSystemCallbacks --------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> FileSystemCallbacks::create(PassOwnPtr<FileSystemCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, FileSystemType type)
+PassOwnPtr<AsyncFileSystemCallbacks> FileSystemCallbacks::create(PassOwnPtrWillBeRawPtr<FileSystemCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, FileSystemType type)
{
return adoptPtr(new FileSystemCallbacks(successCallback, errorCallback, context, type));
}
-FileSystemCallbacks::FileSystemCallbacks(PassOwnPtr<FileSystemCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, FileSystemType type)
+FileSystemCallbacks::FileSystemCallbacks(PassOwnPtrWillBeRawPtr<FileSystemCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, FileSystemType type)
: FileSystemCallbacksBase(errorCallback, nullptr, context)
, m_successCallback(successCallback)
, m_type(type)
@@ -211,12 +219,12 @@ void FileSystemCallbacks::didOpenFileSystem(const String& name, const KURL& root
// ResolveURICallbacks --------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> ResolveURICallbacks::create(PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+PassOwnPtr<AsyncFileSystemCallbacks> ResolveURICallbacks::create(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
{
return adoptPtr(new ResolveURICallbacks(successCallback, errorCallback, context));
}
-ResolveURICallbacks::ResolveURICallbacks(PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+ResolveURICallbacks::ResolveURICallbacks(PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
: FileSystemCallbacksBase(errorCallback, nullptr, context)
, m_successCallback(successCallback)
{
@@ -241,12 +249,12 @@ void ResolveURICallbacks::didResolveURL(const String& name, const KURL& rootURL,
// MetadataCallbacks ----------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> MetadataCallbacks::create(PassOwnPtr<MetadataCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
+PassOwnPtr<AsyncFileSystemCallbacks> MetadataCallbacks::create(PassOwnPtrWillBeRawPtr<MetadataCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
{
return adoptPtr(new MetadataCallbacks(successCallback, errorCallback, context, fileSystem));
}
-MetadataCallbacks::MetadataCallbacks(PassOwnPtr<MetadataCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
+MetadataCallbacks::MetadataCallbacks(PassOwnPtrWillBeRawPtr<MetadataCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
: FileSystemCallbacksBase(errorCallback, fileSystem, context)
, m_successCallback(successCallback)
{
@@ -260,12 +268,12 @@ void MetadataCallbacks::didReadMetadata(const FileMetadata& metadata)
// FileWriterBaseCallbacks ----------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> FileWriterBaseCallbacks::create(PassRefPtrWillBeRawPtr<FileWriterBase> fileWriter, PassOwnPtr<FileWriterBaseCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+PassOwnPtr<AsyncFileSystemCallbacks> FileWriterBaseCallbacks::create(PassRefPtrWillBeRawPtr<FileWriterBase> fileWriter, PassOwnPtrWillBeRawPtr<FileWriterBaseCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
{
return adoptPtr(new FileWriterBaseCallbacks(fileWriter, successCallback, errorCallback, context));
}
-FileWriterBaseCallbacks::FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase> fileWriter, PassOwnPtr<FileWriterBaseCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+FileWriterBaseCallbacks::FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase> fileWriter, PassOwnPtrWillBeRawPtr<FileWriterBaseCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
: FileSystemCallbacksBase(errorCallback, nullptr, context)
, m_fileWriter(fileWriter.get())
, m_successCallback(successCallback)
@@ -281,12 +289,12 @@ void FileWriterBaseCallbacks::didCreateFileWriter(PassOwnPtr<WebFileWriter> file
// SnapshotFileCallback -------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> SnapshotFileCallback::create(DOMFileSystemBase* filesystem, const String& name, const KURL& url, PassOwnPtr<FileCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+PassOwnPtr<AsyncFileSystemCallbacks> SnapshotFileCallback::create(DOMFileSystemBase* filesystem, const String& name, const KURL& url, PassOwnPtrWillBeRawPtr<FileCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
{
return adoptPtr(new SnapshotFileCallback(filesystem, name, url, successCallback, errorCallback, context));
}
-SnapshotFileCallback::SnapshotFileCallback(DOMFileSystemBase* filesystem, const String& name, const KURL& url, PassOwnPtr<FileCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context)
+SnapshotFileCallback::SnapshotFileCallback(DOMFileSystemBase* filesystem, const String& name, const KURL& url, PassOwnPtrWillBeRawPtr<FileCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context)
: FileSystemCallbacksBase(errorCallback, filesystem, context)
, m_name(name)
, m_url(url)
@@ -321,12 +329,12 @@ void SnapshotFileCallback::didCreateSnapshotFile(const FileMetadata& metadata, P
// VoidCallbacks --------------------------------------------------------------
-PassOwnPtr<AsyncFileSystemCallbacks> VoidCallbacks::create(PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
+PassOwnPtr<AsyncFileSystemCallbacks> VoidCallbacks::create(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
{
return adoptPtr(new VoidCallbacks(successCallback, errorCallback, context, fileSystem));
}
-VoidCallbacks::VoidCallbacks(PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
+VoidCallbacks::VoidCallbacks(PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback, ExecutionContext* context, DOMFileSystemBase* fileSystem)
: FileSystemCallbacksBase(errorCallback, fileSystem, context)
, m_successCallback(successCallback)
{
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
index 8d9c118..b76c614 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
@@ -63,20 +63,25 @@ public:
// Other callback methods are implemented by each subclass.
protected:
- FileSystemCallbacksBase(PassOwnPtr<ErrorCallback>, DOMFileSystemBase*, ExecutionContext*);
+ FileSystemCallbacksBase(PassOwnPtrWillBeRawPtr<ErrorCallback>, DOMFileSystemBase*, ExecutionContext*);
bool shouldScheduleCallback() const;
+#if !ENABLE(OILPAN)
template <typename CB, typename CBArg>
- void handleEventOrScheduleCallback(PassOwnPtr<CB>, CBArg*);
+ void handleEventOrScheduleCallback(PassOwnPtr<CB>, RawPtr<CBArg>);
+#endif
template <typename CB, typename CBArg>
- void handleEventOrScheduleCallback(PassOwnPtr<CB>, PassRefPtrWillBeRawPtr<CBArg>);
+ void handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB>, CBArg*);
+
+ template <typename CB, typename CBArg>
+ void handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB>, PassRefPtrWillBeRawPtr<CBArg>);
template <typename CB>
- void handleEventOrScheduleCallback(PassOwnPtr<CB>);
+ void handleEventOrScheduleCallback(PassOwnPtrWillBeRawPtr<CB>);
- OwnPtr<ErrorCallback> m_errorCallback;
+ OwnPtrWillBePersistent<ErrorCallback> m_errorCallback;
Persistent<DOMFileSystemBase> m_fileSystem;
RefPtrWillBePersistent<ExecutionContext> m_executionContext;
int m_asyncOperationId;
@@ -86,25 +91,25 @@ protected:
class EntryCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*, const String& expectedPath, bool isDirectory);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*, const String& expectedPath, bool isDirectory);
virtual void didSucceed() OVERRIDE;
private:
- EntryCallbacks(PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*, const String& expectedPath, bool isDirectory);
- OwnPtr<EntryCallback> m_successCallback;
+ EntryCallbacks(PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*, const String& expectedPath, bool isDirectory);
+ OwnPtrWillBePersistent<EntryCallback> m_successCallback;
String m_expectedPath;
bool m_isDirectory;
};
class EntriesCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<EntriesCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DirectoryReaderBase*, const String& basePath);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<EntriesCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DirectoryReaderBase*, const String& basePath);
virtual void didReadDirectoryEntry(const String& name, bool isDirectory) OVERRIDE;
virtual void didReadDirectoryEntries(bool hasMore) OVERRIDE;
private:
- EntriesCallbacks(PassOwnPtr<EntriesCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DirectoryReaderBase*, const String& basePath);
- OwnPtr<EntriesCallback> m_successCallback;
+ EntriesCallbacks(PassOwnPtrWillBeRawPtr<EntriesCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DirectoryReaderBase*, const String& basePath);
+ OwnPtrWillBePersistent<EntriesCallback> m_successCallback;
Persistent<DirectoryReaderBase> m_directoryReader;
String m_basePath;
PersistentHeapVector<Member<Entry> > m_entries;
@@ -112,66 +117,66 @@ private:
class FileSystemCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<FileSystemCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, FileSystemType);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<FileSystemCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, FileSystemType);
virtual void didOpenFileSystem(const String& name, const KURL& rootURL) OVERRIDE;
private:
- FileSystemCallbacks(PassOwnPtr<FileSystemCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, FileSystemType);
- OwnPtr<FileSystemCallback> m_successCallback;
+ FileSystemCallbacks(PassOwnPtrWillBeRawPtr<FileSystemCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, FileSystemType);
+ OwnPtrWillBePersistent<FileSystemCallback> m_successCallback;
FileSystemType m_type;
};
class ResolveURICallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
virtual void didResolveURL(const String& name, const KURL& rootURL, FileSystemType, const String& filePath, bool isDirectry) OVERRIDE;
private:
- ResolveURICallbacks(PassOwnPtr<EntryCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
- OwnPtr<EntryCallback> m_successCallback;
+ ResolveURICallbacks(PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
+ OwnPtrWillBePersistent<EntryCallback> m_successCallback;
};
class MetadataCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<MetadataCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<MetadataCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
virtual void didReadMetadata(const FileMetadata&) OVERRIDE;
private:
- MetadataCallbacks(PassOwnPtr<MetadataCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
- OwnPtr<MetadataCallback> m_successCallback;
+ MetadataCallbacks(PassOwnPtrWillBeRawPtr<MetadataCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
+ OwnPtrWillBePersistent<MetadataCallback> m_successCallback;
};
class FileWriterBaseCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtrWillBeRawPtr<FileWriterBaseCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) OVERRIDE;
private:
- FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
+ FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtrWillBeRawPtr<FileWriterBaseCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
Persistent<FileWriterBase> m_fileWriter;
- OwnPtr<FileWriterBaseCallback> m_successCallback;
+ OwnPtrWillBePersistent<FileWriterBaseCallback> m_successCallback;
};
class SnapshotFileCallback FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const String& name, const KURL&, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const String& name, const KURL&, PassOwnPtrWillBeRawPtr<FileCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataHandle> snapshot);
private:
- SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
+ SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, PassOwnPtrWillBeRawPtr<FileCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*);
String m_name;
KURL m_url;
- OwnPtr<FileCallback> m_successCallback;
+ OwnPtrWillBePersistent<FileCallback> m_successCallback;
};
class VoidCallbacks FINAL : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
virtual void didSucceed() OVERRIDE;
private:
- VoidCallbacks(PassOwnPtr<VoidCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
- OwnPtr<VoidCallback> m_successCallback;
+ VoidCallbacks(PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, ExecutionContext*, DOMFileSystemBase*);
+ OwnPtrWillBePersistent<VoidCallback> m_successCallback;
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h b/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h
index 043d560..7e98cc7 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileWriterBaseCallback.h
@@ -35,9 +35,10 @@ namespace blink {
class FileWriterBase;
-class FileWriterBaseCallback {
+class FileWriterBaseCallback : public NoBaseWillBeGarbageCollectedFinalized<FileWriterBaseCallback> {
public:
virtual ~FileWriterBaseCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(FileWriterBase*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterCallback.h b/third_party/WebKit/Source/modules/filesystem/FileWriterCallback.h
index 359476c..dcd5ce2 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriterCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileWriterCallback.h
@@ -31,13 +31,16 @@
#ifndef FileWriterCallback_h
#define FileWriterCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class FileWriter;
-class FileWriterCallback {
+class FileWriterCallback : public NoBaseWillBeGarbageCollectedFinalized<FileWriterCallback> {
public:
virtual ~FileWriterCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(FileWriter*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp b/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp
index aaeffbc..75ee13d 100644
--- a/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp
@@ -85,9 +85,9 @@ class CallbackDispatcher FINAL : public BaseCallback {
public:
typedef bool (Handler::*HandlingMethod)(Argument);
- static PassOwnPtr<CallbackDispatcher> create(PassRefPtr<Handler> handler, HandlingMethod handlingMethod)
+ static PassOwnPtrWillBeRawPtr<CallbackDispatcher> create(PassRefPtr<Handler> handler, HandlingMethod handlingMethod)
{
- return adoptPtr(new CallbackDispatcher(handler, handlingMethod));
+ return adoptPtrWillBeNoop(new CallbackDispatcher(handler, handlingMethod));
}
virtual void handleEvent(Argument argument) OVERRIDE
@@ -108,7 +108,7 @@ template<typename BaseCallback>
class CallbackDispatcherFactory {
public:
template<typename Handler, typename Argument>
- static PassOwnPtr<CallbackDispatcher<BaseCallback, Handler, Argument> > create(Handler* handler, bool (Handler::*handlingMethod)(Argument))
+ static PassOwnPtrWillBeRawPtr<CallbackDispatcher<BaseCallback, Handler, Argument> > create(Handler* handler, bool (Handler::*handlingMethod)(Argument))
{
return CallbackDispatcher<BaseCallback, Handler, Argument>::create(PassRefPtr<Handler>(handler), handlingMethod);
}
@@ -150,7 +150,7 @@ void FileSystemRootRequest::start(ExecutionContext* executionContext)
{
ASSERT(executionContext);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileSystemRootRequest::didHitError);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileSystemRootRequest::didHitError);
FileSystemType type;
if (!DOMFileSystemBase::pathPrefixToFileSystemType(m_type, type)) {
@@ -164,7 +164,7 @@ void FileSystemRootRequest::start(ExecutionContext* executionContext)
return;
}
- OwnPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &FileSystemRootRequest::didGetEntry);
+ OwnPtrWillBeRawPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &FileSystemRootRequest::didGetEntry);
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = ResolveURICallbacks::create(successCallback.release(), errorCallback.release(), executionContext);
LocalFileSystem::from(*executionContext)->resolveURL(executionContext, rootURL, fileSystemCallbacks.release());
}
@@ -225,8 +225,8 @@ void DirectoryContentRequest::start(ExecutionContext* executionContext)
{
ASSERT(executionContext);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DirectoryContentRequest::didHitError);
- OwnPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &DirectoryContentRequest::didGetEntry);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DirectoryContentRequest::didHitError);
+ OwnPtrWillBeRawPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &DirectoryContentRequest::didGetEntry);
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = ResolveURICallbacks::create(successCallback.release(), errorCallback.release(), executionContext);
@@ -253,8 +253,8 @@ void DirectoryContentRequest::readDirectoryEntries()
return;
}
- OwnPtr<EntriesCallback> successCallback = CallbackDispatcherFactory<EntriesCallback>::create(this, &DirectoryContentRequest::didReadDirectoryEntries);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DirectoryContentRequest::didHitError);
+ OwnPtrWillBeRawPtr<EntriesCallback> successCallback = CallbackDispatcherFactory<EntriesCallback>::create(this, &DirectoryContentRequest::didReadDirectoryEntries);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DirectoryContentRequest::didHitError);
m_directoryReader->readEntries(successCallback.release(), errorCallback.release());
}
@@ -343,8 +343,8 @@ void MetadataRequest::start(ExecutionContext* executionContext)
{
ASSERT(executionContext);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &MetadataRequest::didHitError);
- OwnPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &MetadataRequest::didGetEntry);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &MetadataRequest::didHitError);
+ OwnPtrWillBeRawPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &MetadataRequest::didGetEntry);
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = ResolveURICallbacks::create(successCallback.release(), errorCallback.release(), executionContext);
LocalFileSystem::from(*executionContext)->resolveURL(executionContext, m_url, fileSystemCallbacks.release());
}
@@ -356,8 +356,8 @@ bool MetadataRequest::didGetEntry(Entry* entry)
return true;
}
- OwnPtr<MetadataCallback> successCallback = CallbackDispatcherFactory<MetadataCallback>::create(this, &MetadataRequest::didGetMetadata);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &MetadataRequest::didHitError);
+ OwnPtrWillBeRawPtr<MetadataCallback> successCallback = CallbackDispatcherFactory<MetadataCallback>::create(this, &MetadataRequest::didGetMetadata);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &MetadataRequest::didHitError);
entry->getMetadata(successCallback.release(), errorCallback.release());
m_isDirectory = entry->isDirectory();
return true;
@@ -441,8 +441,8 @@ void FileContentRequest::start(ExecutionContext* executionContext)
{
ASSERT(executionContext);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileContentRequest::didHitError);
- OwnPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &FileContentRequest::didGetEntry);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileContentRequest::didHitError);
+ OwnPtrWillBeRawPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &FileContentRequest::didGetEntry);
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = ResolveURICallbacks::create(successCallback.release(), errorCallback.release(), executionContext);
LocalFileSystem::from(*executionContext)->resolveURL(executionContext, m_url, fileSystemCallbacks.release());
@@ -460,8 +460,8 @@ bool FileContentRequest::didGetEntry(Entry* entry)
return true;
}
- OwnPtr<FileCallback> successCallback = CallbackDispatcherFactory<FileCallback>::create(this, &FileContentRequest::didGetFile);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileContentRequest::didHitError);
+ OwnPtrWillBeRawPtr<FileCallback> successCallback = CallbackDispatcherFactory<FileCallback>::create(this, &FileContentRequest::didGetFile);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &FileContentRequest::didHitError);
toFileEntry(entry)->file(successCallback.release(), errorCallback.release());
m_reader = FileReader::create(entry->filesystem()->executionContext());
@@ -555,7 +555,7 @@ void DeleteEntryRequest::start(ExecutionContext* executionContext)
{
ASSERT(executionContext);
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DeleteEntryRequest::didHitError);
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DeleteEntryRequest::didHitError);
FileSystemType type;
String path;
@@ -565,11 +565,11 @@ void DeleteEntryRequest::start(ExecutionContext* executionContext)
}
if (path == "/") {
- OwnPtr<VoidCallback> successCallback = adoptPtr(new VoidCallbackImpl(this));
+ OwnPtrWillBeRawPtr<VoidCallback> successCallback = adoptPtrWillBeNoop(new VoidCallbackImpl(this));
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = VoidCallbacks::create(successCallback.release(), errorCallback.release(), executionContext, nullptr);
LocalFileSystem::from(*executionContext)->deleteFileSystem(executionContext, type, fileSystemCallbacks.release());
} else {
- OwnPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &DeleteEntryRequest::didGetEntry);
+ OwnPtrWillBeRawPtr<EntryCallback> successCallback = CallbackDispatcherFactory<EntryCallback>::create(this, &DeleteEntryRequest::didGetEntry);
OwnPtr<AsyncFileSystemCallbacks> fileSystemCallbacks = ResolveURICallbacks::create(successCallback.release(), errorCallback.release(), executionContext);
LocalFileSystem::from(*executionContext)->resolveURL(executionContext, m_url, fileSystemCallbacks.release());
}
@@ -577,8 +577,8 @@ void DeleteEntryRequest::start(ExecutionContext* executionContext)
bool DeleteEntryRequest::didGetEntry(Entry* entry)
{
- OwnPtr<VoidCallback> successCallback = adoptPtr(new VoidCallbackImpl(this));
- OwnPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DeleteEntryRequest::didHitError);
+ OwnPtrWillBeRawPtr<VoidCallback> successCallback = adoptPtrWillBeNoop(new VoidCallbackImpl(this));
+ OwnPtrWillBeRawPtr<ErrorCallback> errorCallback = CallbackDispatcherFactory<ErrorCallback>::create(this, &DeleteEntryRequest::didHitError);
if (entry->isDirectory()) {
DirectoryEntry* directoryEntry = toDirectoryEntry(entry);
directoryEntry->removeRecursively(successCallback.release(), errorCallback.release());
diff --git a/third_party/WebKit/Source/modules/filesystem/MetadataCallback.h b/third_party/WebKit/Source/modules/filesystem/MetadataCallback.h
index c61f058..820c17e 100644
--- a/third_party/WebKit/Source/modules/filesystem/MetadataCallback.h
+++ b/third_party/WebKit/Source/modules/filesystem/MetadataCallback.h
@@ -31,13 +31,16 @@
#ifndef MetadataCallback_h
#define MetadataCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class Metadata;
-class MetadataCallback {
+class MetadataCallback : public NoBaseWillBeGarbageCollectedFinalized<MetadataCallback> {
public:
virtual ~MetadataCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(Metadata*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
index af7f83a..9fecc2a 100644
--- a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
+++ b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
@@ -83,8 +83,8 @@ public:
return m_result;
}
- PassOwnPtr<SuccessCallback> successCallback() { return SuccessCallbackImpl::create(this); }
- PassOwnPtr<ErrorCallback> errorCallback() { return ErrorCallbackImpl::create(this); }
+ PassOwnPtrWillBeRawPtr<SuccessCallback> successCallback() { return SuccessCallbackImpl::create(this); }
+ PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback() { return ErrorCallbackImpl::create(this); }
void trace(Visitor* visitor)
{
@@ -100,9 +100,9 @@ private:
class SuccessCallbackImpl FINAL : public SuccessCallback {
public:
- static PassOwnPtr<SuccessCallbackImpl> create(HelperType* helper)
+ static PassOwnPtrWillBeRawPtr<SuccessCallbackImpl> create(HelperType* helper)
{
- return adoptPtr(new SuccessCallbackImpl(helper));
+ return adoptPtrWillBeNoop(new SuccessCallbackImpl(helper));
}
virtual void handleEvent()
@@ -125,9 +125,9 @@ private:
class ErrorCallbackImpl FINAL : public ErrorCallback {
public:
- static PassOwnPtr<ErrorCallbackImpl> create(HelperType* helper)
+ static PassOwnPtrWillBeRawPtr<ErrorCallbackImpl> create(HelperType* helper)
{
- return adoptPtr(new ErrorCallbackImpl(helper));
+ return adoptPtrWillBeNoop(new ErrorCallbackImpl(helper));
}
virtual void handleEvent(FileError* error) OVERRIDE
diff --git a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
index 9e66843..a9e5984 100644
--- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
@@ -45,7 +45,7 @@
namespace blink {
-void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(WorkerGlobalScope& worker, int type, long long size, PassOwnPtr<FileSystemCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(WorkerGlobalScope& worker, int type, long long size, PassOwnPtrWillBeRawPtr<FileSystemCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
ExecutionContext* secureContext = worker.executionContext();
if (!secureContext->securityOrigin()->canAccessFileSystem()) {
@@ -84,7 +84,7 @@ DOMFileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(Work
return helper->getResult(exceptionState);
}
-void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalScope& worker, const String& url, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback)
+void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalScope& worker, const String& url, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback> errorCallback)
{
KURL completedURL = worker.completeURL(url);
ExecutionContext* secureContext = worker.executionContext();
diff --git a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h
index ba917b4..57d0cd7 100644
--- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h
@@ -46,9 +46,9 @@ public:
PERSISTENT,
};
- static void webkitRequestFileSystem(WorkerGlobalScope&, int type, long long size, PassOwnPtr<FileSystemCallback> successCallback, PassOwnPtr<ErrorCallback>);
+ static void webkitRequestFileSystem(WorkerGlobalScope&, int type, long long size, PassOwnPtrWillBeRawPtr<FileSystemCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback>);
static DOMFileSystemSync* webkitRequestFileSystemSync(WorkerGlobalScope&, int type, long long size, ExceptionState&);
- static void webkitResolveLocalFileSystemURL(WorkerGlobalScope&, const String& url, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback>);
+ static void webkitResolveLocalFileSystemURL(WorkerGlobalScope&, const String& url, PassOwnPtrWillBeRawPtr<EntryCallback> successCallback, PassOwnPtrWillBeRawPtr<ErrorCallback>);
static EntrySync* webkitResolveLocalFileSystemSyncURL(WorkerGlobalScope&, const String& url, ExceptionState&);
private:
diff --git a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
index dcf1c51..bf9629e 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
@@ -11,7 +11,7 @@
namespace blink {
-GeoNotifier::GeoNotifier(Geolocation* geolocation, PassOwnPtr<PositionCallback> successCallback, PassOwnPtr<PositionErrorCallback> errorCallback, PositionOptions* options)
+GeoNotifier::GeoNotifier(Geolocation* geolocation, PassOwnPtrWillBeRawPtr<PositionCallback> successCallback, PassOwnPtrWillBeRawPtr<PositionErrorCallback> errorCallback, PositionOptions* options)
// FIXME : m_geolocation should be removed, it makes circular dependancy.
: m_geolocation(geolocation)
, m_successCallback(successCallback)
@@ -28,6 +28,8 @@ GeoNotifier::GeoNotifier(Geolocation* geolocation, PassOwnPtr<PositionCallback>
void GeoNotifier::trace(Visitor* visitor)
{
visitor->trace(m_geolocation);
+ visitor->trace(m_successCallback);
+ visitor->trace(m_errorCallback);
visitor->trace(m_options);
visitor->trace(m_fatalError);
}
diff --git a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.h b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.h
index f327e11..a1471c9 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.h
+++ b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.h
@@ -19,7 +19,7 @@ class PositionOptions;
class GeoNotifier : public GarbageCollectedFinalized<GeoNotifier> {
public:
- static GeoNotifier* create(Geolocation* geolocation, PassOwnPtr<PositionCallback> positionCallback, PassOwnPtr<PositionErrorCallback> positionErrorCallback, PositionOptions* options)
+ static GeoNotifier* create(Geolocation* geolocation, PassOwnPtrWillBeRawPtr<PositionCallback> positionCallback, PassOwnPtrWillBeRawPtr<PositionErrorCallback> positionErrorCallback, PositionOptions* options)
{
return new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options);
}
@@ -49,11 +49,11 @@ public:
void timerFired(Timer<GeoNotifier>*);
private:
- GeoNotifier(Geolocation*, PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, PositionOptions*);
+ GeoNotifier(Geolocation*, PassOwnPtrWillBeRawPtr<PositionCallback>, PassOwnPtrWillBeRawPtr<PositionErrorCallback>, PositionOptions*);
Member<Geolocation> m_geolocation;
- OwnPtr<PositionCallback> m_successCallback;
- OwnPtr<PositionErrorCallback> m_errorCallback;
+ OwnPtrWillBeMember<PositionCallback> m_successCallback;
+ OwnPtrWillBeMember<PositionErrorCallback> m_errorCallback;
Member<PositionOptions> m_options;
Timer<GeoNotifier> m_timer;
Member<PositionError> m_fatalError;
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 8a3c5a9..f100d40 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -138,7 +138,7 @@ Geoposition* Geolocation::lastPosition()
return m_lastPosition.get();
}
-void Geolocation::getCurrentPosition(PassOwnPtr<PositionCallback> successCallback, PassOwnPtr<PositionErrorCallback> errorCallback, const Dictionary& options)
+void Geolocation::getCurrentPosition(PassOwnPtrWillBeRawPtr<PositionCallback> successCallback, PassOwnPtrWillBeRawPtr<PositionErrorCallback> errorCallback, const Dictionary& options)
{
if (!frame())
return;
@@ -149,7 +149,7 @@ void Geolocation::getCurrentPosition(PassOwnPtr<PositionCallback> successCallbac
m_oneShots.add(notifier);
}
-int Geolocation::watchPosition(PassOwnPtr<PositionCallback> successCallback, PassOwnPtr<PositionErrorCallback> errorCallback, const Dictionary& options)
+int Geolocation::watchPosition(PassOwnPtrWillBeRawPtr<PositionCallback> successCallback, PassOwnPtrWillBeRawPtr<PositionErrorCallback> errorCallback, const Dictionary& options)
{
if (!frame())
return 0;
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.h b/third_party/WebKit/Source/modules/geolocation/Geolocation.h
index 1d4c58f..b4124c3 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.h
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.h
@@ -64,11 +64,11 @@ public:
// Creates a oneshot and attempts to obtain a position that meets the
// constraints of the options.
- void getCurrentPosition(PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, const Dictionary&);
+ void getCurrentPosition(PassOwnPtrWillBeRawPtr<PositionCallback>, PassOwnPtrWillBeRawPtr<PositionErrorCallback>, const Dictionary&);
// Creates a watcher that will be notified whenever a new position is
// available that meets the constraints of the options.
- int watchPosition(PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, const Dictionary&);
+ int watchPosition(PassOwnPtrWillBeRawPtr<PositionCallback>, PassOwnPtrWillBeRawPtr<PositionErrorCallback>, const Dictionary&);
// Removes all references to the watcher, it will not be updated again.
void clearWatch(int watchID);
diff --git a/third_party/WebKit/Source/modules/geolocation/PositionCallback.h b/third_party/WebKit/Source/modules/geolocation/PositionCallback.h
index 3c99f68..99ccc72 100644
--- a/third_party/WebKit/Source/modules/geolocation/PositionCallback.h
+++ b/third_party/WebKit/Source/modules/geolocation/PositionCallback.h
@@ -26,13 +26,16 @@
#ifndef PositionCallback_h
#define PositionCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class Geoposition;
- class PositionCallback {
+ class PositionCallback : public NoBaseWillBeGarbageCollectedFinalized<PositionCallback> {
public:
virtual ~PositionCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(Geoposition*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h b/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h
index 856f1b8..1388c9b 100644
--- a/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h
+++ b/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h
@@ -26,13 +26,16 @@
#ifndef PositionErrorCallback_h
#define PositionErrorCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class PositionError;
- class PositionErrorCallback {
+ class PositionErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<PositionErrorCallback> {
public:
virtual ~PositionErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(PositionError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h b/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h
index 80875eb..3ed636e 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h
@@ -27,12 +27,14 @@
#define MediaDeviceInfoCallback_h
#include "modules/mediastream/MediaDeviceInfo.h"
+#include "platform/heap/Handle.h"
namespace blink {
-class MediaDeviceInfoCallback {
+class MediaDeviceInfoCallback : public NoBaseWillBeGarbageCollectedFinalized<MediaDeviceInfoCallback> {
public:
virtual ~MediaDeviceInfoCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const MediaDeviceInfoVector&) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp b/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp
index da76e85..73570c5 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp
@@ -33,14 +33,14 @@
namespace blink {
-MediaDevicesRequest* MediaDevicesRequest::create(ExecutionContext* context, UserMediaController* controller, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
+MediaDevicesRequest* MediaDevicesRequest::create(ExecutionContext* context, UserMediaController* controller, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
{
MediaDevicesRequest* request = new MediaDevicesRequest(context, controller, callback);
request->suspendIfNeeded();
return request;
}
-MediaDevicesRequest::MediaDevicesRequest(ExecutionContext* context, UserMediaController* controller, PassOwnPtr<MediaDeviceInfoCallback> callback)
+MediaDevicesRequest::MediaDevicesRequest(ExecutionContext* context, UserMediaController* controller, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback> callback)
: ActiveDOMObject(context)
, m_controller(controller)
, m_callback(callback)
@@ -80,4 +80,9 @@ void MediaDevicesRequest::stop()
m_controller = 0;
}
+void MediaDevicesRequest::trace(Visitor* visitor)
+{
+ visitor->trace(m_callback);
+}
+
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h b/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h
index 0511813..f923c25 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h
@@ -41,7 +41,7 @@ class UserMediaController;
class MediaDevicesRequest FINAL : public GarbageCollectedFinalized<MediaDevicesRequest>, public ActiveDOMObject {
public:
- static MediaDevicesRequest* create(ExecutionContext*, UserMediaController*, PassOwnPtr<MediaDeviceInfoCallback>, ExceptionState&);
+ static MediaDevicesRequest* create(ExecutionContext*, UserMediaController*, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback>, ExceptionState&);
virtual ~MediaDevicesRequest();
MediaDeviceInfoCallback* callback() const { return m_callback.get(); }
@@ -54,14 +54,14 @@ public:
// ActiveDOMObject
virtual void stop() OVERRIDE;
- void trace(Visitor*) { }
+ void trace(Visitor*);
private:
- MediaDevicesRequest(ExecutionContext*, UserMediaController*, PassOwnPtr<MediaDeviceInfoCallback>);
+ MediaDevicesRequest(ExecutionContext*, UserMediaController*, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback>);
UserMediaController* m_controller;
- OwnPtr<MediaDeviceInfoCallback> m_callback;
+ OwnPtrWillBeMember<MediaDeviceInfoCallback> m_callback;
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
index ebdb8a9..d12d45b 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
@@ -127,7 +127,7 @@ String MediaStreamTrack::readyState() const
return String();
}
-void MediaStreamTrack::getSources(ExecutionContext* context, PassOwnPtr<MediaStreamTrackSourcesCallback> callback, ExceptionState& exceptionState)
+void MediaStreamTrack::getSources(ExecutionContext* context, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback> callback, ExceptionState& exceptionState)
{
MediaStreamTrackSourcesRequest* request = MediaStreamTrackSourcesRequestImpl::create(*context, callback);
if (!MediaStreamCenter::instance().getMediaStreamTrackSources(request))
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
index a0825ca..c059e6c 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
@@ -62,7 +62,7 @@ public:
String readyState() const;
- static void getSources(ExecutionContext*, PassOwnPtr<MediaStreamTrackSourcesCallback>, ExceptionState&);
+ static void getSources(ExecutionContext*, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback>, ExceptionState&);
void stopTrack(ExceptionState&);
MediaStreamTrack* clone(ExecutionContext*);
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
index bf33fd9a..4895bcf 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesCallback.h
@@ -31,9 +31,10 @@ namespace blink {
class MediaStreamTrackSourcesResponse;
-class MediaStreamTrackSourcesCallback {
+class MediaStreamTrackSourcesCallback : public NoBaseWillBeGarbageCollectedFinalized<MediaStreamTrackSourcesCallback> {
public:
virtual ~MediaStreamTrackSourcesCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const SourceInfoVector&) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp
index 39c1f5e..b8a79a4 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp
@@ -36,12 +36,12 @@
namespace blink {
-MediaStreamTrackSourcesRequestImpl* MediaStreamTrackSourcesRequestImpl::create(ExecutionContext& context, PassOwnPtr<MediaStreamTrackSourcesCallback> callback)
+MediaStreamTrackSourcesRequestImpl* MediaStreamTrackSourcesRequestImpl::create(ExecutionContext& context, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback> callback)
{
return new MediaStreamTrackSourcesRequestImpl(context, callback);
}
-MediaStreamTrackSourcesRequestImpl::MediaStreamTrackSourcesRequestImpl(ExecutionContext& context, PassOwnPtr<MediaStreamTrackSourcesCallback> callback)
+MediaStreamTrackSourcesRequestImpl::MediaStreamTrackSourcesRequestImpl(ExecutionContext& context, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback> callback)
: m_callback(callback)
, m_executionContext(&context)
{
@@ -73,6 +73,7 @@ void MediaStreamTrackSourcesRequestImpl::performCallback()
void MediaStreamTrackSourcesRequestImpl::trace(Visitor* visitor)
{
+ visitor->trace(m_callback);
visitor->trace(m_executionContext);
visitor->trace(m_sourceInfos);
MediaStreamTrackSourcesRequest::trace(visitor);
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h
index b661b1d..1ea604f 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h
@@ -38,7 +38,7 @@ template<typename T> class WebVector;
class MediaStreamTrackSourcesRequestImpl FINAL : public MediaStreamTrackSourcesRequest {
public:
- static MediaStreamTrackSourcesRequestImpl* create(ExecutionContext&, PassOwnPtr<MediaStreamTrackSourcesCallback>);
+ static MediaStreamTrackSourcesRequestImpl* create(ExecutionContext&, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback>);
~MediaStreamTrackSourcesRequestImpl();
virtual String origin() OVERRIDE;
@@ -47,11 +47,11 @@ public:
virtual void trace(Visitor*) OVERRIDE;
private:
- MediaStreamTrackSourcesRequestImpl(ExecutionContext&, PassOwnPtr<MediaStreamTrackSourcesCallback>);
+ MediaStreamTrackSourcesRequestImpl(ExecutionContext&, PassOwnPtrWillBeRawPtr<MediaStreamTrackSourcesCallback>);
void performCallback();
- OwnPtr<MediaStreamTrackSourcesCallback> m_callback;
+ OwnPtrWillBeMember<MediaStreamTrackSourcesCallback> m_callback;
RefPtrWillBeMember<ExecutionContext> m_executionContext;
SourceInfoVector m_sourceInfos;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp
index 7cebbc6..70b3054 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp
@@ -47,7 +47,7 @@ NavigatorMediaStream::~NavigatorMediaStream()
{
}
-void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
+void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const Dictionary& options, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
{
if (!successCallback)
return;
@@ -67,7 +67,7 @@ void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const Dictio
request->start();
}
-void NavigatorMediaStream::getMediaDevices(Navigator& navigator, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
+void NavigatorMediaStream::getMediaDevices(Navigator& navigator, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
{
UserMediaController* userMedia = UserMediaController::from(navigator.frame());
if (!userMedia) {
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
index 7149287..c824978 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
@@ -20,6 +20,7 @@
#ifndef NavigatorMediaStream_h
#define NavigatorMediaStream_h
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"
@@ -34,9 +35,9 @@ class NavigatorUserMediaSuccessCallback;
class NavigatorMediaStream {
public:
- static void webkitGetUserMedia(Navigator&, const Dictionary&, PassOwnPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&);
+ static void webkitGetUserMedia(Navigator&, const Dictionary&, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback>, ExceptionState&);
- static void getMediaDevices(Navigator&, PassOwnPtr<MediaDeviceInfoCallback>, ExceptionState&);
+ static void getMediaDevices(Navigator&, PassOwnPtrWillBeRawPtr<MediaDeviceInfoCallback>, ExceptionState&);
private:
NavigatorMediaStream();
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaErrorCallback.h b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaErrorCallback.h
index f2be8b7..1e59536 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaErrorCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaErrorCallback.h
@@ -26,12 +26,14 @@
#define NavigatorUserMediaErrorCallback_h
#include "modules/mediastream/NavigatorUserMediaError.h"
+#include "platform/heap/Handle.h"
namespace blink {
-class NavigatorUserMediaErrorCallback {
+class NavigatorUserMediaErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<NavigatorUserMediaErrorCallback> {
public:
virtual ~NavigatorUserMediaErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(NavigatorUserMediaError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaSuccessCallback.h b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaSuccessCallback.h
index 78a7c13..6ade17a 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaSuccessCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaSuccessCallback.h
@@ -25,13 +25,16 @@
#ifndef NavigatorUserMediaSuccessCallback_h
#define NavigatorUserMediaSuccessCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class MediaStream;
-class NavigatorUserMediaSuccessCallback {
+class NavigatorUserMediaSuccessCallback : public NoBaseWillBeGarbageCollectedFinalized<NavigatorUserMediaSuccessCallback> {
public:
virtual ~NavigatorUserMediaSuccessCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(MediaStream*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCErrorCallback.h b/third_party/WebKit/Source/modules/mediastream/RTCErrorCallback.h
index d957740..13a6042 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCErrorCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCErrorCallback.h
@@ -31,13 +31,15 @@
#ifndef RTCErrorCallback_h
#define RTCErrorCallback_h
+#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
namespace blink {
-class RTCErrorCallback {
+class RTCErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<RTCErrorCallback> {
public:
virtual ~RTCErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const String& errorInformation) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
index cfff572..9515665 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -271,7 +271,7 @@ RTCPeerConnection::~RTCPeerConnection()
ASSERT(m_closed || m_stopped);
}
-void RTCPeerConnection::createOffer(PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, const Dictionary& rtcOfferOptions, ExceptionState& exceptionState)
+void RTCPeerConnection::createOffer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback, const Dictionary& rtcOfferOptions, ExceptionState& exceptionState)
{
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
@@ -295,7 +295,7 @@ void RTCPeerConnection::createOffer(PassOwnPtr<RTCSessionDescriptionCallback> su
}
}
-void RTCPeerConnection::createAnswer(PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
+void RTCPeerConnection::createAnswer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
{
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
@@ -310,7 +310,7 @@ void RTCPeerConnection::createAnswer(PassOwnPtr<RTCSessionDescriptionCallback> s
m_peerHandler->createAnswer(request.release(), constraints);
}
-void RTCPeerConnection::setLocalDescription(RTCSessionDescription* sessionDescription, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
+void RTCPeerConnection::setLocalDescription(RTCSessionDescription* sessionDescription, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
{
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
@@ -333,7 +333,7 @@ RTCSessionDescription* RTCPeerConnection::localDescription(ExceptionState& excep
return RTCSessionDescription::create(webSessionDescription);
}
-void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescription, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
+void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescription, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
{
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
@@ -389,7 +389,7 @@ void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, Exception
exceptionState.throwDOMException(SyntaxError, "The ICE candidate could not be added.");
}
-void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
+void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback, ExceptionState& exceptionState)
{
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
@@ -536,7 +536,7 @@ MediaStream* RTCPeerConnection::getStreamById(const String& streamId)
return 0;
}
-void RTCPeerConnection::getStats(PassOwnPtr<RTCStatsCallback> successCallback, MediaStreamTrack* selector)
+void RTCPeerConnection::getStats(PassOwnPtrWillBeRawPtr<RTCStatsCallback> successCallback, MediaStreamTrack* selector)
{
RefPtr<RTCStatsRequest> statsRequest = RTCStatsRequestImpl::create(executionContext(), this, successCallback, selector);
// FIXME: Add passing selector as part of the statsRequest.
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
index 44602c8..e8343b24 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
@@ -66,14 +66,14 @@ public:
static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&);
virtual ~RTCPeerConnection();
- void createOffer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&);
+ void createOffer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&);
- void createAnswer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&);
+ void createAnswer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&);
- void setLocalDescription(RTCSessionDescription*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
+ void setLocalDescription(RTCSessionDescription*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&);
RTCSessionDescription* localDescription(ExceptionState&);
- void setRemoteDescription(RTCSessionDescription*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
+ void setRemoteDescription(RTCSessionDescription*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&);
RTCSessionDescription* remoteDescription(ExceptionState&);
String signalingState() const;
@@ -83,7 +83,7 @@ public:
// DEPRECATED
void addIceCandidate(RTCIceCandidate*, ExceptionState&);
- void addIceCandidate(RTCIceCandidate*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
+ void addIceCandidate(RTCIceCandidate*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&);
String iceGatheringState() const;
@@ -99,7 +99,7 @@ public:
void removeStream(MediaStream*, ExceptionState&);
- void getStats(PassOwnPtr<RTCStatsCallback> successCallback, MediaStreamTrack* selector);
+ void getStats(PassOwnPtrWillBeRawPtr<RTCStatsCallback> successCallback, MediaStreamTrack* selector);
RTCDataChannel* createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionState&);
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionCallback.h b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionCallback.h
index c12498e..b0ea270 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionCallback.h
@@ -31,13 +31,16 @@
#ifndef RTCSessionDescriptionCallback_h
#define RTCSessionDescriptionCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class RTCSessionDescription;
-class RTCSessionDescriptionCallback {
+class RTCSessionDescriptionCallback : public NoBaseWillBeGarbageCollectedFinalized<RTCSessionDescriptionCallback> {
public:
virtual ~RTCSessionDescriptionCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(RTCSessionDescription*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
index 2133527..37e14ce 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
@@ -41,14 +41,14 @@
namespace blink {
-PassRefPtr<RTCSessionDescriptionRequestImpl> RTCSessionDescriptionRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback)
+PassRefPtr<RTCSessionDescriptionRequestImpl> RTCSessionDescriptionRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback)
{
RefPtr<RTCSessionDescriptionRequestImpl> request = adoptRef(new RTCSessionDescriptionRequestImpl(context, requester, successCallback, errorCallback));
request->suspendIfNeeded();
return request.release();
}
-RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback)
+RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback)
: ActiveDOMObject(context)
, m_successCallback(successCallback)
, m_errorCallback(errorCallback)
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h
index f759c25..e7eb71c 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h
@@ -44,9 +44,10 @@ class RTCPeerConnection;
class RTCSessionDescriptionCallback;
class WebRTCSessionDescription;
+// FIXME: Oilpan: Move RTCSessionDescriptionRequestImpl to heap in a follow-up.
class RTCSessionDescriptionRequestImpl FINAL : public RTCSessionDescriptionRequest, public ActiveDOMObject {
public:
- static PassRefPtr<RTCSessionDescriptionRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCErrorCallback>);
+ static PassRefPtr<RTCSessionDescriptionRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>);
virtual ~RTCSessionDescriptionRequestImpl();
virtual void requestSucceeded(const WebRTCSessionDescription&) OVERRIDE;
@@ -56,12 +57,12 @@ public:
virtual void stop() OVERRIDE;
private:
- RTCSessionDescriptionRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCErrorCallback>);
+ RTCSessionDescriptionRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>);
void clear();
- OwnPtr<RTCSessionDescriptionCallback> m_successCallback;
- OwnPtr<RTCErrorCallback> m_errorCallback;
+ OwnPtrWillBePersistent<RTCSessionDescriptionCallback> m_successCallback;
+ OwnPtrWillBePersistent<RTCErrorCallback> m_errorCallback;
Persistent<RTCPeerConnection> m_requester;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCStatsCallback.h b/third_party/WebKit/Source/modules/mediastream/RTCStatsCallback.h
index bd859c0..94651fc 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCStatsCallback.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCStatsCallback.h
@@ -25,13 +25,16 @@
#ifndef RTCStatsCallback_h
#define RTCStatsCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class RTCStatsResponse;
-class RTCStatsCallback {
+class RTCStatsCallback : public NoBaseWillBeGarbageCollectedFinalized<RTCStatsCallback> {
public:
virtual ~RTCStatsCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(RTCStatsResponse*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp b/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp
index bd7bc87..a2148d0 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp
@@ -31,14 +31,14 @@
namespace blink {
-PassRefPtr<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<RTCStatsCallback> callback, MediaStreamTrack* selector)
+PassRefPtr<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<RTCStatsCallback> callback, MediaStreamTrack* selector)
{
RefPtr<RTCStatsRequestImpl> request = adoptRef(new RTCStatsRequestImpl(context, requester, callback, selector));
request->suspendIfNeeded();
return request.release();
}
-RTCStatsRequestImpl::RTCStatsRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<RTCStatsCallback> callback, MediaStreamTrack* selector)
+RTCStatsRequestImpl::RTCStatsRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<RTCStatsCallback> callback, MediaStreamTrack* selector)
: ActiveDOMObject(context)
, m_successCallback(callback)
, m_component(selector ? selector->component() : 0)
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h b/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h
index 270ae39..ab20476 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h
@@ -38,9 +38,10 @@ class MediaStreamTrack;
class RTCPeerConnection;
class RTCStatsCallback;
+// FIXME: Oilpan: Move RTCStatsRequestImpl to heap in a follow-up.
class RTCStatsRequestImpl FINAL : public RTCStatsRequest, public ActiveDOMObject {
public:
- static PassRefPtr<RTCStatsRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<RTCStatsCallback>, MediaStreamTrack*);
+ static PassRefPtr<RTCStatsRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<RTCStatsCallback>, MediaStreamTrack*);
virtual ~RTCStatsRequestImpl();
virtual RTCStatsResponseBase* createResponse() OVERRIDE;
@@ -53,11 +54,11 @@ public:
virtual void stop() OVERRIDE;
private:
- RTCStatsRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<RTCStatsCallback>, MediaStreamTrack*);
+ RTCStatsRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<RTCStatsCallback>, MediaStreamTrack*);
void clear();
- OwnPtr<RTCStatsCallback> m_successCallback;
+ OwnPtrWillBePersistent<RTCStatsCallback> m_successCallback;
RefPtr<MediaStreamComponent> m_component;
Persistent<RTCPeerConnection> m_requester;
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp
index 45f54af..f4ae8de 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp
@@ -37,14 +37,14 @@
namespace blink {
-PassRefPtr<RTCVoidRequestImpl> RTCVoidRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback)
+PassRefPtr<RTCVoidRequestImpl> RTCVoidRequestImpl::create(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback)
{
RefPtr<RTCVoidRequestImpl> request = adoptRef(new RTCVoidRequestImpl(context, requester, successCallback, errorCallback));
request->suspendIfNeeded();
return request.release();
}
-RTCVoidRequestImpl::RTCVoidRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback)
+RTCVoidRequestImpl::RTCVoidRequestImpl(ExecutionContext* context, RTCPeerConnection* requester, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<RTCErrorCallback> errorCallback)
: ActiveDOMObject(context)
, m_successCallback(successCallback)
, m_errorCallback(errorCallback)
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h
index a80e6b9..798e191 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h
@@ -41,9 +41,10 @@ class RTCErrorCallback;
class RTCPeerConnection;
class VoidCallback;
+// FIXME: Oilpan: Move RTCVoidRequestImpl to heap in a follow-up.
class RTCVoidRequestImpl FINAL : public RTCVoidRequest, public ActiveDOMObject {
public:
- static PassRefPtr<RTCVoidRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>);
+ static PassRefPtr<RTCVoidRequestImpl> create(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>);
virtual ~RTCVoidRequestImpl();
// RTCVoidRequest
@@ -54,12 +55,12 @@ public:
virtual void stop() OVERRIDE;
private:
- RTCVoidRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtr<VoidCallback>, PassOwnPtr<RTCErrorCallback>);
+ RTCVoidRequestImpl(ExecutionContext*, RTCPeerConnection*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>);
void clear();
- OwnPtr<VoidCallback> m_successCallback;
- OwnPtr<RTCErrorCallback> m_errorCallback;
+ OwnPtrWillBePersistent<VoidCallback> m_successCallback;
+ OwnPtrWillBePersistent<RTCErrorCallback> m_errorCallback;
Persistent<RTCPeerConnection> m_requester;
};
diff --git a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
index b101ee6..b540f67 100644
--- a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
@@ -65,7 +65,7 @@ static WebMediaConstraints parseOptions(const Dictionary& options, const String&
return constraints;
}
-UserMediaRequest* UserMediaRequest::create(ExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
+UserMediaRequest* UserMediaRequest::create(ExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
{
WebMediaConstraints audio = parseOptions(options, "audio", exceptionState);
if (exceptionState.hadException())
@@ -83,7 +83,7 @@ UserMediaRequest* UserMediaRequest::create(ExecutionContext* context, UserMediaC
return new UserMediaRequest(context, controller, audio, video, successCallback, errorCallback);
}
-UserMediaRequest::UserMediaRequest(ExecutionContext* context, UserMediaController* controller, WebMediaConstraints audio, WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback)
+UserMediaRequest::UserMediaRequest(ExecutionContext* context, UserMediaController* controller, WebMediaConstraints audio, WebMediaConstraints video, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback> errorCallback)
: ContextLifecycleObserver(context)
, m_audio(audio)
, m_video(video)
@@ -185,4 +185,10 @@ void UserMediaRequest::contextDestroyed()
ContextLifecycleObserver::contextDestroyed();
}
+void UserMediaRequest::trace(Visitor* visitor)
+{
+ visitor->trace(m_successCallback);
+ visitor->trace(m_errorCallback);
+}
+
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
index 6b6f1df..c4f2129 100644
--- a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
+++ b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
@@ -49,7 +49,7 @@ class UserMediaController;
class UserMediaRequest FINAL : public GarbageCollectedFinalized<UserMediaRequest>, public ContextLifecycleObserver {
public:
- static UserMediaRequest* create(ExecutionContext*, UserMediaController*, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&);
+ static UserMediaRequest* create(ExecutionContext*, UserMediaController*, const Dictionary& options, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback>, ExceptionState&);
virtual ~UserMediaRequest();
NavigatorUserMediaSuccessCallback* successCallback() const { return m_successCallback.get(); }
@@ -71,18 +71,18 @@ public:
// ContextLifecycleObserver
virtual void contextDestroyed() OVERRIDE;
- void trace(Visitor*) { }
+ void trace(Visitor*);
private:
- UserMediaRequest(ExecutionContext*, UserMediaController*, WebMediaConstraints audio, WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>);
+ UserMediaRequest(ExecutionContext*, UserMediaController*, WebMediaConstraints audio, WebMediaConstraints video, PassOwnPtrWillBeRawPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtrWillBeRawPtr<NavigatorUserMediaErrorCallback>);
WebMediaConstraints m_audio;
WebMediaConstraints m_video;
UserMediaController* m_controller;
- OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback;
- OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback;
+ OwnPtrWillBeMember<NavigatorUserMediaSuccessCallback> m_successCallback;
+ OwnPtrWillBeMember<NavigatorUserMediaErrorCallback> m_errorCallback;
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index e6b38ea..8bcd13b 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -167,7 +167,7 @@ const String& Notification::permission(ExecutionContext* context)
return permissionString(NotificationController::clientFrom(context).checkPermission(context));
}
-void Notification::requestPermission(ExecutionContext* context, PassOwnPtr<NotificationPermissionCallback> callback)
+void Notification::requestPermission(ExecutionContext* context, PassOwnPtrWillBeRawPtr<NotificationPermissionCallback> callback)
{
// FIXME: Assert that this code-path will only be reached for Document environments
// when Blink supports [Exposed] annotations on class members in IDL definitions.
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.h b/third_party/WebKit/Source/modules/notifications/Notification.h
index fe32447..f9a6dc1 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.h
+++ b/third_party/WebKit/Source/modules/notifications/Notification.h
@@ -79,7 +79,7 @@ public:
static const String& permissionString(NotificationClient::Permission);
static const String& permission(ExecutionContext*);
- static void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPermissionCallback> = nullptr);
+ static void requestPermission(ExecutionContext*, PassOwnPtrWillBeRawPtr<NotificationPermissionCallback> = nullptr);
// EventTarget interface.
virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return ActiveDOMObject::executionContext(); }
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h b/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
index 0cb581e..c46eb83 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
@@ -26,13 +26,15 @@
#ifndef NotificationPermissionCallback_h
#define NotificationPermissionCallback_h
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
namespace blink {
-class NotificationPermissionCallback {
+class NotificationPermissionCallback : public NoBaseWillBeGarbageCollectedFinalized<NotificationPermissionCallback> {
public:
virtual ~NotificationPermissionCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(const String& permission) = 0;
};
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationPermissionClient.h b/third_party/WebKit/Source/modules/notifications/NotificationPermissionClient.h
index 8243534..29f5650 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationPermissionClient.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationPermissionClient.h
@@ -21,7 +21,7 @@ public:
// Requests user permission to show platform notifications from the origin
// of the current frame. The provided callback will be ran when the user
// has made a decision.
- virtual void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPermissionCallback>) = 0;
+ virtual void requestPermission(ExecutionContext*, PassOwnPtrWillBeRawPtr<NotificationPermissionCallback>) = 0;
// WillBeHeapSupplement requirements.
static const char* supplementName();
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp
index 704ac96..8ca5aff 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp
@@ -46,7 +46,7 @@ DeprecatedStorageInfo::DeprecatedStorageInfo()
ScriptWrappable::init(this);
}
-void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContext, int storageType, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContext, int storageType, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
{
// Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
@@ -58,7 +58,7 @@ void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCallback);
}
-void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, int storageType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, int storageType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
{
// Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
index f018a3f..841cb68 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
@@ -55,9 +55,9 @@ public:
return new DeprecatedStorageInfo();
}
- void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>);
+ void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtrWillBeRawPtr<StorageUsageCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
- void requestQuota(ExecutionContext*, int storageType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>);
+ void requestQuota(ExecutionContext*, int storageType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
void trace(Visitor*);
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
index 2f22c96..f21ff17 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
@@ -52,7 +52,7 @@ DeprecatedStorageQuota::DeprecatedStorageQuota(Type type)
ScriptWrappable::init(this);
}
-void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionContext, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionContext, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
{
ASSERT(executionContext);
@@ -74,7 +74,7 @@ void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte
Platform::current()->queryStorageUsageAndQuota(storagePartition, storageType, callbacks.release());
}
-void DeprecatedStorageQuota::requestQuota(ExecutionContext* executionContext, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+void DeprecatedStorageQuota::requestQuota(ExecutionContext* executionContext, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
{
ASSERT(executionContext);
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h
index 3a99dc27..b76b8e3 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h
@@ -54,9 +54,9 @@ public:
return new DeprecatedStorageQuota(type);
}
- void queryUsageAndQuota(ExecutionContext*, PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>);
+ void queryUsageAndQuota(ExecutionContext*, PassOwnPtrWillBeRawPtr<StorageUsageCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
- void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>);
+ void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
void trace(Visitor*) { }
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp
index 8da0b0f..3b5aca5 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp
@@ -36,13 +36,13 @@
namespace blink {
-DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageUsageCallback> usageCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtrWillBeRawPtr<StorageUsageCallback> usageCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
: m_usageCallback(usageCallback)
, m_errorCallback(errorCallback)
{
}
-DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageQuotaCallback> quotaCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtrWillBeRawPtr<StorageQuotaCallback> quotaCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
: m_quotaCallback(quotaCallback)
, m_errorCallback(errorCallback)
{
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
index 1d6c268..8e6d718 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
@@ -41,14 +41,15 @@
namespace blink {
+// FIXME: Oilpan: Move DeprecatedStorageQuotaCallbacksImpl to heap in a follow-up.
class DeprecatedStorageQuotaCallbacksImpl FINAL : public StorageQuotaCallbacks {
public:
- static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtr<StorageUsageCallback> success, PassOwnPtr<StorageErrorCallback> error)
+ static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtrWillBeRawPtr<StorageUsageCallback> success, PassOwnPtrWillBeRawPtr<StorageErrorCallback> error)
{
return adoptPtr(new DeprecatedStorageQuotaCallbacksImpl(success, error));
}
- static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtr<StorageQuotaCallback> success, PassOwnPtr<StorageErrorCallback> error)
+ static PassOwnPtr<DeprecatedStorageQuotaCallbacksImpl> create(PassOwnPtrWillBeRawPtr<StorageQuotaCallback> success, PassOwnPtrWillBeRawPtr<StorageErrorCallback> error)
{
return adoptPtr(new DeprecatedStorageQuotaCallbacksImpl(success, error));
}
@@ -60,12 +61,12 @@ public:
virtual void didFail(WebStorageQuotaError) OVERRIDE;
private:
- DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageUsageCallback>, PassOwnPtr<StorageErrorCallback>);
- DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>);
+ DeprecatedStorageQuotaCallbacksImpl(PassOwnPtrWillBeRawPtr<StorageUsageCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
+ DeprecatedStorageQuotaCallbacksImpl(PassOwnPtrWillBeRawPtr<StorageQuotaCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>);
- OwnPtr<StorageUsageCallback> m_usageCallback;
- OwnPtr<StorageQuotaCallback> m_quotaCallback;
- OwnPtr<StorageErrorCallback> m_errorCallback;
+ OwnPtrWillBePersistent<StorageUsageCallback> m_usageCallback;
+ OwnPtrWillBePersistent<StorageQuotaCallback> m_quotaCallback;
+ OwnPtrWillBePersistent<StorageErrorCallback> m_errorCallback;
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.cpp b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.cpp
index 2f2b404..94d6ca3 100644
--- a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.cpp
+++ b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.cpp
@@ -36,7 +36,7 @@
namespace blink {
-StorageErrorCallback::CallbackTask::CallbackTask(PassOwnPtr<StorageErrorCallback> callback, ExceptionCode ec)
+StorageErrorCallback::CallbackTask::CallbackTask(PassOwnPtrWillBeRawPtr<StorageErrorCallback> callback, ExceptionCode ec)
: m_callback(callback)
, m_ec(ec)
{
diff --git a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
index ab372b9..b5d0d79 100644
--- a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
+++ b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
@@ -33,6 +33,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/dom/ExecutionContextTask.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
namespace blink {
@@ -41,14 +42,15 @@ class DOMError;
typedef int ExceptionCode;
-class StorageErrorCallback {
+class StorageErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<StorageErrorCallback> {
public:
virtual ~StorageErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(DOMError*) = 0;
class CallbackTask FINAL : public ExecutionContextTask {
public:
- static PassOwnPtr<CallbackTask> create(PassOwnPtr<StorageErrorCallback> callback, ExceptionCode ec)
+ static PassOwnPtr<CallbackTask> create(PassOwnPtrWillBeRawPtr<StorageErrorCallback> callback, ExceptionCode ec)
{
return adoptPtr(new CallbackTask(callback, ec));
}
@@ -56,9 +58,9 @@ public:
virtual void performTask(ExecutionContext*) OVERRIDE;
private:
- CallbackTask(PassOwnPtr<StorageErrorCallback>, ExceptionCode);
+ CallbackTask(PassOwnPtrWillBeRawPtr<StorageErrorCallback>, ExceptionCode);
- OwnPtr<StorageErrorCallback> m_callback;
+ OwnPtrWillBePersistent<StorageErrorCallback> m_callback;
ExceptionCode m_ec;
};
};
diff --git a/third_party/WebKit/Source/modules/quota/StorageQuotaCallback.h b/third_party/WebKit/Source/modules/quota/StorageQuotaCallback.h
index b1d05c27..1a81849 100644
--- a/third_party/WebKit/Source/modules/quota/StorageQuotaCallback.h
+++ b/third_party/WebKit/Source/modules/quota/StorageQuotaCallback.h
@@ -31,11 +31,14 @@
#ifndef StorageQuotaCallback_h
#define StorageQuotaCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
-class StorageQuotaCallback {
+class StorageQuotaCallback : public NoBaseWillBeGarbageCollectedFinalized<StorageQuotaCallback> {
public:
virtual ~StorageQuotaCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(unsigned long long grantedQuotaInBytes) = 0;
};
diff --git a/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h b/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
index a495451..20551d6 100644
--- a/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
+++ b/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
@@ -51,7 +51,7 @@ public:
StorageQuotaClient() { }
virtual ~StorageQuotaClient() { }
- virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>) = 0;
+ virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>) = 0;
virtual ScriptPromise requestPersistentQuota(ScriptState*, unsigned long long newQuotaInBytes) = 0;
static const char* supplementName();
diff --git a/third_party/WebKit/Source/modules/quota/StorageUsageCallback.h b/third_party/WebKit/Source/modules/quota/StorageUsageCallback.h
index 213e927..bbd4703 100644
--- a/third_party/WebKit/Source/modules/quota/StorageUsageCallback.h
+++ b/third_party/WebKit/Source/modules/quota/StorageUsageCallback.h
@@ -31,11 +31,14 @@
#ifndef StorageUsageCallback_h
#define StorageUsageCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
-class StorageUsageCallback {
+class StorageUsageCallback : public NoBaseWillBeGarbageCollectedFinalized<StorageUsageCallback> {
public:
virtual ~StorageUsageCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(unsigned long long currentUsageInBytes, unsigned long long currentQuotaInBytes) = 0;
};
diff --git a/third_party/WebKit/Source/modules/serviceworkers/Headers.cpp b/third_party/WebKit/Source/modules/serviceworkers/Headers.cpp
index 5fca753d..4256de7 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/Headers.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/Headers.cpp
@@ -210,12 +210,12 @@ void Headers::set(const String& name, const String& value, ExceptionState& excep
m_headerList->set(name, value);
}
-void Headers::forEach(PassOwnPtr<HeadersForEachCallback> callback, const ScriptValue& thisArg)
+void Headers::forEach(PassOwnPtrWillBeRawPtr<HeadersForEachCallback> callback, const ScriptValue& thisArg)
{
forEachInternal(callback, &thisArg);
}
-void Headers::forEach(PassOwnPtr<HeadersForEachCallback> callback)
+void Headers::forEach(PassOwnPtrWillBeRawPtr<HeadersForEachCallback> callback)
{
forEachInternal(callback, 0);
}
@@ -309,7 +309,7 @@ Headers::Headers(FetchHeaderList* headerList)
ScriptWrappable::init(this);
}
-void Headers::forEachInternal(PassOwnPtr<HeadersForEachCallback> callback, const ScriptValue* thisArg)
+void Headers::forEachInternal(PassOwnPtrWillBeRawPtr<HeadersForEachCallback> callback, const ScriptValue* thisArg)
{
TrackExceptionState exceptionState;
for (size_t i = 0; i < m_headerList->size(); ++i) {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/Headers.h b/third_party/WebKit/Source/modules/serviceworkers/Headers.h
index 30d7bcc..609671f 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/Headers.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/Headers.h
@@ -42,8 +42,8 @@ public:
bool has(const String& key, ExceptionState&);
void set(const String& key, const String& value, ExceptionState&);
unsigned long size() const;
- void forEach(PassOwnPtr<HeadersForEachCallback>, const ScriptValue&);
- void forEach(PassOwnPtr<HeadersForEachCallback>);
+ void forEach(PassOwnPtrWillBeRawPtr<HeadersForEachCallback>, const ScriptValue&);
+ void forEach(PassOwnPtrWillBeRawPtr<HeadersForEachCallback>);
void setGuard(Guard guard) { m_guard = guard; }
Guard guard() const { return m_guard; }
@@ -58,7 +58,7 @@ private:
Headers();
// Shares the FetchHeaderList. Called when creating a Request or Response.
explicit Headers(FetchHeaderList*);
- void forEachInternal(PassOwnPtr<HeadersForEachCallback>, const ScriptValue*);
+ void forEachInternal(PassOwnPtrWillBeRawPtr<HeadersForEachCallback>, const ScriptValue*);
RefPtrWillBeMember<FetchHeaderList> m_headerList;
Guard m_guard;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/HeadersForEachCallback.h b/third_party/WebKit/Source/modules/serviceworkers/HeadersForEachCallback.h
index 7f1d70e..60fe225 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/HeadersForEachCallback.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/HeadersForEachCallback.h
@@ -6,14 +6,16 @@
#define HeadersForEachCallback_h
#include "bindings/core/v8/ScriptValue.h"
+#include "platform/heap/Handle.h"
namespace blink {
class Headers;
-class HeadersForEachCallback {
+class HeadersForEachCallback : public NoBaseWillBeGarbageCollectedFinalized<HeadersForEachCallback> {
public:
virtual ~HeadersForEachCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleItem(ScriptValue thisValue, const String& value, const String& key, Headers*) = 0;
virtual bool handleItem(const String& value, const String& key, Headers*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
index a9d22d2..2d47623 100644
--- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
@@ -49,7 +49,7 @@ AsyncAudioDecoder::~AsyncAudioDecoder()
{
}
-void AsyncAudioDecoder::decodeAsync(ArrayBuffer* audioData, float sampleRate, PassOwnPtr<AudioBufferCallback> successCallback, PassOwnPtr<AudioBufferCallback> errorCallback)
+void AsyncAudioDecoder::decodeAsync(ArrayBuffer* audioData, float sampleRate, PassOwnPtrWillBeRawPtr<AudioBufferCallback> successCallback, PassOwnPtrWillBeRawPtr<AudioBufferCallback> errorCallback)
{
ASSERT(isMainThread());
ASSERT(audioData);
@@ -76,8 +76,6 @@ void AsyncAudioDecoder::notifyComplete(ArrayBuffer* audioData, AudioBufferCallba
{
// Adopt references, so everything gets correctly dereffed.
RefPtr<ArrayBuffer> audioDataRef = adoptRef(audioData);
- OwnPtr<AudioBufferCallback> successCallbackPtr = adoptPtr(successCallback);
- OwnPtr<AudioBufferCallback> errorCallbackPtr = adoptPtr(errorCallback);
RefPtr<AudioBus> audioBusRef = adoptRef(audioBus);
AudioBuffer* audioBuffer = AudioBuffer::createFromAudioBus(audioBus);
diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
index f4ca2e4..93d2fbc 100644
--- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
+++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
@@ -46,7 +46,7 @@ public:
~AsyncAudioDecoder();
// Must be called on the main thread.
- void decodeAsync(ArrayBuffer* audioData, float sampleRate, PassOwnPtr<AudioBufferCallback> successCallback, PassOwnPtr<AudioBufferCallback> errorCallback);
+ void decodeAsync(ArrayBuffer* audioData, float sampleRate, PassOwnPtrWillBeRawPtr<AudioBufferCallback> successCallback, PassOwnPtrWillBeRawPtr<AudioBufferCallback> errorCallback);
private:
AudioBuffer* createAudioBufferFromAudioBus(AudioBus*);
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
index 8c0c088..098a335 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
@@ -27,13 +27,16 @@
#if ENABLE(WEB_AUDIO)
+#include "platform/heap/Handle.h"
+
namespace blink {
class AudioBuffer;
-class AudioBufferCallback {
+class AudioBufferCallback : public NoBaseWillBeGarbageCollectedFinalized<AudioBufferCallback> {
public:
virtual ~AudioBufferCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(AudioBuffer*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
index 643a265..d5a9654 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
@@ -245,7 +245,7 @@ AudioBuffer* AudioContext::createBuffer(unsigned numberOfChannels, size_t number
return AudioBuffer::create(numberOfChannels, numberOfFrames, sampleRate, exceptionState);
}
-void AudioContext::decodeAudioData(ArrayBuffer* audioData, PassOwnPtr<AudioBufferCallback> successCallback, PassOwnPtr<AudioBufferCallback> errorCallback, ExceptionState& exceptionState)
+void AudioContext::decodeAudioData(ArrayBuffer* audioData, PassOwnPtrWillBeRawPtr<AudioBufferCallback> successCallback, PassOwnPtrWillBeRawPtr<AudioBufferCallback> errorCallback, ExceptionState& exceptionState)
{
if (!audioData) {
exceptionState.throwDOMException(
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.h b/third_party/WebKit/Source/modules/webaudio/AudioContext.h
index 31d37e8..4139f3f 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.h
@@ -98,7 +98,7 @@ public:
AudioBuffer* createBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionState&);
// Asynchronous audio file data decoding.
- void decodeAudioData(ArrayBuffer*, PassOwnPtr<AudioBufferCallback>, PassOwnPtr<AudioBufferCallback>, ExceptionState&);
+ void decodeAudioData(ArrayBuffer*, PassOwnPtrWillBeRawPtr<AudioBufferCallback>, PassOwnPtrWillBeRawPtr<AudioBufferCallback>, ExceptionState&);
AudioListener* listener() { return m_listener.get(); }
diff --git a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
index 335174c..591e016 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
@@ -40,7 +40,7 @@
namespace blink {
-PassRefPtrWillBeRawPtr<Database> DOMWindowWebDatabase::openDatabase(LocalDOMWindow& window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<Database> DOMWindowWebDatabase::openDatabase(LocalDOMWindow& window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
{
if (!window.isCurrentlyDisplayedInFrame())
return nullptr;
diff --git a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
index effca8c..5068074 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
@@ -41,7 +41,7 @@ class LocalFrame;
class DOMWindowWebDatabase {
public:
- static PassRefPtrWillBeRawPtr<Database> openDatabase(LocalDOMWindow&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<Database> openDatabase(LocalDOMWindow&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState&);
private:
DOMWindowWebDatabase() { };
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
index 5cf68dd..74977d5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
@@ -113,30 +113,30 @@ void Database::closeImmediately()
}
}
-void Database::changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtr<SQLTransactionCallback> callback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtr<VoidCallback> successCallback)
+void Database::changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback)
{
ChangeVersionData data(oldVersion, newVersion);
runTransaction(callback, errorCallback, successCallback, false, &data);
}
-void Database::transaction(PassOwnPtr<SQLTransactionCallback> callback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtr<VoidCallback> successCallback)
+void Database::transaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback)
{
runTransaction(callback, errorCallback, successCallback, false);
}
-void Database::readTransaction(PassOwnPtr<SQLTransactionCallback> callback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtr<VoidCallback> successCallback)
+void Database::readTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback)
{
runTransaction(callback, errorCallback, successCallback, true);
}
-static void callTransactionErrorCallback(ExecutionContext*, PassOwnPtr<SQLTransactionErrorCallback> callback, PassOwnPtr<SQLErrorData> errorData)
+static void callTransactionErrorCallback(ExecutionContext*, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> callback, PassOwnPtr<SQLErrorData> errorData)
{
RefPtrWillBeRawPtr<SQLError> error = SQLError::create(*errorData);
callback->handleEvent(error.get());
}
-void Database::runTransaction(PassOwnPtr<SQLTransactionCallback> callback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback,
- PassOwnPtr<VoidCallback> successCallback, bool readOnly, const ChangeVersionData* changeVersionData)
+void Database::runTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, bool readOnly, const ChangeVersionData* changeVersionData)
{
// FIXME: Rather than passing errorCallback to SQLTransaction and then sometimes firing it ourselves,
// this code should probably be pushed down into DatabaseBackend so that we only create the SQLTransaction
@@ -147,7 +147,7 @@ void Database::runTransaction(PassOwnPtr<SQLTransactionCallback> callback, PassO
RefPtrWillBeRawPtr<SQLTransaction> transaction = SQLTransaction::create(this, callback, successCallback, errorCallback, readOnly);
RefPtrWillBeRawPtr<SQLTransactionBackend> transactionBackend = backend()->runTransaction(transaction, readOnly, changeVersionData);
if (!transactionBackend) {
- OwnPtr<SQLTransactionErrorCallback> callback = transaction->releaseErrorCallback();
+ OwnPtrWillBeRawPtr<SQLTransactionErrorCallback> callback = transaction->releaseErrorCallback();
ASSERT(callback == originalErrorCallback);
if (callback) {
OwnPtr<SQLErrorData> error = SQLErrorData::create(SQLError::UNKNOWN_ERR, "database has been closed");
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.h b/third_party/WebKit/Source/modules/webdatabase/Database.h
index 79bb270..2cfc0c1 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.h
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.h
@@ -55,9 +55,9 @@ public:
// Direct support for the DOM API
virtual String version() const OVERRIDE;
- void changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtr<SQLTransactionCallback>, PassOwnPtr<SQLTransactionErrorCallback>, PassOwnPtr<VoidCallback> successCallback);
- void transaction(PassOwnPtr<SQLTransactionCallback>, PassOwnPtr<SQLTransactionErrorCallback>, PassOwnPtr<VoidCallback> successCallback);
- void readTransaction(PassOwnPtr<SQLTransactionCallback>, PassOwnPtr<SQLTransactionErrorCallback>, PassOwnPtr<VoidCallback> successCallback);
+ void changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtrWillBeRawPtr<SQLTransactionCallback>, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback);
+ void transaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback>, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback);
+ void readTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback>, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>, PassOwnPtrWillBeRawPtr<VoidCallback> successCallback);
// Internal engine support
static Database* from(DatabaseBackend*);
@@ -77,8 +77,8 @@ private:
PassRefPtrWillBeRawPtr<DatabaseBackend> backend();
static PassRefPtrWillBeRawPtr<Database> create(ExecutionContext*, PassRefPtrWillBeRawPtr<DatabaseBackendBase>);
- void runTransaction(PassOwnPtr<SQLTransactionCallback>, PassOwnPtr<SQLTransactionErrorCallback>,
- PassOwnPtr<VoidCallback> successCallback, bool readOnly, const ChangeVersionData* = 0);
+ void runTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionCallback>, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, bool readOnly, const ChangeVersionData* = 0);
Vector<String> performGetTableNames();
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseCallback.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseCallback.h
index aec2e46..77393f9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseCallback.h
@@ -31,14 +31,17 @@
#ifndef DatabaseCallback_h
#define DatabaseCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class Database;
class DatabaseSync;
-class DatabaseCallback {
+class DatabaseCallback : public NoBaseWillBeGarbageCollectedFinalized<DatabaseCallback> {
public:
virtual ~DatabaseCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(Database*) = 0;
virtual bool handleEvent(DatabaseSync*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
index 8d79fb40..dc068e2 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
@@ -70,7 +70,7 @@ DatabaseManager::~DatabaseManager()
class DatabaseCreationCallbackTask FINAL : public ExecutionContextTask {
public:
- static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtr<DatabaseCallback> creationCallback)
+ static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback)
{
return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallback));
}
@@ -81,14 +81,14 @@ public:
}
private:
- DatabaseCreationCallbackTask(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtr<DatabaseCallback> callback)
+ DatabaseCreationCallbackTask(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtrWillBeRawPtr<DatabaseCallback> callback)
: m_database(database)
, m_creationCallback(callback)
{
}
RefPtrWillBePersistent<Database> m_database;
- OwnPtr<DatabaseCallback> m_creationCallback;
+ OwnPtrWillBePersistent<DatabaseCallback> m_creationCallback;
};
DatabaseContext* DatabaseManager::existingDatabaseContextFor(ExecutionContext* context)
@@ -210,7 +210,7 @@ PassRefPtrWillBeRawPtr<DatabaseBackendBase> DatabaseManager::openDatabaseBackend
PassRefPtrWillBeRawPtr<Database> DatabaseManager::openDatabase(ExecutionContext* context,
const String& name, const String& expectedVersion, const String& displayName,
- unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback,
+ unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback,
DatabaseError& error, String& errorMessage)
{
ASSERT(error == DatabaseError::None);
@@ -237,7 +237,7 @@ PassRefPtrWillBeRawPtr<Database> DatabaseManager::openDatabase(ExecutionContext*
PassRefPtrWillBeRawPtr<DatabaseSync> DatabaseManager::openDatabaseSync(ExecutionContext* context,
const String& name, const String& expectedVersion, const String& displayName,
- unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback,
+ unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback,
DatabaseError& error, String& errorMessage)
{
ASSERT(context->isContextThread());
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
index c03d4cd..cc2a233 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
@@ -71,8 +71,8 @@ public:
static void throwExceptionForDatabaseError(DatabaseError, const String& errorMessage, ExceptionState&);
- PassRefPtrWillBeRawPtr<Database> openDatabase(ExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback>, DatabaseError&, String& errorMessage);
- PassRefPtrWillBeRawPtr<DatabaseSync> openDatabaseSync(ExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback>, DatabaseError&, String& errorMessage);
+ PassRefPtrWillBeRawPtr<Database> openDatabase(ExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback>, DatabaseError&, String& errorMessage);
+ PassRefPtrWillBeRawPtr<DatabaseSync> openDatabaseSync(ExecutionContext*, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback>, DatabaseError&, String& errorMessage);
String fullPathForDatabase(SecurityOrigin*, const String& name, bool createIfDoesNotExist = true);
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp
index 2a5b7c1..8dcc995 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp
@@ -75,7 +75,7 @@ void DatabaseSync::trace(Visitor* visitor)
DatabaseBackendSync::trace(visitor);
}
-void DatabaseSync::changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtr<SQLTransactionSyncCallback> changeVersionCallback, ExceptionState& exceptionState)
+void DatabaseSync::changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> changeVersionCallback, ExceptionState& exceptionState)
{
ASSERT(executionContext()->isContextThread());
@@ -135,12 +135,12 @@ void DatabaseSync::changeVersion(const String& oldVersion, const String& newVers
setLastErrorMessage("");
}
-void DatabaseSync::transaction(PassOwnPtr<SQLTransactionSyncCallback> callback, ExceptionState& exceptionState)
+void DatabaseSync::transaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, ExceptionState& exceptionState)
{
runTransaction(callback, false, exceptionState);
}
-void DatabaseSync::readTransaction(PassOwnPtr<SQLTransactionSyncCallback> callback, ExceptionState& exceptionState)
+void DatabaseSync::readTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, ExceptionState& exceptionState)
{
runTransaction(callback, true, exceptionState);
}
@@ -153,7 +153,7 @@ void DatabaseSync::rollbackTransaction(SQLTransactionSync& transaction)
return;
}
-void DatabaseSync::runTransaction(PassOwnPtr<SQLTransactionSyncCallback> callback, bool readOnly, ExceptionState& exceptionState)
+void DatabaseSync::runTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, bool readOnly, ExceptionState& exceptionState)
{
ASSERT(executionContext()->isContextThread());
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h
index 55be526..71cc92f 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h
@@ -52,9 +52,9 @@ public:
virtual ~DatabaseSync();
virtual void trace(Visitor*) OVERRIDE;
- void changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&);
- void transaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&);
- void readTransaction(PassOwnPtr<SQLTransactionSyncCallback>, ExceptionState&);
+ void changeVersion(const String& oldVersion, const String& newVersion, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, ExceptionState&);
+ void transaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, ExceptionState&);
+ void readTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, ExceptionState&);
virtual void closeImmediately() OVERRIDE;
void observeTransaction(SQLTransactionSync&);
@@ -71,7 +71,7 @@ private:
const String& expectedVersion, const String& displayName, unsigned long estimatedSize);
static PassRefPtrWillBeRawPtr<DatabaseSync> create(ExecutionContext*, PassRefPtrWillBeRawPtr<DatabaseBackendBase>);
- void runTransaction(PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly, ExceptionState&);
+ void runTransaction(PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, bool readOnly, ExceptionState&);
void rollbackTransaction(SQLTransactionSync&);
#if ENABLE(OILPAN)
class TransactionObserver {
diff --git a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
index 3b4fe53..c017ed9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
@@ -69,9 +69,9 @@ void reportTransactionFailed(ExecuteSQLCallback* requestCallback, SQLError* erro
class StatementCallback FINAL : public SQLStatementCallback {
public:
- static PassOwnPtr<StatementCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
+ static PassOwnPtrWillBeRawPtr<StatementCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
{
- return adoptPtr(new StatementCallback(requestCallback));
+ return adoptPtrWillBeNoop(new StatementCallback(requestCallback));
}
virtual ~StatementCallback() { }
@@ -107,9 +107,9 @@ private:
class StatementErrorCallback FINAL : public SQLStatementErrorCallback {
public:
- static PassOwnPtr<StatementErrorCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
+ static PassOwnPtrWillBeRawPtr<StatementErrorCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
{
- return adoptPtr(new StatementErrorCallback(requestCallback));
+ return adoptPtrWillBeNoop(new StatementErrorCallback(requestCallback));
}
virtual ~StatementErrorCallback() { }
@@ -128,9 +128,9 @@ private:
class TransactionCallback FINAL : public SQLTransactionCallback {
public:
- static PassOwnPtr<TransactionCallback> create(const String& sqlStatement, PassRefPtr<ExecuteSQLCallback> requestCallback)
+ static PassOwnPtrWillBeRawPtr<TransactionCallback> create(const String& sqlStatement, PassRefPtr<ExecuteSQLCallback> requestCallback)
{
- return adoptPtr(new TransactionCallback(sqlStatement, requestCallback));
+ return adoptPtrWillBeNoop(new TransactionCallback(sqlStatement, requestCallback));
}
virtual ~TransactionCallback() { }
@@ -141,8 +141,8 @@ public:
return true;
Vector<SQLValue> sqlValues;
- OwnPtr<SQLStatementCallback> callback(StatementCallback::create(m_requestCallback.get()));
- OwnPtr<SQLStatementErrorCallback> errorCallback(StatementErrorCallback::create(m_requestCallback.get()));
+ OwnPtrWillBeRawPtr<SQLStatementCallback> callback(StatementCallback::create(m_requestCallback.get()));
+ OwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback(StatementErrorCallback::create(m_requestCallback.get()));
transaction->executeSQL(m_sqlStatement, sqlValues, callback.release(), errorCallback.release(), IGNORE_EXCEPTION);
return true;
}
@@ -156,9 +156,9 @@ private:
class TransactionErrorCallback FINAL : public SQLTransactionErrorCallback {
public:
- static PassOwnPtr<TransactionErrorCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
+ static PassOwnPtrWillBeRawPtr<TransactionErrorCallback> create(PassRefPtr<ExecuteSQLCallback> requestCallback)
{
- return adoptPtr(new TransactionErrorCallback(requestCallback));
+ return adoptPtrWillBeNoop(new TransactionErrorCallback(requestCallback));
}
virtual ~TransactionErrorCallback() { }
@@ -176,9 +176,9 @@ private:
class TransactionSuccessCallback FINAL : public VoidCallback {
public:
- static PassOwnPtr<TransactionSuccessCallback> create()
+ static PassOwnPtrWillBeRawPtr<TransactionSuccessCallback> create()
{
- return adoptPtr(new TransactionSuccessCallback());
+ return adoptPtrWillBeNoop(new TransactionSuccessCallback());
}
virtual ~TransactionSuccessCallback() { }
@@ -290,9 +290,9 @@ void InspectorDatabaseAgent::executeSQL(ErrorString*, const String& databaseId,
return;
}
- OwnPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, requestCallback.get()));
- OwnPtr<SQLTransactionErrorCallback> errorCallback(TransactionErrorCallback::create(requestCallback.get()));
- OwnPtr<VoidCallback> successCallback(TransactionSuccessCallback::create());
+ OwnPtrWillBeRawPtr<SQLTransactionCallback> callback(TransactionCallback::create(query, requestCallback.get()));
+ OwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback(TransactionErrorCallback::create(requestCallback.get()));
+ OwnPtrWillBeRawPtr<VoidCallback> successCallback(TransactionSuccessCallback::create());
database->transaction(callback.release(), errorCallback.release(), successCallback.release());
}
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h b/third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h
index f51bfa1..ecee88c 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h
@@ -44,7 +44,7 @@ namespace blink {
template<typename T> class SQLCallbackWrapper {
DISALLOW_ALLOCATION();
public:
- SQLCallbackWrapper(PassOwnPtr<T> callback, ExecutionContext* executionContext)
+ SQLCallbackWrapper(PassOwnPtrWillBeRawPtr<T> callback, ExecutionContext* executionContext)
: m_callback(callback)
, m_executionContext(m_callback ? executionContext : 0)
{
@@ -53,10 +53,16 @@ public:
~SQLCallbackWrapper()
{
+#if !ENABLE(OILPAN)
clear();
+#endif
}
- void trace(Visitor* visitor) { visitor->trace(m_executionContext); }
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(m_callback);
+ visitor->trace(m_executionContext);
+ }
void clear()
{
@@ -88,7 +94,7 @@ public:
#endif
}
- PassOwnPtr<T> unwrap()
+ PassOwnPtrWillBeRawPtr<T> unwrap()
{
MutexLocker locker(m_mutex);
ASSERT(!m_callback || m_executionContext->isContextThread());
@@ -128,7 +134,7 @@ private:
#endif
Mutex m_mutex;
- OwnPtr<T> m_callback;
+ OwnPtrWillBeMember<T> m_callback;
RefPtrWillBeMember<ExecutionContext> m_executionContext;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
index 3d53237..3fc35e5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
@@ -43,13 +43,13 @@
namespace blink {
PassOwnPtrWillBeRawPtr<SQLStatement> SQLStatement::create(Database* database,
- PassOwnPtr<SQLStatementCallback> callback, PassOwnPtr<SQLStatementErrorCallback> errorCallback)
+ PassOwnPtrWillBeRawPtr<SQLStatementCallback> callback, PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback)
{
return adoptPtrWillBeNoop(new SQLStatement(database, callback, errorCallback));
}
-SQLStatement::SQLStatement(Database* database, PassOwnPtr<SQLStatementCallback> callback,
- PassOwnPtr<SQLStatementErrorCallback> errorCallback)
+SQLStatement::SQLStatement(Database* database, PassOwnPtrWillBeRawPtr<SQLStatementCallback> callback,
+ PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback)
: m_statementCallbackWrapper(callback, database->executionContext())
, m_statementErrorCallbackWrapper(errorCallback, database->executionContext())
{
@@ -85,8 +85,8 @@ bool SQLStatement::performCallback(SQLTransaction* transaction)
bool callbackError = false;
- OwnPtr<SQLStatementCallback> callback = m_statementCallbackWrapper.unwrap();
- OwnPtr<SQLStatementErrorCallback> errorCallback = m_statementErrorCallbackWrapper.unwrap();
+ OwnPtrWillBeRawPtr<SQLStatementCallback> callback = m_statementCallbackWrapper.unwrap();
+ OwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback = m_statementErrorCallbackWrapper.unwrap();
SQLErrorData* error = m_backend->sqlError();
// Call the appropriate statement callback and track if it resulted in an error,
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
index 7ddc395..9b9e7f7 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
@@ -47,7 +47,7 @@ class SQLTransaction;
class SQLStatement FINAL : public AbstractSQLStatement {
public:
static PassOwnPtrWillBeRawPtr<SQLStatement> create(Database*,
- PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStatementErrorCallback>);
+ PassOwnPtrWillBeRawPtr<SQLStatementCallback>, PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback>);
virtual void trace(Visitor*) OVERRIDE;
bool performCallback(SQLTransaction*);
@@ -58,7 +58,7 @@ public:
virtual bool hasErrorCallback() OVERRIDE;
private:
- SQLStatement(Database*, PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStatementErrorCallback>);
+ SQLStatement(Database*, PassOwnPtrWillBeRawPtr<SQLStatementCallback>, PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback>);
// The AbstractSQLStatementBackend owns the SQLStatement. Hence, the backend is
// guaranteed to be outlive the SQLStatement, and it is safe for us to refer
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementCallback.h b/third_party/WebKit/Source/modules/webdatabase/SQLStatementCallback.h
index 5bf48a1..c77e0e5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementCallback.h
@@ -28,14 +28,17 @@
#ifndef SQLStatementCallback_h
#define SQLStatementCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class SQLTransaction;
class SQLResultSet;
-class SQLStatementCallback {
+class SQLStatementCallback : public NoBaseWillBeGarbageCollectedFinalized<SQLStatementCallback> {
public:
virtual ~SQLStatementCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(SQLTransaction*, SQLResultSet*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementErrorCallback.h b/third_party/WebKit/Source/modules/webdatabase/SQLStatementErrorCallback.h
index 4b7376f..0b04d88 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementErrorCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementErrorCallback.h
@@ -29,14 +29,17 @@
#ifndef SQLStatementErrorCallback_h
#define SQLStatementErrorCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class SQLTransaction;
class SQLError;
-class SQLStatementErrorCallback {
+class SQLStatementErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<SQLStatementErrorCallback> {
public:
virtual ~SQLStatementErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(SQLTransaction*, SQLError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
index 7c64737..4249413 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
@@ -48,15 +48,15 @@
namespace blink {
-PassRefPtrWillBeRawPtr<SQLTransaction> SQLTransaction::create(Database* db, PassOwnPtr<SQLTransactionCallback> callback,
- PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback,
+PassRefPtrWillBeRawPtr<SQLTransaction> SQLTransaction::create(Database* db, PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback,
bool readOnly)
{
return adoptRefWillBeNoop(new SQLTransaction(db, callback, successCallback, errorCallback, readOnly));
}
-SQLTransaction::SQLTransaction(Database* db, PassOwnPtr<SQLTransactionCallback> callback,
- PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<SQLTransactionErrorCallback> errorCallback,
+SQLTransaction::SQLTransaction(Database* db, PassOwnPtrWillBeRawPtr<SQLTransactionCallback> callback,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback,
bool readOnly)
: m_database(db)
, m_callbackWrapper(callback, db->executionContext())
@@ -150,7 +150,7 @@ SQLTransactionState SQLTransaction::deliverTransactionCallback()
bool shouldDeliverErrorCallback = false;
// Spec 4.3.2 4: Invoke the transaction callback with the new SQLTransaction object
- OwnPtr<SQLTransactionCallback> callback = m_callbackWrapper.unwrap();
+ OwnPtrWillBeRawPtr<SQLTransactionCallback> callback = m_callbackWrapper.unwrap();
if (callback) {
m_executeSqlAllowed = true;
shouldDeliverErrorCallback = !callback->handleEvent(this);
@@ -172,7 +172,7 @@ SQLTransactionState SQLTransaction::deliverTransactionErrorCallback()
{
// Spec 4.3.2.10: If exists, invoke error callback with the last
// error to have occurred in this transaction.
- OwnPtr<SQLTransactionErrorCallback> errorCallback = m_errorCallbackWrapper.unwrap();
+ OwnPtrWillBeRawPtr<SQLTransactionErrorCallback> errorCallback = m_errorCallbackWrapper.unwrap();
if (errorCallback) {
// If we get here with an empty m_transactionError, then the backend
// must be waiting in the idle state waiting for this state to finish.
@@ -230,7 +230,7 @@ SQLTransactionState SQLTransaction::deliverQuotaIncreaseCallback()
SQLTransactionState SQLTransaction::deliverSuccessCallback()
{
// Spec 4.3.2.8: Deliver success callback.
- OwnPtr<VoidCallback> successCallback = m_successCallbackWrapper.unwrap();
+ OwnPtrWillBeRawPtr<VoidCallback> successCallback = m_successCallbackWrapper.unwrap();
if (successCallback)
successCallback->handleEvent();
@@ -263,7 +263,7 @@ void SQLTransaction::performPendingCallback()
runStateMachine();
}
-void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments, PassOwnPtr<SQLStatementCallback> callback, PassOwnPtr<SQLStatementErrorCallback> callbackError, ExceptionState& exceptionState)
+void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments, PassOwnPtrWillBeRawPtr<SQLStatementCallback> callback, PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback> callbackError, ExceptionState& exceptionState)
{
if (!m_executeSqlAllowed) {
exceptionState.throwDOMException(InvalidStateError, "SQL execution is disallowed.");
@@ -316,7 +316,7 @@ void SQLTransaction::clearCallbackWrappers()
m_errorCallbackWrapper.clear();
}
-PassOwnPtr<SQLTransactionErrorCallback> SQLTransaction::releaseErrorCallback()
+PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> SQLTransaction::releaseErrorCallback()
{
return m_errorCallbackWrapper.unwrap();
}
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h
index dbcae2f..5881b5b 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h
@@ -53,23 +53,23 @@ class VoidCallback;
class SQLTransaction FINAL : public AbstractSQLTransaction, public SQLTransactionStateMachine<SQLTransaction>, public ScriptWrappable {
public:
- static PassRefPtrWillBeRawPtr<SQLTransaction> create(Database*, PassOwnPtr<SQLTransactionCallback>,
- PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<SQLTransactionErrorCallback>,
+ static PassRefPtrWillBeRawPtr<SQLTransaction> create(Database*, PassOwnPtrWillBeRawPtr<SQLTransactionCallback>,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>,
bool readOnly);
virtual void trace(Visitor*) OVERRIDE;
void performPendingCallback();
void executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments,
- PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStatementErrorCallback>, ExceptionState&);
+ PassOwnPtrWillBeRawPtr<SQLStatementCallback>, PassOwnPtrWillBeRawPtr<SQLStatementErrorCallback>, ExceptionState&);
Database* database() { return m_database.get(); }
- PassOwnPtr<SQLTransactionErrorCallback> releaseErrorCallback();
+ PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> releaseErrorCallback();
private:
- SQLTransaction(Database*, PassOwnPtr<SQLTransactionCallback>,
- PassOwnPtr<VoidCallback> successCallback, PassOwnPtr<SQLTransactionErrorCallback>,
+ SQLTransaction(Database*, PassOwnPtrWillBeRawPtr<SQLTransactionCallback>,
+ PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>,
bool readOnly);
void clearCallbackWrappers();
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp
index 445791a..1f0d000 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp
@@ -51,7 +51,7 @@
namespace blink {
-SQLTransactionBackendSync::SQLTransactionBackendSync(DatabaseSync* db, PassOwnPtr<SQLTransactionSyncCallback> callback, bool readOnly)
+SQLTransactionBackendSync::SQLTransactionBackendSync(DatabaseSync* db, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, bool readOnly)
: m_database(db)
, m_callback(callback)
, m_readOnly(readOnly)
@@ -81,6 +81,7 @@ SQLTransactionBackendSync::~SQLTransactionBackendSync()
void SQLTransactionBackendSync::trace(Visitor* visitor)
{
visitor->trace(m_database);
+ visitor->trace(m_callback);
}
PassRefPtrWillBeRawPtr<SQLResultSet> SQLTransactionBackendSync::executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments, ExceptionState& exceptionState)
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h
index ab255e7..09ac717 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h
@@ -66,10 +66,10 @@ public:
void rollbackIfInProgress();
private:
- SQLTransactionBackendSync(DatabaseSync*, PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly);
+ SQLTransactionBackendSync(DatabaseSync*, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, bool readOnly);
RefPtrWillBeMember<DatabaseSync> m_database;
- OwnPtr<SQLTransactionSyncCallback> m_callback;
+ OwnPtrWillBeMember<SQLTransactionSyncCallback> m_callback;
bool m_readOnly;
bool m_hasVersionMismatch;
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCallback.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCallback.h
index 28fd62e..b704eb1 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCallback.h
@@ -29,13 +29,16 @@
#ifndef SQLTransactionCallback_h
#define SQLTransactionCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class SQLTransaction;
-class SQLTransactionCallback {
+class SQLTransactionCallback : public NoBaseWillBeGarbageCollectedFinalized<SQLTransactionCallback> {
public:
virtual ~SQLTransactionCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(SQLTransaction*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionErrorCallback.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionErrorCallback.h
index aab2db0..aa151c9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionErrorCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionErrorCallback.h
@@ -29,13 +29,16 @@
#ifndef SQLTransactionErrorCallback_h
#define SQLTransactionErrorCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class SQLError;
-class SQLTransactionErrorCallback {
+class SQLTransactionErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<SQLTransactionErrorCallback> {
public:
virtual ~SQLTransactionErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(SQLError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp
index bcfb714..b001577 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp
@@ -38,12 +38,12 @@
namespace blink {
-PassRefPtrWillBeRawPtr<SQLTransactionSync> SQLTransactionSync::create(DatabaseSync* db, PassOwnPtr<SQLTransactionSyncCallback> callback, bool readOnly)
+PassRefPtrWillBeRawPtr<SQLTransactionSync> SQLTransactionSync::create(DatabaseSync* db, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, bool readOnly)
{
return adoptRefWillBeNoop(new SQLTransactionSync(db, callback, readOnly));
}
-SQLTransactionSync::SQLTransactionSync(DatabaseSync* db, PassOwnPtr<SQLTransactionSyncCallback> callback, bool readOnly)
+SQLTransactionSync::SQLTransactionSync(DatabaseSync* db, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback> callback, bool readOnly)
: SQLTransactionBackendSync(db, callback, readOnly)
{
ASSERT(m_database->executionContext()->isContextThread());
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h
index 3dc2a30..e5e46e01 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h
@@ -40,12 +40,12 @@ namespace blink {
// Instances of this class should be created and used only on the worker's context thread.
class SQLTransactionSync FINAL : public SQLTransactionBackendSync, public ScriptWrappable {
public:
- static PassRefPtrWillBeRawPtr<SQLTransactionSync> create(DatabaseSync*, PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly = false);
+ static PassRefPtrWillBeRawPtr<SQLTransactionSync> create(DatabaseSync*, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, bool readOnly = false);
static SQLTransactionSync* from(SQLTransactionBackendSync*);
private:
- SQLTransactionSync(DatabaseSync*, PassOwnPtr<SQLTransactionSyncCallback>, bool readOnly);
+ SQLTransactionSync(DatabaseSync*, PassOwnPtrWillBeRawPtr<SQLTransactionSyncCallback>, bool readOnly);
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSyncCallback.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSyncCallback.h
index 78bb818..69347c6 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSyncCallback.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSyncCallback.h
@@ -31,14 +31,17 @@
#ifndef SQLTransactionSyncCallback_h
#define SQLTransactionSyncCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class SQLTransactionSync;
// Instances of this class should be created and used only on the worker's context thread.
-class SQLTransactionSyncCallback {
+class SQLTransactionSyncCallback : public NoBaseWillBeGarbageCollectedFinalized<SQLTransactionSyncCallback> {
public:
virtual ~SQLTransactionSyncCallback() { }
+ virtual void trace(Visitor*) { }
virtual bool handleEvent(SQLTransactionSync*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp b/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
index 63c93ae..6069a27 100644
--- a/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
@@ -42,7 +42,7 @@
namespace blink {
-PassRefPtrWillBeRawPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtrWillBeRawPtr<Database> database = nullptr;
@@ -60,7 +60,7 @@ PassRefPtrWillBeRawPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(Work
return database.release();
}
-PassRefPtrWillBeRawPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtrWillBeRawPtr<DatabaseSync> database = nullptr;
diff --git a/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h b/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h
index b09e056..ff578f5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h
+++ b/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h
@@ -40,8 +40,8 @@ class WorkerGlobalScope;
class WorkerGlobalScopeWebDatabase {
public:
- static PassRefPtrWillBeRawPtr<Database> openDatabase(WorkerGlobalScope&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState&);
- static PassRefPtrWillBeRawPtr<DatabaseSync> openDatabaseSync(WorkerGlobalScope&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<Database> openDatabase(WorkerGlobalScope&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<DatabaseSync> openDatabaseSync(WorkerGlobalScope&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtrWillBeRawPtr<DatabaseCallback> creationCallback, ExceptionState&);
private:
WorkerGlobalScopeWebDatabase() { };
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIErrorCallback.h b/third_party/WebKit/Source/modules/webmidi/MIDIErrorCallback.h
index b528ffd..58de1d9 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIErrorCallback.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIErrorCallback.h
@@ -31,13 +31,16 @@
#ifndef MIDIErrorCallback_h
#define MIDIErrorCallback_h
+#include "platform/heap/Handle.h"
+
namespace blink {
class DOMError;
-class MIDIErrorCallback {
+class MIDIErrorCallback : public NoBaseWillBeGarbageCollectedFinalized<MIDIErrorCallback> {
public:
virtual ~MIDIErrorCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(DOMError*) = 0;
};
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDISuccessCallback.h b/third_party/WebKit/Source/modules/webmidi/MIDISuccessCallback.h
index da88ca8..18a5fb3 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDISuccessCallback.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDISuccessCallback.h
@@ -32,14 +32,16 @@
#define MIDISuccessCallback_h
#include "modules/webmidi/MIDIOptions.h"
+#include "platform/heap/Handle.h"
namespace blink {
class MIDIAccess;
-class MIDISuccessCallback {
+class MIDISuccessCallback : public NoBaseWillBeGarbageCollectedFinalized<MIDISuccessCallback> {
public:
virtual ~MIDISuccessCallback() { }
+ virtual void trace(Visitor*) { }
virtual void handleEvent(MIDIAccess*, bool) = 0;
};
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 9b4252e..62c7734 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -372,9 +372,9 @@ public:
visitor->mark(m_raw);
}
- T* release()
+ RawPtr<T> release()
{
- T* result = m_raw;
+ RawPtr<T> result = m_raw;
m_raw = 0;
return result;
}
diff --git a/third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp b/third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp
index dfa4a75..3142600 100644
--- a/third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp
+++ b/third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp
@@ -18,7 +18,7 @@ namespace {
class WebNotificationPermissionCallbackImpl : public WebNotificationPermissionCallback {
public:
- WebNotificationPermissionCallbackImpl(PassOwnPtr<NotificationPermissionCallback> callback)
+ WebNotificationPermissionCallbackImpl(PassOwnPtrWillBeRawPtr<NotificationPermissionCallback> callback)
: m_callback(callback)
{
}
@@ -32,7 +32,7 @@ public:
}
private:
- OwnPtr<NotificationPermissionCallback> m_callback;
+ OwnPtrWillBePersistent<NotificationPermissionCallback> m_callback;
};
} // namespace
@@ -50,7 +50,7 @@ NotificationPermissionClientImpl::~NotificationPermissionClientImpl()
{
}
-void NotificationPermissionClientImpl::requestPermission(ExecutionContext* context, PassOwnPtr<NotificationPermissionCallback> callback)
+void NotificationPermissionClientImpl::requestPermission(ExecutionContext* context, PassOwnPtrWillBeRawPtr<NotificationPermissionCallback> callback)
{
ASSERT(context && context->isDocument());
diff --git a/third_party/WebKit/Source/web/NotificationPermissionClientImpl.h b/third_party/WebKit/Source/web/NotificationPermissionClientImpl.h
index 4217653..b17ed2d 100644
--- a/third_party/WebKit/Source/web/NotificationPermissionClientImpl.h
+++ b/third_party/WebKit/Source/web/NotificationPermissionClientImpl.h
@@ -17,7 +17,7 @@ public:
virtual ~NotificationPermissionClientImpl();
// NotificationPermissionClient implementation.
- virtual void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPermissionCallback>) OVERRIDE;
+ virtual void requestPermission(ExecutionContext*, PassOwnPtrWillBeRawPtr<NotificationPermissionCallback>) OVERRIDE;
// NoBaseWillBeGarbageCollectedFinalized implementation.
virtual void trace(Visitor* visitor) OVERRIDE { NotificationPermissionClient::trace(visitor); }
diff --git a/third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp b/third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp
index 50bdf29..da9dc47 100644
--- a/third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp
+++ b/third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp
@@ -59,7 +59,7 @@ StorageQuotaClientImpl::~StorageQuotaClientImpl()
{
}
-void StorageQuotaClientImpl::requestQuota(ExecutionContext* executionContext, WebStorageQuotaType storageType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback> successCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
+void StorageQuotaClientImpl::requestQuota(ExecutionContext* executionContext, WebStorageQuotaType storageType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback)
{
ASSERT(executionContext);
diff --git a/third_party/WebKit/Source/web/StorageQuotaClientImpl.h b/third_party/WebKit/Source/web/StorageQuotaClientImpl.h
index 3d5e6d7..9095495 100644
--- a/third_party/WebKit/Source/web/StorageQuotaClientImpl.h
+++ b/third_party/WebKit/Source/web/StorageQuotaClientImpl.h
@@ -43,7 +43,7 @@ public:
virtual ~StorageQuotaClientImpl();
- virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>) OVERRIDE;
+ virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<StorageQuotaCallback>, PassOwnPtrWillBeRawPtr<StorageErrorCallback>) OVERRIDE;
virtual ScriptPromise requestPersistentQuota(ScriptState*, unsigned long long newQuotaInBytes) OVERRIDE;
virtual void trace(Visitor* visitor) OVERRIDE { StorageQuotaClient::trace(visitor); }
diff --git a/third_party/WebKit/Source/wtf/RawPtr.h b/third_party/WebKit/Source/wtf/RawPtr.h
index 252756b..f7ebb2a 100644
--- a/third_party/WebKit/Source/wtf/RawPtr.h
+++ b/third_party/WebKit/Source/wtf/RawPtr.h
@@ -89,6 +89,12 @@ public:
m_ptr = 0;
return ptr;
}
+ T* leakPtr()
+ {
+ T* ptr = m_ptr;
+ m_ptr = 0;
+ return ptr;
+ }
template<typename U>
RawPtr& operator=(U* ptr)