diff options
Diffstat (limited to 'Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm')
-rw-r--r-- | Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm index d00d60b..c070b2b 100644 --- a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm +++ b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm @@ -345,7 +345,7 @@ static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SE return nil; } -static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2) +static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, int integer2, id object2) { if (!delegate) return nil; @@ -359,6 +359,20 @@ static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SE return nil; } +static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, BOOL boolean, NSInteger integer1, int integer2, id object2) +{ + if (!delegate) + return nil; + if (!self->_private->catchesDelegateExceptions) + return implementation(delegate, selector, self, object1, boolean, integer1, integer2, object2); + @try { + return implementation(delegate, selector, self, object1, boolean, integer1, integer2, object2); + } @catch(id exception) { + ReportDiscardedDelegateException(selector, exception); + } + return nil; +} + static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, NSInteger integer, id object3) { if (!delegate) @@ -574,11 +588,16 @@ id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id o return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer, object2, object3, object4); } -id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2) +id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, int integer2, id object2) { return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, integer2, object2); } +id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, BOOL boolean, NSInteger integer1, int integer2, id object2) +{ + return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, boolean, integer1, integer2, object2); +} + id CallHistoryDelegate(IMP implementation, WebView *self, SEL selector) { return CallDelegate(implementation, self, self->_private->historyDelegate, selector); |