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 27 matching lines...) Expand all Loading... |
38 v8GeneralError | 38 v8GeneralError |
39 }; | 39 }; |
40 | 40 |
41 class V8ThrowException { | 41 class V8ThrowException { |
42 public: | 42 public: |
43 | 43 |
44 static v8::Handle<v8::Value> createDOMException(int ec, v8::Isolate* isolate
) | 44 static v8::Handle<v8::Value> createDOMException(int ec, v8::Isolate* isolate
) |
45 { | 45 { |
46 return createDOMException(ec, String(), isolate); | 46 return createDOMException(ec, String(), isolate); |
47 } | 47 } |
48 static v8::Handle<v8::Value> createDOMException(int, const String&, v8::Isol
ate*); | 48 static v8::Handle<v8::Value> createDOMException(int ec, const String& messag
e, v8::Isolate* isolate) |
| 49 { |
| 50 return createDOMException(ec, message, String(), isolate); |
| 51 } |
| 52 static v8::Handle<v8::Value> createDOMException(int, const String& sanitized
Message, const String& unsanitizedMessage, v8::Isolate*); |
49 | 53 |
50 static v8::Handle<v8::Value> throwDOMException(int ec, v8::Isolate* isolate) | 54 static v8::Handle<v8::Value> throwDOMException(int ec, v8::Isolate* isolate) |
51 { | 55 { |
52 return throwDOMException(ec, String(), isolate); | 56 return throwDOMException(ec, String(), isolate); |
53 } | 57 } |
54 static v8::Handle<v8::Value> throwDOMException(int, const String&, v8::Isola
te*); | 58 static v8::Handle<v8::Value> throwDOMException(int ec, const String& message
, v8::Isolate* isolate) |
| 59 { |
| 60 return throwDOMException(ec, message, String(), isolate); |
| 61 } |
| 62 static v8::Handle<v8::Value> throwDOMException(int, const String& sanitizedM
essage, const String& unsanitizedMessage, v8::Isolate*); |
55 | 63 |
56 static v8::Handle<v8::Value> createError(V8ErrorType, const String&, v8::Iso
late*); | 64 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*); | 65 static v8::Handle<v8::Value> throwError(V8ErrorType, const String&, v8::Isol
ate*); |
58 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>); | 66 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>); |
59 | 67 |
60 static v8::Handle<v8::Value> createTypeError(const String&, v8::Isolate*); | 68 static v8::Handle<v8::Value> createTypeError(const String&, v8::Isolate*); |
61 static v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); | 69 static v8::Handle<v8::Value> throwTypeError(const String&, v8::Isolate*); |
62 | 70 |
63 static v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); | 71 static v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); |
64 }; | 72 }; |
65 | 73 |
66 } // namespace WebCore | 74 } // namespace WebCore |
67 | 75 |
68 #endif // V8ThrowException_h | 76 #endif // V8ThrowException_h |
OLD | NEW |