diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-04-01 10:13:49 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-04-01 10:13:49 -0400 |
commit | 82e400315d526eb6c96fd1ad21a8ce75529f7717 (patch) | |
tree | c7f64cbf8081be1d96a35eb351b0c434aca092b0 /src/jscomp.sml | |
parent | bacf194c5cbeeb8a01b200dc32c5b968f7e62c0f (diff) |
Change Name_js to skip code snippets that depend on the CSRF-protection signature
Diffstat (limited to 'src/jscomp.sml')
-rw-r--r-- | src/jscomp.sml | 7 |
1 files changed, 4 insertions, 3 deletions
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 |