Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: Source/WebCore/bindings/js/CachedScriptSourceProvider.h

Issue 6409009: Merge 76429 - 2011-01-21 Yury Semikhatsky <yurys@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/resources/cross-origin-script.txt ('k') | Source/WebCore/bindings/v8/ScriptSourceCode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698