diff options
| -rw-r--r-- | l/src/devtools-protocol.lisp | 3 | ||||
| -rw-r--r-- | l/src/main.lisp | 23 | 
2 files changed, 15 insertions, 11 deletions
| diff --git a/l/src/devtools-protocol.lisp b/l/src/devtools-protocol.lisp index 41a408e..3923eaf 100644 --- a/l/src/devtools-protocol.lisp +++ b/l/src/devtools-protocol.lisp @@ -24,6 +24,9 @@             ("method" . "Runtime.evaluate")             ("params" . (:obj ("expression" . ,expression)))))) +(defun runtime-evaluate-msg-p (message) +  (jsown:keyp (json-obj-get message "result") "sessionId")) +  (defun parse-get-targets-response (response)    (let* ((result (json-obj-get response "result"))           (targetInfos (json-obj-get result "targetInfos"))) diff --git a/l/src/main.lisp b/l/src/main.lisp index c2177e5..22c1d07 100644 --- a/l/src/main.lisp +++ b/l/src/main.lisp @@ -75,17 +75,18 @@  ; Response: (OBJ (id . 2)  ;            (result OBJ (sessionId . C24A99CA53CBD76EB68BCBD0D172A4E7))) -    (when reload-current-tab +    (when (and reload-current-tab +               (runtime-evaluate-msg-p response))        ; (when (and (= (or (json-obj-get response "id") -1) 1) -      (when (and  -                 (= *reloaded-count* -                    ;; TODO: Probably want to reload on all extension reload calls -                    *extension-targets-count*) - -                 (string= (json-obj-get -                            (json-obj-get response "result") -                            "sessionId") -                          *last-session-id*)) +      ; (when (and  +                 ; (= *reloaded-count* +                 ;    ;; TODO: Probably want to reload on all extension reload calls +                 ;    *extension-targets-count*) +                 ; +                 ; (string= (json-obj-get +                 ;            (json-obj-get response "result") +                 ;            "sessionId") +                 ;          *last-session-id*))        ; (let ((current-call-id (json-obj-get response "id")))        ;   (when (and current-call-id        ;              (= current-call-id @@ -94,7 +95,7 @@            ; (sleep 1)            (reload-tab (json-obj-get                          (json-obj-get response "result") -                        "sessionId")))) +                        "sessionId")))      ;; Failed to reload tab.      (when (jsown:keyp (json-obj-get response "result") "exceptionDetails") | 
