| Index: Source/bindings/v8/ExceptionStatePlaceholder.h
|
| diff --git a/Source/core/html/LinkResource.h b/Source/bindings/v8/ExceptionStatePlaceholder.h
|
| similarity index 61%
|
| copy from Source/core/html/LinkResource.h
|
| copy to Source/bindings/v8/ExceptionStatePlaceholder.h
|
| index 3cac60475de18a88a6aee20f73f9cd90f6a52441..642ba10eee3a4f4320a6a052afdf3e092808985c 100644
|
| --- a/Source/core/html/LinkResource.h
|
| +++ b/Source/bindings/v8/ExceptionStatePlaceholder.h
|
| @@ -28,51 +28,46 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef LinkResource_h
|
| -#define LinkResource_h
|
| +#ifndef ExceptionStatePlaceholder_h
|
| +#define ExceptionStatePlaceholder_h
|
|
|
| -#include "core/loader/cache/CachedResourceRequest.h"
|
| -#include "weborigin/KURL.h"
|
| -#include "wtf/RefCounted.h"
|
| -#include "wtf/text/WTFString.h"
|
| +#include "bindings/v8/ExceptionState.h"
|
| +#include "wtf/Assertions.h"
|
|
|
| namespace WebCore {
|
|
|
| -class HTMLLinkElement;
|
| +class ExceptionState;
|
|
|
| -class LinkResource : public RefCounted<LinkResource> {
|
| +class IgnorableExceptionState : public ExceptionState {
|
| public:
|
| - enum Type {
|
| - Style,
|
| - Import
|
| - };
|
| + IgnorableExceptionState();
|
| + ExceptionState& returnThis() { return *this; }
|
| + virtual void throwDOMException(const ExceptionCode&, const char* = 0) OVERRIDE;
|
| +};
|
|
|
| - explicit LinkResource(HTMLLinkElement*);
|
| - virtual ~LinkResource();
|
| +#define IGNORE_EXCEPTION_STATE (::WebCore::IgnorableExceptionState().returnThis())
|
|
|
| - virtual Type type() const = 0;
|
| - virtual void process() = 0;
|
| - virtual void ownerRemoved() = 0;
|
| +#if ASSERT_DISABLED
|
|
|
| -protected:
|
| - HTMLLinkElement* m_owner;
|
| -};
|
| +#define ASSERT_NO_EXCEPTION_STATE (::WebCore::IgnorableExceptionState().returnThis())
|
|
|
| -class LinkRequestBuilder {
|
| -public:
|
| - explicit LinkRequestBuilder(HTMLLinkElement* owner);
|
| +#else
|
|
|
| - bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); }
|
| - const KURL& url() const { return m_url; }
|
| - const String& charset() const { return m_charset; }
|
| - CachedResourceRequest build(bool blocking) const;
|
| +class NoExceptionStateAssertionChecker : public ExceptionState {
|
| +public:
|
| + NoExceptionStateAssertionChecker(const char* file, int line);
|
| + ExceptionState& returnThis() { return *this; }
|
| + virtual void throwDOMException(const ExceptionCode&) OVERRIDE;
|
|
|
| private:
|
| - HTMLLinkElement* m_owner;
|
| - KURL m_url;
|
| - String m_charset;
|
| + const char* m_file;
|
| + int m_line;
|
| };
|
|
|
| +#define ASSERT_NO_EXCEPTION_STATE (::WebCore::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis())
|
| +
|
| +#endif
|
| +
|
| } // namespace WebCore
|
|
|
| -#endif // LinkResource_h
|
| +#endif // ExceptionStatePlaceholder_h
|
|
|