Commit 18502d9c authored by haraken's avatar haraken Committed by Commit bot

Remove performanceMonitor()->unsubscribeAll() from Performance's destructor

Performance object is on Oilpan's heap, so its destructor is not allowed to touch
other on-heap objects.

Also we don't need to call performanceMonitor()->unsubscribeAll() because it is
just unregistering a back pointer Member to the Performance object from the map
in PerformanceMonitor.

BUG=

Review-Url: https://codereview.chromium.org/2584733003
Cr-Commit-Position: refs/heads/master@{#439081}
parent fd697d66
...@@ -104,8 +104,9 @@ Performance::Performance(LocalFrame* frame) ...@@ -104,8 +104,9 @@ Performance::Performance(LocalFrame* frame)
ContextLifecycleObserver(frame ? frame->document() : nullptr) {} ContextLifecycleObserver(frame ? frame->document() : nullptr) {}
Performance::~Performance() { Performance::~Performance() {
if (frame()) // contextDestryoed() should have been called and the performance
frame()->performanceMonitor()->unsubscribeAll(this); // monitors should have been unsubscribed.
DCHECK(!frame());
} }
void Performance::contextDestroyed() { void Performance::contextDestroyed() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment