| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2010 Google, Inc. All Rights Reserved. |    2  * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions |    5  * modification, are permitted provided that the following conditions | 
|    6  * are met: |    6  * are met: | 
|    7  * 1. Redistributions of source code must retain the above copyright |    7  * 1. Redistributions of source code must retain the above copyright | 
|    8  *    notice, this list of conditions and the following disclaimer. |    8  *    notice, this list of conditions and the following disclaimer. | 
|    9  * 2. Redistributions in binary form must reproduce the above copyright |    9  * 2. Redistributions in binary form must reproduce the above copyright | 
|   10  *    notice, this list of conditions and the following disclaimer in the |   10  *    notice, this list of conditions and the following disclaimer in the | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
|   27  |   27  | 
|   28 #include "bindings/core/v8/ScriptSourceCode.h" |   28 #include "bindings/core/v8/ScriptSourceCode.h" | 
|   29 #include "bindings/core/v8/ScriptStreamer.h" |   29 #include "bindings/core/v8/ScriptStreamer.h" | 
|   30 #include "core/dom/Element.h" |   30 #include "core/dom/Element.h" | 
|   31 #include "core/fetch/ScriptResource.h" |   31 #include "core/fetch/ScriptResource.h" | 
|   32 #include "core/frame/SubresourceIntegrity.h" |   32 #include "core/frame/SubresourceIntegrity.h" | 
|   33 #include "platform/SharedBuffer.h" |   33 #include "platform/SharedBuffer.h" | 
|   34  |   34  | 
|   35 namespace blink { |   35 namespace blink { | 
|   36  |   36  | 
|   37 PendingScript::PendingScript() |  | 
|   38     : m_watchingForLoad(false) |  | 
|   39     , m_startingPosition(TextPosition::belowRangePosition()) |  | 
|   40     , m_integrityFailure(false) |  | 
|   41 { |  | 
|   42 } |  | 
|   43  |  | 
|   44 PendingScript::PendingScript(Element* element, ScriptResource* resource) |   37 PendingScript::PendingScript(Element* element, ScriptResource* resource) | 
|   45     : m_watchingForLoad(false) |   38     : m_watchingForLoad(false) | 
|   46     , m_element(element) |   39     , m_element(element) | 
|   47     , m_integrityFailure(false) |   40     , m_integrityFailure(false) | 
|   48 { |   41 { | 
|   49     setScriptResource(resource); |   42     setScriptResource(resource); | 
|   50 } |   43 } | 
|   51  |   44  | 
|   52 PendingScript::PendingScript(const PendingScript& other) |  | 
|   53     : ResourceOwner(other) |  | 
|   54     , m_watchingForLoad(other.m_watchingForLoad) |  | 
|   55     , m_element(other.m_element) |  | 
|   56     , m_startingPosition(other.m_startingPosition) |  | 
|   57     , m_integrityFailure(other.m_integrityFailure) |  | 
|   58     , m_streamer(other.m_streamer) |  | 
|   59 { |  | 
|   60     setScriptResource(other.resource()); |  | 
|   61 } |  | 
|   62  |  | 
|   63 PendingScript::~PendingScript() |   45 PendingScript::~PendingScript() | 
|   64 { |   46 { | 
|   65 } |   47 } | 
|   66  |   48  | 
|   67 PendingScript& PendingScript::operator=(const PendingScript& other) |   49 PendingScript& PendingScript::operator=(const PendingScript& other) | 
|   68 { |   50 { | 
|   69     if (this == &other) |   51     if (this == &other) | 
|   70         return *this; |   52         return *this; | 
|   71  |   53  | 
|   72     m_watchingForLoad = other.m_watchingForLoad; |   54     m_watchingForLoad = other.m_watchingForLoad; | 
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  210 bool PendingScript::isReady() const |  192 bool PendingScript::isReady() const | 
|  211 { |  193 { | 
|  212     if (resource() && !resource()->isLoaded()) |  194     if (resource() && !resource()->isLoaded()) | 
|  213         return false; |  195         return false; | 
|  214     if (m_streamer && !m_streamer->isFinished()) |  196     if (m_streamer && !m_streamer->isFinished()) | 
|  215         return false; |  197         return false; | 
|  216     return true; |  198     return true; | 
|  217 } |  199 } | 
|  218  |  200  | 
|  219 } |  201 } | 
| OLD | NEW |