Introduced an extra Makefile for the custom javascript interpreter.
This commit is contained in:
parent
bf1606c0f9
commit
b216a739c4
7 changed files with 233 additions and 44 deletions
|
|
@ -70,6 +70,10 @@ bool JSCShell::InitializeEngine() {
|
|||
JSClassRef __shell_class__ = JSClassCreate(&__shell_classdef__);
|
||||
JSObjectRef __shell__ = JSObjectMake(context, __shell_class__, 0);
|
||||
bool success = JSObjectSetPrivate(__shell__, (void*) (long) this);
|
||||
if (!success) {
|
||||
std::cerr << "Could not register the shell in the Javascript context" << std::endl;
|
||||
return false;
|
||||
}
|
||||
JSStringRef shellKey = JSStringCreateWithUTF8CString("__shell__");
|
||||
JSObjectSetProperty(context, globalObject, shellKey, __shell__, kJSPropertyAttributeReadOnly, NULL);
|
||||
JSStringRelease(shellKey);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue