| Index: third_party/WebKit/Source/core/frame/DOMTimer.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/DOMTimer.cpp b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
|
| index 78da1a72b2de6f537282463ed404223098a766dc..89c2e03fa1128eae7c90d76d9698735d3621edd9 100644
|
| --- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
|
| @@ -72,6 +72,10 @@ DOMTimer::DOMTimer(ExecutionContext* context, PassOwnPtrWillBeRawPtr<ScheduledAc
|
| , m_nestingLevel(context->timers()->timerNestingLevel() + 1)
|
| , m_action(action)
|
| {
|
| + // Store the creating worldId, as the timer is fired in the main world.
|
| + ASSERT(v8::Isolate::GetCurrent()->InContext());
|
| + m_originWorldId = DOMWrapperWorld::current(v8::Isolate::GetCurrent()).originWorldId();
|
| +
|
| ASSERT(timeoutID > 0);
|
| if (shouldForwardUserGesture(interval, m_nestingLevel))
|
| m_userGestureToken = UserGestureIndicator::currentToken();
|
| @@ -104,6 +108,8 @@ void DOMTimer::fired()
|
| ASSERT(!context->activeDOMObjectsAreSuspended());
|
| // Only the first execution of a multi-shot timer should get an affirmative user gesture indicator.
|
| UserGestureIndicator gestureIndicator(m_userGestureToken.release());
|
| + // Ensure the parent world id gets propagated to the action and is reset afterwards.
|
| + DOMWrapperWorld::ParentWorldIdPusher worldIdPusher(ScriptState::forMainWorld(toDocument(context)->frame())->world(), m_originWorldId);
|
|
|
| TRACE_EVENT1("devtools.timeline", "TimerFire", "data", InspectorTimerFireEvent::data(context, m_timeoutID));
|
| InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireTimer(context, m_timeoutID);
|
|
|