webview

Check-in [3134cb975d]
Login

Check-in [3134cb975d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected processing of callback errors
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3134cb975d09be3494b28555dcd41e81ad5def1d932cbf1d5bd4a59e30fe43c0
User & Date: murphy 2018-09-01 00:57:39.138
Context
2018-09-01
01:49
Fragment rendering for write-html check-in: 78dabae49f user: murphy tags: trunk
00:57
Corrected processing of callback errors check-in: 3134cb975d user: murphy tags: trunk
2018-08-31
16:33
Content generation tests check-in: 62c9140a13 user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to main.scm.
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(define-external (on_webview_external_invoke [nonnull-webview view] [(const c-string) data]) void
  (mutex-lock! webview-callbacks)
  (let ([proc (hash-table-ref (mutex-specific webview-callbacks) view)])
    (mutex-unlock! webview-callbacks)
    (when proc
      (handle-exceptions
        exn (webview-log
             (string-trim
              (call-with-output-string
               (cut print-error-message exn <> "Callback Error"))))
        (proc view data)))))

(define (webview title proc #!key [url #f] [width 800] [height 600] [resizable? #t] [debug? #f] [yield! #f])
  (letrec ([view
            ((foreign-lambda







|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(define-external (on_webview_external_invoke [nonnull-webview view] [(const c-string) data]) void
  (mutex-lock! webview-callbacks)
  (let ([proc (hash-table-ref (mutex-specific webview-callbacks) view)])
    (mutex-unlock! webview-callbacks)
    (when proc
      (handle-exceptions
        exn (webview-log
             (string-trim-both
              (call-with-output-string
               (cut print-error-message exn <> "Callback Error"))))
        (proc view data)))))

(define (webview title proc #!key [url #f] [width 800] [height 600] [resizable? #t] [debug? #f] [yield! #f])
  (letrec ([view
            ((foreign-lambda
Changes to webview.scm.
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    (chicken condition)
    (chicken fixnum)
    (chicken bitwise)
    (chicken foreign)
    (only (chicken port) call-with-output-string)
    (only (chicken memory) tagged-pointer? tag-pointer)
    (only (chicken gc) set-finalizer!)
    (only srfi-13 string-trim)
    srfi-18
    srfi-69
    webview-content)
  (foreign-declare
    "#include <webview.h>")
  (include
    "main.scm"))







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    (chicken condition)
    (chicken fixnum)
    (chicken bitwise)
    (chicken foreign)
    (only (chicken port) call-with-output-string)
    (only (chicken memory) tagged-pointer? tag-pointer)
    (only (chicken gc) set-finalizer!)
    (only srfi-13 string-trim-both)
    srfi-18
    srfi-69
    webview-content)
  (foreign-declare
    "#include <webview.h>")
  (include
    "main.scm"))