OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "config.h" | |
6 #include "modules/mediasession/MediaSessionError.h" | |
7 | |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
9 #include "public/platform/modules/mediasession/WebMediaSessionError.h" | |
10 | |
11 namespace blink { | |
12 | |
13 // static | |
14 v8::Local<v8::Value> MediaSessionError::take(ScriptPromiseResolver* resolver, co nst WebMediaSessionError& webError) | |
15 { | |
16 v8::Isolate* isolate = resolver->scriptState()->isolate(); | |
17 | |
18 ASSERT(webError == WebMediaSessionError::Activate); | |
19 return v8::Exception::TypeError(v8String(isolate, "The media session activat ion failed.")); | |
davve
2015/10/19 13:12:42
Let's go for DOMException InvalidStateError for no
| |
20 } | |
21 | |
22 } // namespace blink | |
OLD | NEW |