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

Side by Side Diff: include/v8.h

Issue 11087020: Add an API to let the embedder associate arbitrary data with a v8::Context. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Add an API to let the embedder associate arbitrary data with a v8::Context. Created 8 years, 2 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 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after
3715 3715
3716 /** 3716 /**
3717 * Associate an additional data object with the context. This is mainly used 3717 * Associate an additional data object with the context. This is mainly used
3718 * with the debugger to provide additional information on the context through 3718 * with the debugger to provide additional information on the context through
3719 * the debugger API. 3719 * the debugger API.
3720 */ 3720 */
3721 void SetData(Handle<Value> data); 3721 void SetData(Handle<Value> data);
3722 Local<Value> GetData(); 3722 Local<Value> GetData();
3723 3723
3724 /** 3724 /**
3725 * Associate an opaque pointer with the context. This pointer can be used by
3726 * the embedder to associate additional state with the context.
3727 */
3728 void SetEmbedderData(void* data);
3729 void* GetEmbedderData();
3730
3731 /**
3725 * Control whether code generation from strings is allowed. Calling 3732 * Control whether code generation from strings is allowed. Calling
3726 * this method with false will disable 'eval' and the 'Function' 3733 * this method with false will disable 'eval' and the 'Function'
3727 * constructor for code running in this context. If 'eval' or the 3734 * constructor for code running in this context. If 'eval' or the
3728 * 'Function' constructor are used an exception will be thrown. 3735 * 'Function' constructor are used an exception will be thrown.
3729 * 3736 *
3730 * If code generation from strings is not allowed the 3737 * If code generation from strings is not allowed the
3731 * V8::AllowCodeGenerationFromStrings callback will be invoked if 3738 * V8::AllowCodeGenerationFromStrings callback will be invoked if
3732 * set before blocking the call to 'eval' or the 'Function' 3739 * set before blocking the call to 'eval' or the 'Function'
3733 * constructor. If that callback returns true, the call will be 3740 * constructor. If that callback returns true, the call will be
3734 * allowed, otherwise an exception will be thrown. If no callback is 3741 * allowed, otherwise an exception will be thrown. If no callback is
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
4654 4661
4655 4662
4656 } // namespace v8 4663 } // namespace v8
4657 4664
4658 4665
4659 #undef V8EXPORT 4666 #undef V8EXPORT
4660 #undef TYPE_CHECK 4667 #undef TYPE_CHECK
4661 4668
4662 4669
4663 #endif // V8_H_ 4670 #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