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

Side by Side Diff: include/v8.h

Issue 13940003: Move context retrieval method around. Use delegation for implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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.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 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 * is initialized. 3029 * is initialized.
3030 */ 3030 */
3031 HeapProfiler* GetHeapProfiler(); 3031 HeapProfiler* GetHeapProfiler();
3032 3032
3033 /** 3033 /**
3034 * Returns CPU profiler for this isolate. Will return NULL until the isolate 3034 * Returns CPU profiler for this isolate. Will return NULL until the isolate
3035 * is initialized. 3035 * is initialized.
3036 */ 3036 */
3037 CpuProfiler* GetCpuProfiler(); 3037 CpuProfiler* GetCpuProfiler();
3038 3038
3039 /** Returns the context that is on the top of the stack. */
3040 Local<Context> GetCurrentContext();
3041
3039 private: 3042 private:
3040 Isolate(); 3043 Isolate();
3041 Isolate(const Isolate&); 3044 Isolate(const Isolate&);
3042 ~Isolate(); 3045 ~Isolate();
3043 Isolate& operator=(const Isolate&); 3046 Isolate& operator=(const Isolate&);
3044 void* operator new(size_t size); 3047 void* operator new(size_t size);
3045 void operator delete(void*, size_t); 3048 void operator delete(void*, size_t);
3046 }; 3049 };
3047 3050
3048 3051
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3883 * and only object identify will remain. 3886 * and only object identify will remain.
3884 */ 3887 */
3885 static Persistent<Context> New( 3888 static Persistent<Context> New(
3886 ExtensionConfiguration* extensions = NULL, 3889 ExtensionConfiguration* extensions = NULL,
3887 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), 3890 Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
3888 Handle<Value> global_object = Handle<Value>()); 3891 Handle<Value> global_object = Handle<Value>());
3889 3892
3890 /** Returns the last entered context. */ 3893 /** Returns the last entered context. */
3891 static Local<Context> GetEntered(); 3894 static Local<Context> GetEntered();
3892 3895
3893 /** Returns the context that is on the top of the stack. */ 3896 // TODO(svenpanne) Actually deprecate this.
3897 /** Deprecated. Use Isolate::GetCurrentContext instead. */
3894 static Local<Context> GetCurrent(); 3898 static Local<Context> GetCurrent();
3895 static Local<Context> GetCurrent(Isolate* isolate);
3896 3899
3897 /** 3900 /**
3898 * Returns the context of the calling JavaScript code. That is the 3901 * Returns the context of the calling JavaScript code. That is the
3899 * context of the top-most JavaScript frame. If there are no 3902 * context of the top-most JavaScript frame. If there are no
3900 * JavaScript frames an empty handle is returned. 3903 * JavaScript frames an empty handle is returned.
3901 */ 3904 */
3902 static Local<Context> GetCalling(); 3905 static Local<Context> GetCalling();
3903 3906
3904 /** 3907 /**
3905 * Sets the security token for the context. To access an object in 3908 * Sets the security token for the context. To access an object in
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
5039 5042
5040 5043
5041 } // namespace v8 5044 } // namespace v8
5042 5045
5043 5046
5044 #undef V8EXPORT 5047 #undef V8EXPORT
5045 #undef TYPE_CHECK 5048 #undef TYPE_CHECK
5046 5049
5047 5050
5048 #endif // V8_H_ 5051 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698