Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1804)

Unified Diff: Source/modules/navigatorconnect/NavigatorConnect.cpp

Issue 783423003: Make ScriptPromiseResolver RefCountedWillBeRefCountedGarbageCollected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/navigatorconnect/NavigatorConnect.cpp
diff --git a/Source/modules/navigatorconnect/NavigatorConnect.cpp b/Source/modules/navigatorconnect/NavigatorConnect.cpp
index 6869883fe5da8aba403f0687b2aceea02bf52ef2..94c6e1cf9edc0458220c7326f955b3dbbe9b4009 100644
--- a/Source/modules/navigatorconnect/NavigatorConnect.cpp
+++ b/Source/modules/navigatorconnect/NavigatorConnect.cpp
@@ -20,7 +20,7 @@ namespace {
class ConnectCallbacks : public WebCallbacks<void, void> {
public:
- ConnectCallbacks(PassRefPtr<ScriptPromiseResolver> resolver, PassRefPtrWillBeRawPtr<MessagePort> port)
+ ConnectCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, PassRefPtrWillBeRawPtr<MessagePort> port)
: m_resolver(resolver), m_port(port)
{
ASSERT(m_resolver);
@@ -44,7 +44,7 @@ public:
}
private:
- RefPtr<ScriptPromiseResolver> m_resolver;
+ RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver;
RefPtrWillBePersistent<MessagePort> m_port;
WTF_MAKE_NONCOPYABLE(ConnectCallbacks);
};
@@ -57,7 +57,7 @@ ScriptPromise NavigatorConnect::connect(ScriptState* scriptState, const String&
if (!provider)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
// Create a new MessageChannel, but immediately disentangle port2 (extract
// the WebMessagePortChannel from the port and mark it as being transfered).
« no previous file with comments | « Source/modules/geofencing/Geofencing.cpp ('k') | Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698