Index: Source/modules/webmidi/NavigatorWebMIDI.cpp |
diff --git a/Source/modules/webmidi/NavigatorWebMIDI.cpp b/Source/modules/webmidi/NavigatorWebMIDI.cpp |
index ae9f39eefef3c5f9a2c1f7eed7d6f3ae3be34064..f847fd82e5456148c26312a1372d5762e6f8595b 100644 |
--- a/Source/modules/webmidi/NavigatorWebMIDI.cpp |
+++ b/Source/modules/webmidi/NavigatorWebMIDI.cpp |
@@ -53,19 +53,19 @@ const char* NavigatorWebMIDI::supplementName() |
return "NavigatorWebMIDI"; |
} |
-NavigatorWebMIDI* NavigatorWebMIDI::from(Navigator* navigator) |
+NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) |
{ |
NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(Supplement<Navigator>::from(navigator, supplementName())); |
if (!supplement) { |
- supplement = new NavigatorWebMIDI(navigator->frame()); |
+ supplement = new NavigatorWebMIDI(navigator.frame()); |
provideTo(navigator, supplementName(), adoptPtr(supplement)); |
} |
- return supplement; |
+ return *supplement; |
} |
-PassRefPtrWillBeRawPtr<MIDIAccessPromise> NavigatorWebMIDI::requestMIDIAccess(Navigator* navigator, const Dictionary& options) |
+PassRefPtrWillBeRawPtr<MIDIAccessPromise> NavigatorWebMIDI::requestMIDIAccess(Navigator& navigator, const Dictionary& options) |
{ |
- return NavigatorWebMIDI::from(navigator)->requestMIDIAccess(options); |
+ return NavigatorWebMIDI::from(navigator).requestMIDIAccess(options); |
} |
PassRefPtrWillBeRawPtr<MIDIAccessPromise> NavigatorWebMIDI::requestMIDIAccess(const Dictionary& options) |