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

Side by Side Diff: include/v8.h

Issue 6820028: Mark single-argument inline constructors as 'explicit'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/api.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 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698