[geary/wip/yet-more-s390x-ftbs] Apply same workaround for s390x to client code as for the web extension
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/yet-more-s390x-ftbs] Apply same workaround for s390x to client code as for the web extension
- Date: Fri, 1 Mar 2019 09:28:51 +0000 (UTC)
commit 01734f38d14d99f059453b00cf7b517df2601b11
Author: Michael Gratton <mike vee net>
Date: Fri Mar 1 20:26:10 2019 +1100
Apply same workaround for s390x to client code as for the web extension
Apply workaround in 719b3a19 to remaing similar calls in client
codebase.
Fixes #260
src/client/conversation-viewer/conversation-web-view.vala | 3 ++-
src/client/util/util-webkit.vala | 12 +++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-web-view.vala
b/src/client/conversation-viewer/conversation-web-view.vala
index 48b92317..e46158f0 100644
--- a/src/client/conversation-viewer/conversation-web-view.vala
+++ b/src/client/conversation-viewer/conversation-web-view.vala
@@ -206,7 +206,8 @@ public class ConversationWebView : ClientWebView {
private void on_deceptive_link_clicked(WebKit.JavascriptResult result) {
try {
- unowned JS.GlobalContext context = result.get_global_context();
+ unowned JS.GlobalContext context =
+ (JS.GlobalContext) result.get_global_context();
JS.Object details = WebKitUtil.to_object(result);
uint reason = (uint) Geary.JS.to_number(
diff --git a/src/client/util/util-webkit.vala b/src/client/util/util-webkit.vala
index 45a27c44..4957d1ee 100644
--- a/src/client/util/util-webkit.vala
+++ b/src/client/util/util-webkit.vala
@@ -18,7 +18,8 @@ namespace WebKitUtil {
*/
public bool to_bool(WebKit.JavascriptResult result)
throws Geary.JS.Error {
- unowned JS.GlobalContext context = result.get_global_context();
+ unowned JS.GlobalContext context =
+ (JS.GlobalContext) result.get_global_context();
unowned JS.Value value = result.get_value();
if (!value.is_boolean(context)) {
throw new Geary.JS.Error.TYPE("Result is not a JS Boolean object");
@@ -34,7 +35,7 @@ namespace WebKitUtil {
*/
public inline double to_number(WebKit.JavascriptResult result)
throws Geary.JS.Error {
- return Geary.JS.to_number(result.get_global_context(),
+ return Geary.JS.to_number((JS.GlobalContext) result.get_global_context(),
result.get_value());
}
@@ -46,7 +47,7 @@ namespace WebKitUtil {
*/
public inline string to_string(WebKit.JavascriptResult result)
throws Geary.JS.Error {
- return Geary.JS.to_string(result.get_global_context(),
+ return Geary.JS.to_string((JS.GlobalContext) result.get_global_context(),
result.get_value());
}
@@ -59,7 +60,8 @@ namespace WebKitUtil {
*/
public string as_string(WebKit.JavascriptResult result)
throws Geary.JS.Error {
- unowned JS.GlobalContext context = result.get_global_context();
+ unowned JS.GlobalContext context =
+ (JS.GlobalContext) result.get_global_context();
unowned JS.Value js_str_value = result.get_value();
JS.Value? err = null;
JS.String js_str = js_str_value.to_string_copy(context, out err);
@@ -78,7 +80,7 @@ namespace WebKitUtil {
*/
public JS.Object? to_object(WebKit.JavascriptResult result)
throws Geary.JS.Error {
- return Geary.JS.to_object(result.get_global_context(),
+ return Geary.JS.to_object((JS.GlobalContext) result.get_global_context(),
result.get_value());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]