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

Side by Side Diff: include/v8.h

Issue 15837007: remove use of context scope with persistent argument (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 | samples/lineprocessor.cc » ('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 4911 matching lines...) Expand 10 before | Expand all | Expand 10 after
4922 4922
4923 /** 4923 /**
4924 * Stack-allocated class which sets the execution context for all 4924 * Stack-allocated class which sets the execution context for all
4925 * operations executed within a local scope. 4925 * operations executed within a local scope.
4926 */ 4926 */
4927 class Scope { 4927 class Scope {
4928 public: 4928 public:
4929 explicit V8_INLINE(Scope(Handle<Context> context)) : context_(context) { 4929 explicit V8_INLINE(Scope(Handle<Context> context)) : context_(context) {
4930 context_->Enter(); 4930 context_->Enter();
4931 } 4931 }
4932 // TODO(dcarney): deprecate
4932 V8_INLINE(Scope(Isolate* isolate, Persistent<Context>& context)) // NOLINT 4933 V8_INLINE(Scope(Isolate* isolate, Persistent<Context>& context)) // NOLINT
4933 #ifndef V8_USE_UNSAFE_HANDLES 4934 #ifndef V8_USE_UNSAFE_HANDLES
4934 : context_(Handle<Context>::New(isolate, context)) { 4935 : context_(Handle<Context>::New(isolate, context)) {
4935 #else 4936 #else
4936 : context_(Local<Context>::New(isolate, context)) { 4937 : context_(Local<Context>::New(isolate, context)) {
4937 #endif 4938 #endif
4938 context_->Enter(); 4939 context_->Enter();
4939 } 4940 }
4940 V8_INLINE(~Scope()) { context_->Exit(); } 4941 V8_INLINE(~Scope()) { context_->Exit(); }
4941 4942
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
6325 6326
6326 6327
6327 } // namespace v8 6328 } // namespace v8
6328 6329
6329 6330
6330 #undef V8EXPORT 6331 #undef V8EXPORT
6331 #undef TYPE_CHECK 6332 #undef TYPE_CHECK
6332 6333
6333 6334
6334 #endif // V8_H_ 6335 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | samples/lineprocessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698