summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/WebView/WebView.mm
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-05-21 16:53:46 +0100
committerKristian Monsen <kristianm@google.com>2010-05-25 10:24:15 +0100
commit6c2af9490927c3c5959b5cb07461b646f8b32f6c (patch)
treef7111b9b22befab472616c1d50ec94eb50f1ec8c /WebKit/mac/WebView/WebView.mm
parenta149172322a9067c14e8b474a53e63649aa17cad (diff)
downloadexternal_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.zip
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.gz
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.bz2
Merge WebKit at r59636: Initial merge by git
Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
Diffstat (limited to 'WebKit/mac/WebView/WebView.mm')
-rw-r--r--WebKit/mac/WebView/WebView.mm18
1 files changed, 17 insertions, 1 deletions
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 2442846..36313b4 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -530,6 +530,21 @@ static NSString *createUserVisibleWebKitVersionString()
return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; " PROCESSOR " Mac OS X %@; %@) AppleWebKit/%@ (KHTML, like Gecko)", osVersion, language, webKitVersion];
}
++ (void)_reportException:(JSValueRef)exception inContext:(JSContextRef)context
+{
+ if (!exception || !context)
+ return;
+
+ JSLock lock(SilenceAssertionsOnly);
+ JSC::ExecState* execState = toJS(context);
+
+ // Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a WebView.
+ if (!toJSDOMWindow(execState->lexicalGlobalObject()))
+ return;
+
+ reportException(execState, toJS(execState, exception));
+}
+
static void WebKitInitializeApplicationCachePathIfNecessary()
{
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
@@ -1084,8 +1099,9 @@ static bool fastDocumentTeardownEnabled()
// Deleteing the WebCore::Page will clear the page cache so we call destroy on
// all the plug-ins in the page cache to break any retain cycles.
// See comment in HistoryItem::releaseAllPendingPageCaches() for more information.
- delete _private->page;
+ Page* page = _private->page;
_private->page = 0;
+ delete page;
if (_private->hasSpellCheckerDocumentTag) {
[[NSSpellChecker sharedSpellChecker] closeSpellDocumentWithTag:_private->spellCheckerDocumentTag];