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

Unified Diff: Source/web/WebMIDIPermissionRequest.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
« no previous file with comments | « Source/web/StorageQuotaClientImpl.cpp ('k') | public/platform/WebCrypto.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebMIDIPermissionRequest.cpp
diff --git a/Source/web/WebMIDIPermissionRequest.cpp b/Source/web/WebMIDIPermissionRequest.cpp
index be16798d09f5bd7991111d45df863314d2a6ea41..f76819690ad10fdcad8156893df0322691a96751 100644
--- a/Source/web/WebMIDIPermissionRequest.cpp
+++ b/Source/web/WebMIDIPermissionRequest.cpp
@@ -38,23 +38,33 @@
namespace blink {
WebMIDIPermissionRequest::WebMIDIPermissionRequest(MIDIAccessInitializer* initializer)
- : m_initializer(initializer)
+ : m_private(initializer)
{
}
+void WebMIDIPermissionRequest::reset()
+{
+ m_private.reset();
+}
+
+void WebMIDIPermissionRequest::assign(const WebMIDIPermissionRequest& other)
+{
+ m_private = other.m_private;
+}
+
bool WebMIDIPermissionRequest::equals(const WebMIDIPermissionRequest& n) const
{
- return m_initializer == n.m_initializer;
+ return m_private.get() == n.m_private.get();
}
WebSecurityOrigin WebMIDIPermissionRequest::securityOrigin() const
{
- return WebSecurityOrigin(m_initializer->securityOrigin());
+ return WebSecurityOrigin(m_private->securityOrigin());
}
void WebMIDIPermissionRequest::setIsAllowed(bool allowed)
{
- m_initializer->resolveSysexPermission(allowed);
+ m_private->resolveSysexPermission(allowed);
}
} // namespace blink
« no previous file with comments | « Source/web/StorageQuotaClientImpl.cpp ('k') | public/platform/WebCrypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698