[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jberlin at webkit.org
jberlin at webkit.org
Wed Dec 22 14:22:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 100b8766b30ff41503ce27398ee77325a482b9f0
Author: jberlin at webkit.org <jberlin at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 7 14:56:21 2010 +0000
Bundle should expose a reportException method.
https://bugs.webkit.org/show_bug.cgi?id=46769
Reviewed by John Sullivan.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleReportException):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::reportException):
Mimic the behavior of WebView::reportException.
* WebProcess/InjectedBundle/InjectedBundle.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index a6b300e..156000a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-06 Jessie Berlin <jberlin at apple.com>
+
+ Reviewed by John Sullivan.
+
+ Bundle should expose a reportException method.
+ https://bugs.webkit.org/show_bug.cgi?id=46769
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleReportException):
+ * WebProcess/InjectedBundle/API/c/WKBundle.h:
+
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::reportException):
+ Mimic the behavior of WebView::reportException.
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+
2010-10-07 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Adam Roben.
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index 1594125..8ea9209 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -126,3 +126,8 @@ void WKBundleOverrideXSSAuditorEnabledForTestRunner(WKBundleRef bundleRef, bool
{
toImpl(bundleRef)->overrideXSSAuditorEnabledForTestRunner(enabled);
}
+
+void WKBundleReportException(JSContextRef context, JSValueRef exception)
+{
+ InjectedBundle::reportException(context, exception);
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h
index 62b2894..ec2d03d 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h
@@ -26,6 +26,7 @@
#ifndef WKBundle_h
#define WKBundle_h
+#include <JavaScriptCore/JavaScript.h>
#include <WebKit2/WKBase.h>
#ifdef __cplusplus
@@ -53,6 +54,8 @@ WK_EXPORT void WKBundleSetClient(WKBundleRef bundle, WKBundleClient * client);
WK_EXPORT void WKBundlePostMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody);
WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData);
+WK_EXPORT void WKBundleReportException(JSContextRef, JSValueRef exception);
+
#ifdef __cplusplus
}
#endif
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index 43f2357..16f972a 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -37,6 +37,7 @@
#include "WebPage.h"
#include "WebPreferencesStore.h"
#include "WebProcess.h"
+#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSLock.h>
#include <WebCore/GCController.h>
#include <WebCore/JSDOMWindow.h>
@@ -220,4 +221,19 @@ void InjectedBundle::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC:
ASSERT_NOT_REACHED();
}
+void InjectedBundle::reportException(JSContextRef context, JSValueRef exception)
+{
+ if (!context || !exception)
+ return;
+
+ JSLock lock(JSC::SilenceAssertionsOnly);
+ JSC::ExecState* execState = toJS(context);
+
+ // Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a Page.
+ if (!toJSDOMWindow(execState->lexicalGlobalObject()))
+ return;
+
+ WebCore::reportException(execState, toJS(execState, exception));
+}
+
} // namespace WebKit
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index f540db9..3132e1d 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -105,6 +105,8 @@ public:
void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ static void reportException(JSContextRef, JSValueRef exception);
+
private:
InjectedBundle(const String&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list