| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |