| OLD | NEW |
| 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 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4114 }; | 4114 }; |
| 4115 | 4115 |
| 4116 | 4116 |
| 4117 /** | 4117 /** |
| 4118 * Assert that no Javascript code is invoked. | 4118 * Assert that no Javascript code is invoked. |
| 4119 */ | 4119 */ |
| 4120 class DisallowJavascriptExecutionScope { | 4120 class DisallowJavascriptExecutionScope { |
| 4121 public: | 4121 public: |
| 4122 enum OnFailure { CRASH_ON_FAILURE, THROW_ON_FAILURE }; | 4122 enum OnFailure { CRASH_ON_FAILURE, THROW_ON_FAILURE }; |
| 4123 | 4123 |
| 4124 explicit DisallowJavascriptExecutionScope(Isolate* isolate, | 4124 DisallowJavascriptExecutionScope(Isolate* isolate, OnFailure on_failure); |
| 4125 OnFailure on_failure); | |
| 4126 ~DisallowJavascriptExecutionScope(); | 4125 ~DisallowJavascriptExecutionScope(); |
| 4127 | 4126 |
| 4128 private: | 4127 private: |
| 4129 bool on_failure_; | 4128 bool on_failure_; |
| 4130 void* internal_; | 4129 void* internal_; |
| 4131 | 4130 |
| 4132 // Prevent copying of Scope objects. | 4131 // Prevent copying of Scope objects. |
| 4133 DisallowJavascriptExecutionScope(const DisallowJavascriptExecutionScope&); | 4132 DisallowJavascriptExecutionScope(const DisallowJavascriptExecutionScope&); |
| 4134 DisallowJavascriptExecutionScope& operator=( | 4133 DisallowJavascriptExecutionScope& operator=( |
| 4135 const DisallowJavascriptExecutionScope&); | 4134 const DisallowJavascriptExecutionScope&); |
| (...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6612 */ | 6611 */ |
| 6613 | 6612 |
| 6614 | 6613 |
| 6615 } // namespace v8 | 6614 } // namespace v8 |
| 6616 | 6615 |
| 6617 | 6616 |
| 6618 #undef TYPE_CHECK | 6617 #undef TYPE_CHECK |
| 6619 | 6618 |
| 6620 | 6619 |
| 6621 #endif // V8_H_ | 6620 #endif // V8_H_ |
| OLD | NEW |