Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
index bb9636af37b7d74ae186133ff694896c460ff612..a1c993c8a2ca6c3514fa7ec3cdbd116db5640022 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
@@ -121,6 +121,9 @@ void WindowProxy::disposeContext(GlobalDetachmentBehavior behavior) |
m_scriptState->disposePerContextData(); |
+ if (ThreadState::current()) |
+ ThreadState::current()->v8ContextDisposed(); |
+ |
// It's likely that disposing the context has created a lot of |
// garbage. Notify V8 about this so it'll have a chance of cleaning |
// it up when idle. |
@@ -328,6 +331,9 @@ void WindowProxy::createContext() |
return; |
m_scriptState = ScriptState::create(context, m_world); |
+ if (ThreadState::current()) |
+ ThreadState::current()->v8ContextCreated(); |
+ |
double contextCreationDurationInMilliseconds = (currentTime() - contextCreationStartInSeconds) * 1000; |
const char* histogramName = "WebCore.WindowProxy.createContext.MainWorld"; |
if (!m_world->isMainWorld()) |