| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 int length() const { return m_cachedScript->script().length(); } | 50 int length() const { return m_cachedScript->script().length(); } |
| 51 const String& source() const { return m_cachedScript->script(); } | 51 const String& source() const { return m_cachedScript->script(); } |
| 52 | 52 |
| 53 virtual void cacheSizeChanged(int delta) | 53 virtual void cacheSizeChanged(int delta) |
| 54 { | 54 { |
| 55 m_cachedScript->sourceProviderCacheSizeChanged(delta); | 55 m_cachedScript->sourceProviderCacheSizeChanged(delta); |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 CachedScriptSourceProvider(CachedScript* cachedScript) | 59 CachedScriptSourceProvider(CachedScript* cachedScript) |
| 60 : ScriptSourceProvider(stringToUString(cachedScript->url()), cachedS
cript->sourceProviderCache()) | 60 : ScriptSourceProvider(stringToUString(cachedScript->response().url(
)), cachedScript->sourceProviderCache()) |
| 61 , m_cachedScript(cachedScript) | 61 , m_cachedScript(cachedScript) |
| 62 { | 62 { |
| 63 m_cachedScript->addClient(this); | 63 m_cachedScript->addClient(this); |
| 64 } | 64 } |
| 65 | 65 |
| 66 CachedResourceHandle<CachedScript> m_cachedScript; | 66 CachedResourceHandle<CachedScript> m_cachedScript; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 inline JSC::SourceCode makeSource(CachedScript* cachedScript) | 69 inline JSC::SourceCode makeSource(CachedScript* cachedScript) |
| 70 { | 70 { |
| 71 return JSC::SourceCode(CachedScriptSourceProvider::create(cachedScript))
; | 71 return JSC::SourceCode(CachedScriptSourceProvider::create(cachedScript))
; |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace WebCore | 74 } // namespace WebCore |
| 75 | 75 |
| 76 #endif // CachedScriptSourceProvider_h | 76 #endif // CachedScriptSourceProvider_h |
| OLD | NEW |