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

Side by Side Diff: include/v8.h

Issue 9223016: Add a getter for value set with AllowCodeGenerationFromStrings (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 10 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3521 matching lines...) Expand 10 before | Expand all | Expand 10 after
3532 * If code generation from strings is not allowed the 3532 * If code generation from strings is not allowed the
3533 * V8::AllowCodeGenerationFromStrings callback will be invoked if 3533 * V8::AllowCodeGenerationFromStrings callback will be invoked if
3534 * set before blocking the call to 'eval' or the 'Function' 3534 * set before blocking the call to 'eval' or the 'Function'
3535 * constructor. If that callback returns true, the call will be 3535 * constructor. If that callback returns true, the call will be
3536 * allowed, otherwise an exception will be thrown. If no callback is 3536 * allowed, otherwise an exception will be thrown. If no callback is
3537 * set an exception will be thrown. 3537 * set an exception will be thrown.
3538 */ 3538 */
3539 void AllowCodeGenerationFromStrings(bool allow); 3539 void AllowCodeGenerationFromStrings(bool allow);
3540 3540
3541 /** 3541 /**
3542 * Returns true if code generation from strings is allowed for the context.
3543 * For more details see AllowCodeGenerationFromStrings(bool) documentation.
3544 */
3545 bool IsCodeGenerationFromStringsAllowed();
3546
3547 /**
3542 * Stack-allocated class which sets the execution context for all 3548 * Stack-allocated class which sets the execution context for all
3543 * operations executed within a local scope. 3549 * operations executed within a local scope.
3544 */ 3550 */
3545 class Scope { 3551 class Scope {
3546 public: 3552 public:
3547 explicit inline Scope(Handle<Context> context) : context_(context) { 3553 explicit inline Scope(Handle<Context> context) : context_(context) {
3548 context_->Enter(); 3554 context_->Enter();
3549 } 3555 }
3550 inline ~Scope() { context_->Exit(); } 3556 inline ~Scope() { context_->Exit(); }
3551 private: 3557 private:
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 4282
4277 4283
4278 } // namespace v8 4284 } // namespace v8
4279 4285
4280 4286
4281 #undef V8EXPORT 4287 #undef V8EXPORT
4282 #undef TYPE_CHECK 4288 #undef TYPE_CHECK
4283 4289
4284 4290
4285 #endif // V8_H_ 4291 #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