Chromium Code Reviews| Index: third_party/WebKit/Source/core/timing/Performance.cpp |
| diff --git a/third_party/WebKit/Source/core/timing/Performance.cpp b/third_party/WebKit/Source/core/timing/Performance.cpp |
| index 1268af74dea9766c2a8dd56aa5082710f4045297..4d4c7aff5290929a4d8e021f12dd9ded83e68b8b 100644 |
| --- a/third_party/WebKit/Source/core/timing/Performance.cpp |
| +++ b/third_party/WebKit/Source/core/timing/Performance.cpp |
| @@ -186,7 +186,7 @@ static bool canAccessOrigin(Frame* frame1, Frame* frame2) { |
| std::pair<String, DOMWindow*> Performance::sanitizedAttribution( |
| ExecutionContext* taskContext, |
| bool hasMultipleContexts, |
| - Frame* observerFrame) { |
| + LocalFrame* observerFrame) { |
| if (hasMultipleContexts) { |
| // Unable to attribute, multiple script execution contents were involved. |
| return std::make_pair(kAmbiguousAttribution, nullptr); |
| @@ -237,12 +237,13 @@ void Performance::reportLongTask(double startTime, |
| std::pair<String, DOMWindow*> attribution = Performance::sanitizedAttribution( |
| taskContext, hasMultipleContexts, frame()); |
| DOMWindow* culpritDomWindow = attribution.second; |
| - if (!culpritDomWindow || !culpritDomWindow->document() || |
| - !culpritDomWindow->document()->localOwner()) { |
| - addLongTaskTiming(startTime, endTime, attribution.first, "", "", ""); |
| + if (!culpritDomWindow || !culpritDomWindow->frame() || |
| + !culpritDomWindow->frame()->deprecatedLocalOwner()) { |
| + addLongTaskTiming(startTime, endTime, attribution.first, emptyString(), |
| + emptyString(), emptyString()); |
|
dcheng
2017/02/01 07:22:59
To avoid constructing three new empty strings.
|
| } else { |
| HTMLFrameOwnerElement* frameOwner = |
| - culpritDomWindow->document()->localOwner(); |
| + culpritDomWindow->frame()->deprecatedLocalOwner(); |
| addLongTaskTiming(startTime, endTime, attribution.first, |
| getFrameAttribute(frameOwner, HTMLNames::srcAttr, false), |
| getFrameAttribute(frameOwner, HTMLNames::idAttr, false), |