summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/parser/SourceProvider.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-14 16:29:47 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-14 16:29:47 +0200
commitd0424a769059c84ae20beb3c217812792ea6726b (patch)
tree6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/JavaScriptCore/parser/SourceProvider.h
parent88a04ac016f57c2d78e714682445dff2e7db4ade (diff)
downloadqtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/JavaScriptCore/parser/SourceProvider.h')
-rw-r--r--Source/JavaScriptCore/parser/SourceProvider.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/parser/SourceProvider.h b/Source/JavaScriptCore/parser/SourceProvider.h
index 7f2e8d995..145b2dd16 100644
--- a/Source/JavaScriptCore/parser/SourceProvider.h
+++ b/Source/JavaScriptCore/parser/SourceProvider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -56,10 +56,12 @@ namespace JSC {
delete m_cache;
}
- virtual String getRange(int start, int end) const = 0;
- virtual const StringImpl* data() const = 0;
- virtual int length() const = 0;
-
+ virtual const String& source() const = 0;
+ String getRange(int start, int end) const
+ {
+ return source().substringSharingImpl(start, end - start);
+ }
+
const String& url() { return m_url; }
TextPosition startPosition() const { return m_startPosition; }
intptr_t asID()
@@ -93,12 +95,10 @@ namespace JSC {
return adoptRef(new StringSourceProvider(source, url, startPosition));
}
- virtual String getRange(int start, int end) const OVERRIDE
+ virtual const String& source() const OVERRIDE
{
- return m_source.substringSharingImpl(start, end - start);
+ return m_source;
}
- const StringImpl* data() const { return m_source.impl(); }
- int length() const { return m_source.length(); }
private:
StringSourceProvider(const String& source, const String& url, const TextPosition& startPosition)