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

Side by Side Diff: Source/WebCore/bindings/v8/ScriptSourceCode.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, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 , m_cachedScript(cs) 56 , m_cachedScript(cs)
57 , m_url(ParsedURLString, cs->url()) 57 , m_url(ParsedURLString, cs->url())
58 , m_startPosition(TextPosition1::minimumPosition()) 58 , m_startPosition(TextPosition1::minimumPosition())
59 { 59 {
60 } 60 }
61 61
62 bool isEmpty() const { return m_source.isEmpty(); } 62 bool isEmpty() const { return m_source.isEmpty(); }
63 63
64 const String& source() const { return m_source; } 64 const String& source() const { return m_source; }
65 CachedScript* cachedScript() const { return m_cachedScript.get(); } 65 CachedScript* cachedScript() const { return m_cachedScript.get(); }
66 const KURL& url() const { return m_url; } 66 const KURL& url() const
67 {
68 if (m_cachedScript)
69 return m_cachedScript->response().url();
70 return m_url;
71 }
67 int startLine() const { return m_startPosition.m_line.oneBasedInt(); } 72 int startLine() const { return m_startPosition.m_line.oneBasedInt(); }
68 const TextPosition1& startPosition() const { return m_startPosition; } 73 const TextPosition1& startPosition() const { return m_startPosition; }
69 74
70 private: 75 private:
71 String m_source; 76 String m_source;
72 CachedResourceHandle<CachedScript> m_cachedScript; 77 CachedResourceHandle<CachedScript> m_cachedScript;
73 KURL m_url; 78 KURL m_url;
74 TextPosition1 m_startPosition; 79 TextPosition1 m_startPosition;
75 }; 80 };
76 81
77 } // namespace WebCore 82 } // namespace WebCore
78 83
79 #endif // ScriptSourceCode_h 84 #endif // ScriptSourceCode_h
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/js/CachedScriptSourceProvider.h ('k') | Source/WebCore/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698