/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
namespace JSC {
+ enum SourceBOMPresence { SourceHasNoBOMs, SourceCouldHaveBOMs };
+
class SourceProvider : public RefCounted<SourceProvider> {
public:
- SourceProvider(const UString& url)
+ SourceProvider(const UString& url, SourceBOMPresence hasBOMs = SourceCouldHaveBOMs)
: m_url(url)
+ , m_hasBOMs(hasBOMs)
{
}
virtual ~SourceProvider() { }
const UString& url() { return m_url; }
intptr_t asID() { return reinterpret_cast<intptr_t>(this); }
+ SourceBOMPresence hasBOMs() const { return m_hasBOMs; }
+
private:
UString m_url;
+ SourceBOMPresence m_hasBOMs;
};
class UStringSourceProvider : public SourceProvider {