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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 return loader->timing().referenceMonotonicTime(); | 100 return loader->timing().referenceMonotonicTime(); |
101 } | 101 } |
102 | 102 |
103 Performance::Performance(LocalFrame* frame) | 103 Performance::Performance(LocalFrame* frame) |
104 : PerformanceBase( | 104 : PerformanceBase( |
105 toTimeOrigin(frame), | 105 toTimeOrigin(frame), |
106 TaskRunnerHelper::get(TaskType::PerformanceTimeline, frame)), | 106 TaskRunnerHelper::get(TaskType::PerformanceTimeline, frame)), |
107 ContextLifecycleObserver(frame ? frame->document() : nullptr) {} | 107 ContextLifecycleObserver(frame ? frame->document() : nullptr) {} |
108 | 108 |
109 Performance::~Performance() { | 109 Performance::~Performance() {} |
110 } | |
111 | 110 |
112 void Performance::contextDestroyed(ExecutionContext* destroyedContext) { | 111 void Performance::contextDestroyed(ExecutionContext* destroyedContext) { |
113 toDocument(destroyedContext) | 112 toDocument(destroyedContext) |
114 ->frame() | 113 ->frame() |
115 ->performanceMonitor() | 114 ->performanceMonitor() |
116 ->unsubscribeAll(this); | 115 ->unsubscribeAll(this); |
117 } | 116 } |
118 | 117 |
119 ExecutionContext* Performance::getExecutionContext() const { | 118 ExecutionContext* Performance::getExecutionContext() const { |
120 if (!frame()) | 119 if (!frame()) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 HTMLFrameOwnerElement* frameOwner = | 243 HTMLFrameOwnerElement* frameOwner = |
245 culpritDomWindow->frame()->deprecatedLocalOwner(); | 244 culpritDomWindow->frame()->deprecatedLocalOwner(); |
246 addLongTaskTiming(startTime, endTime, attribution.first, | 245 addLongTaskTiming(startTime, endTime, attribution.first, |
247 getFrameAttribute(frameOwner, HTMLNames::srcAttr, false), | 246 getFrameAttribute(frameOwner, HTMLNames::srcAttr, false), |
248 getFrameAttribute(frameOwner, HTMLNames::idAttr, false), | 247 getFrameAttribute(frameOwner, HTMLNames::idAttr, false), |
249 getFrameAttribute(frameOwner, HTMLNames::nameAttr, true)); | 248 getFrameAttribute(frameOwner, HTMLNames::nameAttr, true)); |
250 } | 249 } |
251 } | 250 } |
252 | 251 |
253 } // namespace blink | 252 } // namespace blink |
OLD | NEW |