Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 CodeGenerationFromStringsAllowed(); | |
|
danno
2012/02/01 12:33:37
Should be called "IsCodeGenerateFromStringsAllowed
yurys
2012/02/01 12:58:08
Done.
| |
| 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 Loading... | |
| 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_ |
| OLD | NEW |