OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8TestingScope_h |
| 6 #define V8TestingScope_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptState.h" |
| 9 |
| 10 #include <v8.h> |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class V8TestingScope { |
| 15 public: |
| 16 explicit V8TestingScope(v8::Isolate*); |
| 17 ScriptState* scriptState() const; |
| 18 v8::Isolate* isolate() const; |
| 19 ~V8TestingScope(); |
| 20 |
| 21 private: |
| 22 v8::HandleScope m_handleScope; |
| 23 v8::Context::Scope m_contextScope; |
| 24 RefPtr<ScriptState> m_scriptState; |
| 25 }; |
| 26 |
| 27 } // namespace blink |
| 28 |
| 29 #endif // V8TestingScope_h |
OLD | NEW |