OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3289 */ | 3289 */ |
3290 void SetData(Handle<String> data); | 3290 void SetData(Handle<String> data); |
3291 Local<Value> GetData(); | 3291 Local<Value> GetData(); |
3292 | 3292 |
3293 /** | 3293 /** |
3294 * Stack-allocated class which sets the execution context for all | 3294 * Stack-allocated class which sets the execution context for all |
3295 * operations executed within a local scope. | 3295 * operations executed within a local scope. |
3296 */ | 3296 */ |
3297 class Scope { | 3297 class Scope { |
3298 public: | 3298 public: |
3299 inline Scope(Handle<Context> context) : context_(context) { | 3299 explicit inline Scope(Handle<Context> context) : context_(context) { |
3300 context_->Enter(); | 3300 context_->Enter(); |
3301 } | 3301 } |
3302 inline ~Scope() { context_->Exit(); } | 3302 inline ~Scope() { context_->Exit(); } |
3303 private: | 3303 private: |
3304 Handle<Context> context_; | 3304 Handle<Context> context_; |
3305 }; | 3305 }; |
3306 | 3306 |
3307 private: | 3307 private: |
3308 friend class Value; | 3308 friend class Value; |
3309 friend class Script; | 3309 friend class Script; |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 | 3991 |
3992 | 3992 |
3993 } // namespace v8 | 3993 } // namespace v8 |
3994 | 3994 |
3995 | 3995 |
3996 #undef V8EXPORT | 3996 #undef V8EXPORT |
3997 #undef TYPE_CHECK | 3997 #undef TYPE_CHECK |
3998 | 3998 |
3999 | 3999 |
4000 #endif // V8_H_ | 4000 #endif // V8_H_ |
OLD | NEW |