Fix issues that were observed with newer JavascriptCore.
This commit is contained in:
parent
70385842df
commit
dbd61e40e1
3 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
JS_INTERPRETER_OBJS = $(JS_INTERPRETER_SRC:.cxx=.o)
|
||||||
|
|
||||||
%.o: %.cxx
|
%.o: %.cxx
|
||||||
$(JSCXX) $(JS_INTERPRETER_DEFINES) -g $(JSINCLUDES) -o $@ -c $<
|
$(JSCXX) $(JS_INTERPRETER_DEFINES) $(CFLAGS) $(JSINCLUDES) -o $@ -c $<
|
||||||
|
|
||||||
javascript: $(JS_INTERPRETER_OBJS)
|
javascript: $(JS_INTERPRETER_OBJS)
|
||||||
$(JSCXX) $^ $(CFLAGS) -o javascript $(JSDYNAMICLINKING) $(LINKFLAGS)
|
$(JSCXX) $^ $(CFLAGS) -o javascript $(JSDYNAMICLINKING) $(LINKFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,9 @@ bool JSCShell::InitializeEngine() {
|
||||||
if(context == 0) return false;
|
if(context == 0) return false;
|
||||||
JSObjectRef globalObject = JSContextGetGlobalObject(context);
|
JSObjectRef globalObject = JSContextGetGlobalObject(context);
|
||||||
|
|
||||||
|
|
||||||
// store this for later use
|
// store this for later use
|
||||||
JSClassDefinition __shell_classdef__;
|
JSClassDefinition __shell_classdef__ = JSClassDefinition();
|
||||||
|
|
||||||
JSClassRef __shell_class__ = JSClassCreate(&__shell_classdef__);
|
JSClassRef __shell_class__ = JSClassCreate(&__shell_classdef__);
|
||||||
JSObjectRef __shell__ = JSObjectMake(context, __shell_class__, 0);
|
JSObjectRef __shell__ = JSObjectMake(context, __shell_class__, 0);
|
||||||
bool success = JSObjectSetPrivate(__shell__, (void*) (long) this);
|
bool success = JSObjectSetPrivate(__shell__, (void*) (long) this);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue