Index: Source/bindings/core/v8/V8TestingScope.h |
diff --git a/Source/bindings/core/v8/V8TestingScope.h b/Source/bindings/core/v8/V8TestingScope.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..50a42904239f9f39dd8220408e4f79d446175008 |
--- /dev/null |
+++ b/Source/bindings/core/v8/V8TestingScope.h |
@@ -0,0 +1,29 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8TestingScope_h |
+#define V8TestingScope_h |
+ |
+#include "bindings/core/v8/ScriptState.h" |
+ |
+#include <v8.h> |
+ |
+namespace blink { |
+ |
+class V8TestingScope { |
+public: |
+ explicit V8TestingScope(v8::Isolate*); |
+ ScriptState* scriptState() const; |
+ v8::Isolate* isolate() const; |
+ ~V8TestingScope(); |
+ |
+private: |
+ v8::HandleScope m_handleScope; |
+ v8::Context::Scope m_contextScope; |
+ RefPtr<ScriptState> m_scriptState; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // V8TestingScope_h |