Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/timing/Performance.cpp

Issue 2470183002: Fix vcall on nullptr in ~Performance. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 return loader->timing().referenceMonotonicTime(); 57 return loader->timing().referenceMonotonicTime();
58 } 58 }
59 59
60 Performance::Performance(LocalFrame* frame) 60 Performance::Performance(LocalFrame* frame)
61 : PerformanceBase(toTimeOrigin(frame)), 61 : PerformanceBase(toTimeOrigin(frame)),
62 DOMWindowProperty(frame), 62 DOMWindowProperty(frame),
63 m_observingLongTasks(false) {} 63 m_observingLongTasks(false) {}
64 64
65 Performance::~Performance() { 65 Performance::~Performance() {
66 if (!frame()) {
67 return;
68 }
66 LocalFrame* localRoot = frame()->localFrameRoot(); 69 LocalFrame* localRoot = frame()->localFrameRoot();
67 if (m_observingLongTasks && localRoot) { 70 if (m_observingLongTasks && localRoot) {
68 m_observingLongTasks = false; 71 m_observingLongTasks = false;
69 localRoot->disableInspectorWebPerfAgent(this); 72 localRoot->disableInspectorWebPerfAgent(this);
70 } 73 }
71 } 74 }
72 75
73 ExecutionContext* Performance::getExecutionContext() const { 76 ExecutionContext* Performance::getExecutionContext() const {
74 if (!frame()) 77 if (!frame())
75 return nullptr; 78 return nullptr;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 127 }
125 128
126 DEFINE_TRACE(Performance) { 129 DEFINE_TRACE(Performance) {
127 visitor->trace(m_navigation); 130 visitor->trace(m_navigation);
128 visitor->trace(m_timing); 131 visitor->trace(m_timing);
129 DOMWindowProperty::trace(visitor); 132 DOMWindowProperty::trace(visitor);
130 PerformanceBase::trace(visitor); 133 PerformanceBase::trace(visitor);
131 } 134 }
132 135
133 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698