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

Unified Diff: Source/modules/crypto/CryptoResultImpl.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/crypto/CryptoResultImpl.cpp
diff --git a/Source/modules/crypto/CryptoResultImpl.cpp b/Source/modules/crypto/CryptoResultImpl.cpp
index dc0b04082cf18c07b7d5437715b08167a377a7aa..b00e9b449f54bf040266d86566c4418bd05f1519 100644
--- a/Source/modules/crypto/CryptoResultImpl.cpp
+++ b/Source/modules/crypto/CryptoResultImpl.cpp
@@ -62,9 +62,9 @@ static void rejectWithTypeError(const String& errorDetails, ScriptPromiseResolve
class CryptoResultImpl::Resolver final : public ScriptPromiseResolver {
public:
- static PassRefPtr<ScriptPromiseResolver> create(ScriptState* scriptState, CryptoResultImpl* result)
+ static PassRefPtrWillBeRawPtr<ScriptPromiseResolver> create(ScriptState* scriptState, CryptoResultImpl* result)
{
- RefPtr<Resolver> resolver = adoptRef(new Resolver(scriptState, result));
+ RefPtrWillBeRawPtr<Resolver> resolver = adoptRefWillBeNoop(new Resolver(scriptState, result));
resolver->suspendIfNeeded();
resolver->keepAliveWhilePending();
return resolver.release();
@@ -78,6 +78,11 @@ public:
ScriptPromiseResolver::stop();
}
+ virtual void trace(Visitor* visitor) override
sof 2014/12/17 09:32:03 Redundant override, i think.
tasak 2014/12/18 04:30:37 Done.
+ {
+ ScriptPromiseResolver::trace(visitor);
+ }
+
private:
Resolver(ScriptState* scriptState, CryptoResultImpl* result)
: ScriptPromiseResolver(scriptState)
@@ -116,9 +121,9 @@ void CryptoResultImpl::clearResolver()
m_resolver = nullptr;
}
-PassRefPtr<CryptoResultImpl> CryptoResultImpl::create(ScriptState* scriptState)
+PassRefPtrWillBeRawPtr<CryptoResultImpl> CryptoResultImpl::create(ScriptState* scriptState)
{
- return adoptRef(new CryptoResultImpl(scriptState));
+ return adoptRefWillBeNoop(new CryptoResultImpl(scriptState));
}
void CryptoResultImpl::completeWithError(WebCryptoErrorType errorType, const WebString& errorDetails)

Powered by Google App Engine
This is Rietveld 408576698