diff options
author | Ben Murdoch <benm@google.com> | 2010-06-15 19:36:43 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-06-16 14:52:28 +0100 |
commit | 545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch) | |
tree | c0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/bindings/cpp/WebExceptionHandler.h | |
parent | 719298a66237d38ea5c05f1547123ad8aacbc237 (diff) | |
download | external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2 |
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/bindings/cpp/WebExceptionHandler.h')
-rw-r--r-- | WebCore/bindings/cpp/WebExceptionHandler.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/WebCore/bindings/cpp/WebExceptionHandler.h b/WebCore/bindings/cpp/WebExceptionHandler.h new file mode 100644 index 0000000..e679254 --- /dev/null +++ b/WebCore/bindings/cpp/WebExceptionHandler.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) Research In Motion Limited 2010. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef WebExceptionHandler_h +#define WebExceptionHandler_h + +typedef int WebDOMExceptionCode; +typedef void (*WebExceptionHandler)(WebDOMExceptionCode); + +// Used from the outside to register a callback that gets fired whenever an exception is raised +void webInstallExceptionHandler(WebExceptionHandler); + +// Never used by the bindings, only indirectly by webDOMRaiseError +void webRaiseDOMException(WebDOMExceptionCode); + +// Used from the bindings +inline void webDOMRaiseError(WebDOMExceptionCode ec) +{ + if (ec) + webRaiseDOMException(ec); +} + +#endif |