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

Unified Diff: Source/bindings/v8/ExceptionStatePlaceholder.h

Issue 18398002: Remove IDBNotFoundError ExceptionCode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698