OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #ifndef V8ThrowException_h | 25 #ifndef V8ThrowException_h |
26 #define V8ThrowException_h | 26 #define V8ThrowException_h |
27 | 27 |
28 #include "wtf/text/WTFString.h" | 28 #include "wtf/text/WTFString.h" |
29 #include <v8.h> | 29 #include <v8.h> |
30 | 30 |
31 namespace WebCore { | 31 namespace blink { |
32 | 32 |
33 enum V8ErrorType { | 33 enum V8ErrorType { |
34 v8RangeError, | 34 v8RangeError, |
35 v8ReferenceError, | 35 v8ReferenceError, |
36 v8SyntaxError, | 36 v8SyntaxError, |
37 v8TypeError, | 37 v8TypeError, |
38 v8GeneralError | 38 v8GeneralError |
39 }; | 39 }; |
40 | 40 |
41 class V8ThrowException { | 41 class V8ThrowException { |
(...skipping 12 matching lines...) Expand all Loading... |
54 static v8::Handle<v8::Value> throwDOMException(int, const String& sanitizedM
essage, const String& unsanitizedMessage, const v8::Handle<v8::Object>& creation
Context, v8::Isolate*); | 54 static v8::Handle<v8::Value> throwDOMException(int, const String& sanitizedM
essage, const String& unsanitizedMessage, const v8::Handle<v8::Object>& creation
Context, v8::Isolate*); |
55 | 55 |
56 static v8::Handle<v8::Value> createError(V8ErrorType, const String&, v8::Iso
late*); | 56 static v8::Handle<v8::Value> createError(V8ErrorType, const String&, v8::Iso
late*); |
57 static v8::Handle<v8::Value> throwError(V8ErrorType, const String&, v8::Isol
ate*); | 57 static v8::Handle<v8::Value> throwError(V8ErrorType, const String&, v8::Isol
ate*); |
58 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*)
; | 58 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*)
; |
59 | 59 |
60 static v8::Handle<v8::Value> createTypeError(const String&, v8::Isolate*); | 60 static v8::Handle<v8::Value> createTypeError(const String&, v8::Isolate*); |
61 static v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); | 61 static v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace WebCore | 64 } // namespace blink |
65 | 65 |
66 #endif // V8ThrowException_h | 66 #endif // V8ThrowException_h |
OLD | NEW |