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

Side by Side Diff: sky/engine/bindings2/exception_state_placeholder.h

Issue 918333002: Add the c++ code part of bindings2/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updated per earlier reviews Created 5 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_BINDINGS2_EXCEPTION_STATE_PLACEHOLDER_H_
6 #define SKY_ENGINE_BINDINGS2_EXCEPTION_STATE_PLACEHOLDER_H_
7
8 #include "sky/engine/bindings2/exception_state.h"
9 #include "sky/engine/wtf/Assertions.h"
10
11 namespace blink {
12
13 class IgnorableExceptionState final : public ExceptionState {
14 public:
15 ExceptionState& ReturnThis() { return *this; }
16 };
17
18 #define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().ReturnThis())
19
20 #if ENABLE(ASSERT)
21
22 class NoExceptionStateAssertionChecker final : public ExceptionState {
23 public:
24 NoExceptionStateAssertionChecker(const char* file, int line);
25 ExceptionState& ReturnThis() { return *this; }
26 };
27
28 #define ASSERT_NO_EXCEPTION \
29 (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).ReturnThis())
30
31 #else
32
33 #define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().ReturnThis())
34
35 #endif
36
37 } // namespace blink
38
39 #endif // SKY_ENGINE_BINDINGS2_EXCEPTION_STATE_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « sky/engine/bindings2/exception_state.cc ('k') | sky/engine/bindings2/exception_state_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698