| Index: third_party/WebKit/Source/bindings/core/v8/ScriptState.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
|
| index b0b0fd8530be5f9b3711f8272a63d42d98737c63..c634fbd35eef854a9885f6e9ecad205868f0e654 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
|
| @@ -183,6 +183,34 @@ class ScriptStateProtectingContext {
|
| ScopedPersistent<v8::Context> m_context;
|
| };
|
|
|
| +class ScriptStateForErrorEvent : public RefCounted<ScriptStateForErrorEvent> {
|
| + public:
|
| + class Scope {
|
| + STACK_ALLOCATED();
|
| +
|
| + public:
|
| + explicit Scope(ScriptState*, v8::Local<v8::Context>);
|
| + ~Scope();
|
| +
|
| + private:
|
| + RefPtr<ScriptState> m_scriptState;
|
| + };
|
| +
|
| + static PassRefPtr<ScriptStateForErrorEvent> create(v8::Local<v8::Context>);
|
| + ScriptState* scriptState() {
|
| + return ScriptState::from(m_context.newLocal(m_isolate));
|
| + }
|
| + v8::Local<v8::Context> context() const {
|
| + return m_context.newLocal(m_isolate);
|
| + }
|
| +
|
| + private:
|
| + ScriptStateForErrorEvent(v8::Local<v8::Context> context)
|
| + : m_isolate(context->GetIsolate()), m_context(m_isolate, context) {}
|
| + v8::Isolate* m_isolate;
|
| + ScopedPersistent<v8::Context> m_context;
|
| +};
|
| +
|
| } // namespace blink
|
|
|
| #endif // ScriptState_h
|
|
|