From b1e9e47fa11f608ae16bc07f97a2acf95bf80272 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 1 Jun 2012 10:36:58 +0200 Subject: Imported WebKit commit 499c84c99aa98e9870fa7eaa57db476c6d160d46 (http://svn.webkit.org/repository/webkit/trunk@119200) Weekly update :). Particularly relevant changes for Qt are the use of the WebCore image decoders and direct usage of libpng/libjpeg if available in the system. --- Source/JavaScriptCore/parser/SourceProvider.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/parser/SourceProvider.h') diff --git a/Source/JavaScriptCore/parser/SourceProvider.h b/Source/JavaScriptCore/parser/SourceProvider.h index 20be63cac..946792b2c 100644 --- a/Source/JavaScriptCore/parser/SourceProvider.h +++ b/Source/JavaScriptCore/parser/SourceProvider.h @@ -40,6 +40,8 @@ namespace JSC { class SourceProvider : public RefCounted { public: + static const intptr_t nullID = 1; + SourceProvider(const UString& url, const TextPosition& startPosition, SourceProviderCache* cache = 0) : m_url(url) , m_startPosition(startPosition) @@ -61,7 +63,13 @@ namespace JSC { const UString& url() { return m_url; } TextPosition startPosition() const { return m_startPosition; } - intptr_t asID() { return reinterpret_cast(this); } + intptr_t asID() + { + ASSERT(this); + if (!this) // Be defensive in release mode. + return nullID; + return reinterpret_cast(this); + } bool isValid() const { return m_validated; } void setValid() { m_validated = true; } -- cgit v1.2.1