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

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

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 months 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/ServicePortCollection.cpp
diff --git a/Source/modules/navigatorconnect/ServicePortCollection.cpp b/Source/modules/navigatorconnect/ServicePortCollection.cpp
index fe244ca7ba6d96d7e698063101fc39ae0baa28a8..a5836d61d8356f677fbba867fbc82f195fb0296c 100644
--- a/Source/modules/navigatorconnect/ServicePortCollection.cpp
+++ b/Source/modules/navigatorconnect/ServicePortCollection.cpp
@@ -26,7 +26,7 @@ namespace {
class ConnectCallbacks : public WebServicePortConnectCallbacks {
public:
- ConnectCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, ServicePortCollection* collection, const KURL& targetUrl, const String& portName, const String& serializedPortData)
+ ConnectCallbacks(ScriptPromiseResolver* resolver, ServicePortCollection* collection, const KURL& targetUrl, const String& portName, const String& serializedPortData)
: m_resolver(resolver), m_collection(collection), m_targetUrl(targetUrl), m_portName(portName), m_serializedPortData(serializedPortData)
{
ASSERT(m_resolver);
@@ -60,7 +60,7 @@ public:
}
private:
- RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver;
+ Persistent<ScriptPromiseResolver> m_resolver;
Persistent<ServicePortCollection> m_collection;
KURL m_targetUrl;
String m_portName;
@@ -103,7 +103,7 @@ ScriptPromise ServicePortCollection::connect(ScriptState* scriptState, const Str
if (exceptionState.hadException())
return exceptionState.reject(scriptState);
}
- RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
KURL targetUrl = scriptState->executionContext()->completeURL(url);
m_provider->connect(

Powered by Google App Engine
This is Rietveld 408576698