729
745
/* 4 meg js space - should this be configurable? */
730
746
jrt = JS_NewRuntime(4L * 1024L * 1024L);
737
753
jcx = JS_NewContext(jrt, gStackChunkSize);
740
756
JS_SetErrorReporter(jcx, my_ErrorReporter);
741
757
JS_SetOptions(jcx, JSOPTION_VAROBJFIX);
743
759
/* Create the Window object, which is the global object in DOM. */
744
760
jwin = JS_NewObject(jcx, &window_class, NULL, NULL);
747
763
JS_InitClass(jcx, jwin, 0, &window_class, window_ctor, 3,
748
764
NULL, window_methods, NULL, NULL);
749
765
/* Ok, but the global object was created before the class,