From 82e400315d526eb6c96fd1ad21a8ce75529f7717 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 1 Apr 2013 10:13:49 -0400 Subject: Change Name_js to skip code snippets that depend on the CSRF-protection signature --- src/jscomp.sml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/jscomp.sml') diff --git a/src/jscomp.sml b/src/jscomp.sml index ffb68ab2..887fbc87 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -507,13 +507,14 @@ fun process (file : file) = 0 => s | _ => jsifyStringMulti (n - 1, jsifyString s) - fun deStrcat level (all as (e, _)) = + fun deStrcat level (all as (e, loc)) = case e of EPrim (Prim.String s) => jsifyStringMulti (level, s) | EStrcat (e1, e2) => deStrcat level e1 ^ deStrcat level e2 | EFfiApp ("Basis", "jsifyString", [(e, _)]) => "\"" ^ deStrcat (level + 1) e ^ "\"" - | _ => (Print.prefaces "deStrcat" [("e", MonoPrint.p_exp MonoEnv.empty all)]; - raise Fail "Jscomp: deStrcat") + | _ => (ErrorMsg.errorAt loc "Unexpected non-constant JavaScript code"; + Print.prefaces "deStrcat" [("e", MonoPrint.p_exp MonoEnv.empty all)]; + "") val quoteExp = quoteExp loc in -- cgit v1.2.3