Remove debug logging from sx_browser.ml and sx-platform.js
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -91,9 +91,7 @@ let rec value_to_js (v : value) : Js.Unsafe.any =
|
||||
| Dict d ->
|
||||
(* Check for __host_handle — return original JS object *)
|
||||
(match Hashtbl.find_opt d "__host_handle" with
|
||||
| Some (Number n) ->
|
||||
Printf.eprintf "[value_to_js] Dict→host_get_js handle=%d\n%!" (int_of_float n);
|
||||
host_get_js (int_of_float n)
|
||||
| Some (Number n) -> host_get_js (int_of_float n)
|
||||
| _ ->
|
||||
let obj = Js.Unsafe.obj [||] in
|
||||
Js.Unsafe.set obj (Js.string "_type") (Js.string "dict");
|
||||
@@ -171,8 +169,6 @@ and js_to_value (js : Js.Unsafe.any) : value =
|
||||
| "function" ->
|
||||
let h = Js.Unsafe.get js (Js.string "__sx_handle") in
|
||||
let has_host_cb = Js.to_bool (Js.Unsafe.coerce (Js.Unsafe.get js (Js.string "__host_callback"))) in
|
||||
if has_host_cb then
|
||||
Printf.eprintf "[js_to_value] fn has __host_callback! Storing as host obj\n%!";
|
||||
if not (Js.Unsafe.equals h Js.undefined) && not has_host_cb then
|
||||
get_handle (Js.float_of_number (Js.Unsafe.coerce h) |> int_of_float)
|
||||
else
|
||||
@@ -181,7 +177,6 @@ and js_to_value (js : Js.Unsafe.any) : value =
|
||||
This preserves wrappers like _driveAsync that host-callback
|
||||
attaches for IO suspension handling. *)
|
||||
let id = host_put js in
|
||||
Printf.eprintf "[js_to_value] plain JS fn → host_object id=%d\n%!" id;
|
||||
let d = Hashtbl.create 2 in
|
||||
Hashtbl.replace d "__host_handle" (Number (float_of_int id));
|
||||
Dict d
|
||||
|
||||
Reference in New Issue
Block a user