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

Side by Side Diff: include/v8.h

Issue 15691017: Make assertion scopes thread safe. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | src/accessors.cc » ('j') | src/api.cc » ('J')
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 4140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4151 }; 4151 };
4152 4152
4153 4153
4154 /** 4154 /**
4155 * Asserts that no action is performed that could cause a handle's value 4155 * Asserts that no action is performed that could cause a handle's value
4156 * to be modified. Useful when otherwise unsafe handle operations need to 4156 * to be modified. Useful when otherwise unsafe handle operations need to
4157 * be performed. 4157 * be performed.
4158 */ 4158 */
4159 class V8EXPORT AssertNoGCScope { 4159 class V8EXPORT AssertNoGCScope {
4160 #ifndef DEBUG 4160 #ifndef DEBUG
4161 V8_INLINE(AssertNoGCScope(Isolate* isolate)) {} 4161 // TODO(yangguo): remove isolate argument.
4162 V8_INLINE(AssertNoGCScope(Isolate* isolate)) { }
4162 #else 4163 #else
4163 AssertNoGCScope(Isolate* isolate); 4164 AssertNoGCScope(Isolate* isolate);
4164 ~AssertNoGCScope(); 4165 ~AssertNoGCScope();
4165 private: 4166 private:
4166 Isolate* isolate_; 4167 void* disallow_heap_allocation_;
4167 bool last_state_;
4168 #endif 4168 #endif
4169 }; 4169 };
4170 4170
4171 4171
4172 /** 4172 /**
4173 * Container class for static utility functions. 4173 * Container class for static utility functions.
4174 */ 4174 */
4175 class V8EXPORT V8 { 4175 class V8EXPORT V8 {
4176 public: 4176 public:
4177 /** Set the callback to invoke in case of fatal errors. */ 4177 /** Set the callback to invoke in case of fatal errors. */
(...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after
6303 6303
6304 6304
6305 } // namespace v8 6305 } // namespace v8
6306 6306
6307 6307
6308 #undef V8EXPORT 6308 #undef V8EXPORT
6309 #undef TYPE_CHECK 6309 #undef TYPE_CHECK
6310 6310
6311 6311
6312 #endif // V8_H_ 6312 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/accessors.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698