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

Unified Diff: Source/modules/webmidi/NavigatorWebMIDI.cpp

Issue 273683006: ScriptPromise should understand the ScriptState from which the ScriptPromise is generated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/modules/webmidi/NavigatorWebMIDI.h ('k') | Source/modules/webmidi/NavigatorWebMIDI.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/NavigatorWebMIDI.cpp
diff --git a/Source/modules/webmidi/NavigatorWebMIDI.cpp b/Source/modules/webmidi/NavigatorWebMIDI.cpp
index 12aece2598e3168e590fa483fac58ce3c0983955..d12cb501221f7c7a57821934ed7238607d246882 100644
--- a/Source/modules/webmidi/NavigatorWebMIDI.cpp
+++ b/Source/modules/webmidi/NavigatorWebMIDI.cpp
@@ -66,15 +66,15 @@ NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator)
return *supplement;
}
-ScriptPromise NavigatorWebMIDI::requestMIDIAccess(Navigator& navigator, const Dictionary& options)
+ScriptPromise NavigatorWebMIDI::requestMIDIAccess(ScriptState* scriptState, Navigator& navigator, const Dictionary& options)
{
- return NavigatorWebMIDI::from(navigator).requestMIDIAccess(options);
+ return NavigatorWebMIDI::from(navigator).requestMIDIAccess(scriptState, options);
}
-ScriptPromise NavigatorWebMIDI::requestMIDIAccess(const Dictionary& options)
+ScriptPromise NavigatorWebMIDI::requestMIDIAccess(ScriptState* scriptState, const Dictionary& options)
{
if (!frame() || frame()->document()->activeDOMObjectsAreStopped()) {
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(v8::Isolate::GetCurrent());
+ RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
// FIXME: Currently this rejection does not work because the context is stopped.
resolver->reject(DOMError::create("AbortError"));
« no previous file with comments | « Source/modules/webmidi/NavigatorWebMIDI.h ('k') | Source/modules/webmidi/NavigatorWebMIDI.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698