| Index: third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
|
| index ad5ca71890b36167e71eb14e29d247bfaedb597c..41eea215dc4996d2929366ece7f75ec996082549 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
|
| @@ -103,4 +103,25 @@ ScriptState* ScriptState::forWorld(LocalFrame* frame, DOMWrapperWorld& world) {
|
| return scriptState;
|
| }
|
|
|
| +ScriptStateForErrorEvent::Scope::Scope(ScriptState* scriptState,
|
| + v8::Local<v8::Context> context)
|
| + : m_scriptState(scriptState) {
|
| + ExecutionContext* executionContext = m_scriptState->getExecutionContext();
|
| + RefPtr<ScriptStateForErrorEvent> scriptStateForErrorEvent =
|
| + ScriptStateForErrorEvent::create(context);
|
| + executionContext->setErrorEventScriptState(scriptStateForErrorEvent);
|
| +}
|
| +
|
| +ScriptStateForErrorEvent::Scope::~Scope() {
|
| + ExecutionContext* executionContext = m_scriptState->getExecutionContext();
|
| + executionContext->clearErrorEventScriptState();
|
| +}
|
| +
|
| +PassRefPtr<ScriptStateForErrorEvent> ScriptStateForErrorEvent::create(
|
| + v8::Local<v8::Context> context) {
|
| + RefPtr<ScriptStateForErrorEvent> scriptState =
|
| + adoptRef(new ScriptStateForErrorEvent(context));
|
| + return scriptState;
|
| +}
|
| +
|
| } // namespace blink
|
|
|