OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sky/engine/config.h" | 5 #include "sky/engine/config.h" |
6 #include "sky/engine/bindings/exception_state.h" | 6 #include "sky/engine/bindings/exception_state.h" |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 | 9 |
10 ExceptionState::ExceptionState() : code_(0), had_exception_(false) { | 10 ExceptionState::ExceptionState() : code_(0), had_exception_(false) { |
11 } | 11 } |
12 | 12 |
13 ExceptionState::ExceptionState(Context context, | 13 ExceptionState::ExceptionState(Context context, |
14 const char* propertyName, | 14 const char* propertyName, |
15 const char* interfaceName) { | 15 const char* interfaceName) { |
16 } | 16 } |
17 | 17 |
18 ExceptionState::ExceptionState(Context context, const char* interfaceName) { | 18 ExceptionState::ExceptionState(Context context, const char* interfaceName) { |
19 } | 19 } |
20 | 20 |
21 ExceptionState::~ExceptionState() { | 21 ExceptionState::~ExceptionState() { |
22 } | 22 } |
23 | 23 |
| 24 // TODO(iansf): Implement exceptions. |
24 void ExceptionState::ThrowDOMException(const ExceptionCode&, | 25 void ExceptionState::ThrowDOMException(const ExceptionCode&, |
25 const String& message) { | 26 const String& message) { |
26 } | 27 } |
27 | 28 |
28 void ExceptionState::ThrowTypeError(const String& message) { | 29 void ExceptionState::ThrowTypeError(const String& message) { |
29 } | 30 } |
30 | 31 |
31 void ExceptionState::ThrowRangeError(const String& message) { | 32 void ExceptionState::ThrowRangeError(const String& message) { |
32 } | 33 } |
33 | 34 |
34 bool ExceptionState::ThrowIfNeeded() { | 35 bool ExceptionState::ThrowIfNeeded() { |
35 return had_exception_; | 36 return had_exception_; |
36 } | 37 } |
37 | 38 |
38 void ExceptionState::ClearException() { | 39 void ExceptionState::ClearException() { |
39 } | 40 } |
40 | 41 |
41 Dart_Handle ExceptionState::GetDartException(Dart_NativeArguments args, | 42 Dart_Handle ExceptionState::GetDartException(Dart_NativeArguments args, |
42 bool auto_scope) { | 43 bool auto_scope) { |
43 // TODO(abarth): Still don't understand autoscope. | 44 // TODO(abarth): Still don't understand autoscope. |
44 DCHECK(auto_scope); | 45 DCHECK(auto_scope); |
45 return exception_.Release(); | 46 return exception_.Release(); |
46 } | 47 } |
47 | 48 |
48 } // namespace blink | 49 } // namespace blink |
OLD | NEW |