fix include for non javascript builds

svn path=/trunk/netsurf/; revision=13964
This commit is contained in:
Vincent Sanders 2012-06-13 17:57:16 +00:00
parent 4c89c9d5df
commit 0be03dea20
2 changed files with 4 additions and 5 deletions

View File

@ -31,15 +31,14 @@ static JSBool jsalert(JSContext *cx, uintN argc, jsval *vp)
return JS_FALSE;
#ifdef SPIDERMONKEY_400
#if JS_VERSION <= 180
txt = JS_GetStringBytes(u16_txt);
#else
unsigned int length;
length = JS_GetStringLength(u16_txt);
txt = alloca(sizeof(char)*(length+1));
JS_EncodeStringToBuffer(u16_txt, txt, length);
txt[length] = '\0';
#else
txt = JS_GetStringBytes(u16_txt);
#endif
warn_user(txt, NULL);

View File

@ -20,7 +20,7 @@
* Dummy implementation of javascript engine functions.
*/
#include "desktop/js.h"
#include "javascript/js.h"
#include "utils/log.h"
void js_initialise(void)