Restore a document.isActive() check to fix perf regression

https://codereview.chromium.org/200923002/diff/380001/Source/core/loader/ImageLoader.cpp
moved a document.isActive() check elsewhere, leading to us doing more work
for non-active documents. This caused a big perf regression for the bloat test.

This patch restores that check to fix the regression.

BUG=372971
R=japhet@chromium.org
CC=yoav@yoav.ws

Review URL: https://codereview.chromium.org/343513003

git-svn-id: svn://svn.chromium.org/blink/trunk@176488 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent dbe9dd50
...@@ -175,6 +175,8 @@ void ImageLoader::doUpdateFromElement(bool bypassMainWorldCSP) ...@@ -175,6 +175,8 @@ void ImageLoader::doUpdateFromElement(bool bypassMainWorldCSP)
delayLoad.swap(m_delayLoad); delayLoad.swap(m_delayLoad);
Document& document = m_element->document(); Document& document = m_element->document();
if (!document.isActive())
return;
AtomicString attr = m_element->imageSourceURL(); AtomicString attr = m_element->imageSourceURL();
......
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