Chromium Code Reviews| 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 e38ac74e6489aa12c3e4eb579ca5f997bd5976ab..b473d26bcd1ee414ace004b4c4ef82026609b651 100644 |
| --- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| +++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| @@ -157,8 +157,18 @@ void DOMTimer::fired() { |
| augmentRepeatInterval(minimumInterval - repeatInterval()); |
| } |
| + // Get ExecutionContext early as it might be cleared during |
| + // action->execute(). |
| + ExecutionContext* executionContext = getExecutionContext(); |
| + |
| // No access to member variables after this point, it can delete the timer. |
| m_action->execute(context); |
| + |
| + if (!executionContext) |
|
jochen (gone - plz use gerrit)
2017/02/15 10:35:12
I don't think that's possible?
Dan Elphick
2017/02/15 14:03:32
You're probably right - I was just playing it safe
|
| + return; |
| + |
| + executionContext->timers()->setTimerNestingLevel(0); |
| + |
| return; |
| } |