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

Side by Side Diff: src/isolate.h

Issue 247013002: Replaced empty handle checks with MaybeHandles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed unnecessary assert. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/jsregexp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // TODO(yangguo): Remove after we completely changed to MaybeHandles. 128 // TODO(yangguo): Remove after we completely changed to MaybeHandles.
129 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ 129 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \
130 do { \ 130 do { \
131 if ((call).is_null()) { \ 131 if ((call).is_null()) { \
132 ASSERT((isolate)->has_pending_exception()); \ 132 ASSERT((isolate)->has_pending_exception()); \
133 return (value); \ 133 return (value); \
134 } \ 134 } \
135 } while (false) 135 } while (false)
136 136
137 // TODO(yangguo): Remove after we completely changed to MaybeHandles. 137 // TODO(yangguo): Remove after we completely changed to MaybeHandles.
138 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \
139 do { \
140 ASSERT(!(isolate)->has_pending_exception()); \
141 CHECK(!(call).is_null()); \
142 } while (false)
143
144 // TODO(yangguo): Remove after we completely changed to MaybeHandles.
145 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ 138 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
146 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) 139 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
147 140
148 141
149 // Macros for MaybeHandle. 142 // Macros for MaybeHandle.
150 143
151 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ 144 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \
152 do { \ 145 do { \
153 Isolate* __isolate__ = (isolate); \ 146 Isolate* __isolate__ = (isolate); \
154 if (__isolate__->has_scheduled_exception()) { \ 147 if (__isolate__->has_scheduled_exception()) { \
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 } 1537 }
1545 1538
1546 EmbeddedVector<char, 128> filename_; 1539 EmbeddedVector<char, 128> filename_;
1547 FILE* file_; 1540 FILE* file_;
1548 int scope_depth_; 1541 int scope_depth_;
1549 }; 1542 };
1550 1543
1551 } } // namespace v8::internal 1544 } } // namespace v8::internal
1552 1545
1553 #endif // V8_ISOLATE_H_ 1546 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698