Fix issues that were observed with newer JavascriptCore.

This commit is contained in:
Oliver Buchtala 2014-03-04 10:41:35 +01:00
commit dbd61e40e1
3 changed files with 4 additions and 3 deletions

View file

@ -47,7 +47,7 @@ JS_INTERPRETER_SRC = javascript.cxx js_shell.cxx $(JS_INTERPRETER_SRC_JSC) $(JS_
JS_INTERPRETER_OBJS = $(JS_INTERPRETER_SRC:.cxx=.o)
%.o: %.cxx
$(JSCXX) $(JS_INTERPRETER_DEFINES) -g $(JSINCLUDES) -o $@ -c $<
$(JSCXX) $(JS_INTERPRETER_DEFINES) $(CFLAGS) $(JSINCLUDES) -o $@ -c $<
javascript: $(JS_INTERPRETER_OBJS)
$(JSCXX) $^ $(CFLAGS) -o javascript $(JSDYNAMICLINKING) $(LINKFLAGS)

View file

@ -4,6 +4,7 @@
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef __GNUC__
#ifdef __APPLE__

View file

@ -64,9 +64,9 @@ bool JSCShell::InitializeEngine() {
if(context == 0) return false;
JSObjectRef globalObject = JSContextGetGlobalObject(context);
// store this for later use
JSClassDefinition __shell_classdef__;
JSClassDefinition __shell_classdef__ = JSClassDefinition();
JSClassRef __shell_class__ = JSClassCreate(&__shell_classdef__);
JSObjectRef __shell__ = JSObjectMake(context, __shell_class__, 0);
bool success = JSObjectSetPrivate(__shell__, (void*) (long) this);