Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp |
| index d4d32c6749437e38d57849201899e8c3ccbee2a7..03b426601ebdf3c1c438d05ee228fbc7cf5edede 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp |
| @@ -9,6 +9,7 @@ |
| #include "core/dom/Document.h" |
| #include "core/dom/Element.h" |
| #include "core/dom/PendingScript.h" |
| +#include "core/fetch/CachedMetadata.h" |
| #include "core/fetch/ScriptResource.h" |
| #include "core/frame/Settings.h" |
| #include "core/html/parser/TextResourceDecoder.h" |
| @@ -288,7 +289,8 @@ private: |
| } |
| CachedMetadataHandler* cacheHandler = streamer->resource()->cacheHandler(); |
| - if (cacheHandler && cacheHandler->cachedMetadata(V8ScriptRunner::tagForCodeCache(cacheHandler))) { |
| + RefPtr<CachedMetadata> codeCache(cacheHandler ? cacheHandler->cachedMetadata(V8ScriptRunner::tagForCodeCache(cacheHandler)) : nullptr); |
| + if (codeCache.get()) { |
|
hiroshige
2016/08/25 12:48:11
We can remove .get() here.
|
| // The resource has a code cache, so it's unnecessary to stream and |
| // parse the code. Cancel the streaming and resume the non-streaming |
| // code path. |