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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp

Issue 2298753002: binding: Updates ExceptionStatePlaceholder according to ExceptionState. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 31 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 #if ENABLE(ASSERT) 35 #if ENABLE(ASSERT)
36 36
37 NoExceptionStateAssertionChecker::NoExceptionStateAssertionChecker(const char* f ile, int line) 37 NoExceptionStateAssertionChecker::NoExceptionStateAssertionChecker(const char* f ile, int line)
38 : ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Local<v8::Object> (), 0) 38 : ExceptionState(nullptr, ExceptionState::UnknownContext, nullptr, nullptr)
39 , m_file(file) 39 , m_file(file)
40 , m_line(line) { } 40 , m_line(line) { }
41 41
42 void NoExceptionStateAssertionChecker::throwDOMException(const ExceptionCode&, c onst String&) 42 void NoExceptionStateAssertionChecker::throwDOMException(const ExceptionCode&, c onst String&)
43 { 43 {
44 DCHECK_AT(false, m_file, m_line) << "DOMExeption should not be thrown."; 44 DCHECK_AT(false, m_file, m_line) << "DOMExeption should not be thrown.";
45 } 45 }
46 46
47 void NoExceptionStateAssertionChecker::throwTypeError(const String&) 47 void NoExceptionStateAssertionChecker::throwRangeError(const String& message)
48 { 48 {
49 DCHECK_AT(false, m_file, m_line) << "TypeError should not be thrown."; 49 DCHECK_AT(false, m_file, m_line) << "RangeError should not be thrown.";
50 } 50 }
51 51
52 void NoExceptionStateAssertionChecker::throwSecurityError(const String&, const S tring&) 52 void NoExceptionStateAssertionChecker::throwSecurityError(const String&, const S tring&)
53 { 53 {
54 DCHECK_AT(false, m_file, m_line) << "SecurityError should not be thrown."; 54 DCHECK_AT(false, m_file, m_line) << "SecurityError should not be thrown.";
55 } 55 }
56 56
57 void NoExceptionStateAssertionChecker::throwTypeError(const String&)
58 {
59 DCHECK_AT(false, m_file, m_line) << "TypeError should not be thrown.";
60 }
61
62 void NoExceptionStateAssertionChecker::rethrowV8Exception(v8::Local<v8::Value>)
63 {
64 DCHECK_AT(false, m_file, m_line) << "An exception should not be rethrown.";
65 }
66
57 #endif 67 #endif
58 68
59 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698